/* ==================================================================
   Redland Partners — Website styles (uses design-system tokens)
   ================================================================== */

/* ---- Header / nav ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper-1) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--border-hair);
}
.site-header__inner {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img { display: block; width: 40px; height: 40px; }
.brand-lockup .wm { display: flex; flex-direction: column; line-height: 1; }
.brand-lockup .wm .name { font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-900); }
.brand-lockup .wm .sub { font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; color: var(--brand); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 34px; }

/* ---- Mobile nav toggle ------------------------------------------ */
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; margin: 0;
  align-items: center; justify-content: center; gap: 5px; flex-direction: column;
  background: none; border: none; cursor: pointer; flex-shrink: 0; z-index: 60;
}
.nav-toggle__bar {
  display: block; width: 22px; height: 2px; background: var(--ink-900); border-radius: 1px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.site-header.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav a.navlink {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-700); letter-spacing: 0.01em;
  position: relative; padding-block: 4px;
}
.site-nav a.navlink:hover { color: var(--ink-900); }
.site-nav a.navlink.is-active { color: var(--brand); }
.site-nav a.navlink.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--brand);
}

/* ---- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 13px 22px; border-radius: var(--radius-md); border: 1.5px solid transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--text-on-red); }
.btn--primary:hover { background: var(--brand-hover); color: var(--text-on-red); }
.btn--dark { background: var(--ink-900); color: var(--paper-0); }
.btn--dark:hover { background: var(--ink-800); color: var(--paper-0); }
.btn--ghost { background: transparent; color: var(--ink-900); border-color: var(--ink-900); }
.btn--ghost:hover { background: var(--ink-900); color: var(--paper-0); }
.btn--onred { background: var(--paper-0); color: var(--brand); }
.btn--onred:hover { background: var(--paper-1); color: var(--brand-hover); }
.btn--link { padding: 0; border: none; background: none; color: var(--brand); }
.btn--link:hover { color: var(--brand-hover); gap: 14px; }
.btn__arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---- Hero ------------------------------------------------------ */
.hero { padding-top: 5.5rem; padding-bottom: 5.5rem; position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center; }
.hero__media img { width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
.hero__eyebrow { margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.03; max-width: 16ch; }
.hero__lead { font-size: var(--text-2xl); line-height: 1.42; color: var(--ink-600); max-width: 46ch; margin-top: 1.4rem; }
.hero__actions { display: flex; gap: 14px; margin-top: 2.4rem; flex-wrap: wrap; }

/* ---- Stat strip ------------------------------------------------ */
.statstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-hair); border-block: 1px solid var(--border-hair); }
.statstrip .stat { background: var(--paper-1); padding: 30px 26px; }
.stat__num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; letter-spacing: -0.02em; color: var(--brand); line-height: 1; }
.stat__label { font-size: 0.86rem; color: var(--ink-600); margin-top: 10px; line-height: 1.4; }

/* ---- Section headers ------------------------------------------- */
.sec-head { max-width: 60ch; }
.sec-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-top: 18px; }
.sec-head p { font-size: var(--text-lg); color: var(--ink-600); margin-top: 12px; }
.sec-head--center { margin-inline: auto; text-align: center; }

/* ---- Service cards --------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-hair); border: 1px solid var(--border-hair); margin-top: 3rem; }
.svc {
  background: var(--paper-0); padding: 38px 34px; display: flex; flex-direction: column; gap: 14px;
  transition: background var(--dur-med) var(--ease-out);
}
.svc:hover { background: var(--paper-1); }
.svc__num { font-family: var(--font-display); font-size: 0.95rem; color: var(--clay-600); font-weight: 500; }
.svc h3 { font-size: 1.5rem; margin: 0; }
.svc p { font-size: 0.98rem; color: var(--ink-600); margin: 0; line-height: 1.6; }
.svc__more { margin-top: auto; padding-top: 12px; font-size: 0.86rem; font-weight: 600; color: var(--brand); letter-spacing: 0.02em; }

/* ---- Dark section ---------------------------------------------- */
.band-dark { background: var(--ink-900); color: var(--text-on-dark); }
.band-dark h2, .band-dark h3 { color: var(--paper-0); }
.band-dark .sec-head p { color: var(--text-on-dark-muted); }
.band-red { background: var(--brand); color: var(--text-on-red); }
.band-red h2 { color: var(--paper-0); }
.band-alt { background: var(--paper-2); }

/* ---- Feature / split ------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.split--photo img { width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
.figure-frame { position: relative; }
.figure-frame::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 2px solid var(--brand); border-radius: var(--radius-md); z-index: -1; }

/* ---- Quote ----------------------------------------------------- */
.pullquote { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.28; font-weight: 400; letter-spacing: -0.01em; max-width: 24ch; }

/* ---- Credentials list ------------------------------------------ */
.creds { display: flex; flex-wrap: wrap; gap: 10px; }
.cred-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600;
  padding: 7px 14px; border: 1px solid var(--border-on-dark); border-radius: var(--radius-pill);
  color: var(--text-on-dark); letter-spacing: 0.02em;
}
.cred-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red-500); }

/* ---- Timeline -------------------------------------------------- */
.timeline { border-left: 2px solid var(--border-hair); margin-top: 2.5rem; }
.tl-item { position: relative; padding: 0 0 2.6rem 2.4rem; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; background: var(--brand); border-radius: 50%; border: 3px solid var(--paper-1); }
.tl-item:last-child { padding-bottom: 0; }
.tl-role { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink-900); }
.tl-meta { font-size: 0.84rem; color: var(--clay-600); font-weight: 600; letter-spacing: 0.02em; margin: 4px 0 10px; text-transform: uppercase; }
.tl-item p { font-size: 0.95rem; color: var(--ink-600); margin: 0; }

/* ---- Contact --------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-700); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: 1rem; color: var(--ink-900); background: var(--paper-0);
  border: 1.5px solid var(--stone-200); border-radius: var(--radius-md); padding: 12px 14px; width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-500) 22%, transparent);
}
.contact-detail { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--border-hair); }
.contact-detail .k { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-caption); font-weight: 600; }
.contact-detail .v { font-size: 1.05rem; color: var(--ink-900); }
.contact-detail .v a { color: var(--ink-900); }
.contact-detail .v a:hover { color: var(--brand); }

/* ---- Footer ---------------------------------------------------- */
.site-footer { background: var(--ink-900); color: var(--text-on-dark-muted); padding-block: 4.5rem 2.5rem; }
.site-footer a { color: var(--text-on-dark-muted); }
.site-footer a:hover { color: var(--paper-0); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 3rem; }
.footer-col h4 { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone-400); font-weight: 600; margin: 0 0 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a { font-size: 0.95rem; }
.footer-brand .wm .name { color: var(--paper-0); font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.footer-brand p { font-size: 0.92rem; color: var(--stone-400); margin-top: 14px; max-width: 34ch; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--border-on-dark); font-size: 0.82rem; color: var(--stone-400); }

/* ---- Utility --------------------------------------------------- */
.eyebrow-block { margin-bottom: 8px; }
.mt-0 { margin-top: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .svc-grid { grid-template-columns: 1fr; }
  .statstrip { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 76px; left: 0; right: 0; height: calc(100vh - 76px);
    background: var(--paper-1); z-index: 55;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 6vw 32px; overflow-y: auto;
    border-top: 1px solid var(--border-hair);
    opacity: 0; transform: translateY(-10px); pointer-events: none;
    transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  }
  .site-header.is-open .site-nav { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a.navlink {
    width: 100%; padding: 18px 2px; font-size: 1.1rem;
    border-bottom: 1px solid var(--border-hair);
  }
  .site-nav a.navlink.is-active::after { display: none; }
  .site-nav a.btn--primary { margin-top: 22px; justify-content: center; width: 100%; }
  body.nav-open { overflow: hidden; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__media { display: none; }
  .eng-grid { grid-template-columns: 1fr !important; }
}

/* ---- Selected engagements -------------------------------------- */
.eng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border-hair); border: 1px solid var(--border-hair); margin-top: 3rem; }
.eng { background: var(--paper-0); padding: 26px 28px; display: flex; gap: 16px; align-items: flex-start; }
.eng__no { font-family: var(--font-display); color: var(--clay-600); font-size: 1rem; font-weight: 500; flex-shrink: 0; padding-top: 2px; }
.eng p { margin: 0; color: var(--ink-700); font-size: 1rem; line-height: 1.5; }

/* ---- Scroll reveal for titles --------------------------------- */
.rl-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.rl-reveal.in { opacity: 1; transform: none; }
h1 em, h2 em, .pullquote em, .hero h1 em { font-style: italic; font-weight: inherit; }
@media (prefers-reduced-motion: reduce) { .rl-reveal, .rl-reveal.in { opacity: 1 !important; transform: none !important; } }

/* ---- Intro flip animation (homepage) --------------------------- */
#rl-intro {
  position: fixed; inset: 0; z-index: 9999; background: var(--paper-1);
  display: flex; align-items: center; justify-content: center; perspective: 900px;
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
#rl-intro .rl-intro__mark {
  width: 104px; height: 104px; transform-style: preserve-3d;
  animation: rlFlip 1.15s var(--ease-in-out) both;
  filter: drop-shadow(0 12px 30px rgba(22,19,15,0.14));
}
#rl-intro.rl-intro--out { opacity: 0; transform: scale(1.05); pointer-events: none; }
@keyframes rlFlip {
  0%   { transform: rotateY(0deg) scale(0.82); opacity: 0; }
  18%  { opacity: 1; }
  70%  { transform: rotateY(360deg) scale(1); }
  100% { transform: rotateY(360deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { #rl-intro { display: none; } }

/* ---- Logo wall / marquee --------------------------------------- */
.logo-wall { border-block: 1px solid var(--border-hair); background: var(--paper-1); overflow: hidden; padding-block: 2.6rem; }
.logo-wall__head { text-align: center; margin-bottom: 1.8rem; }
.logo-wall__head .rl-overline { justify-content: center; }
.logo-wall__head p { color: var(--ink-500); font-size: 0.98rem; margin: 0.7rem auto 0; max-width: 60ch; }
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee__track { display: flex; flex-shrink: 0; align-items: center; gap: 1.4rem; padding-right: 1.4rem; animation: rlMarquee 42s linear infinite; }
.logo-wall:hover .marquee__track { animation-play-state: paused; }
.marquee__item { flex-shrink: 0; display: flex; align-items: center; justify-content: center; height: 92px; width: 190px; background: var(--paper-0); border: 1px solid var(--border-hair); border-radius: var(--radius-md); padding: 20px 24px; }
.marquee__item img { max-height: 46px; max-width: 140px; width: auto; object-fit: contain; opacity: 0.92; transition: opacity var(--dur-fast) var(--ease-out); }
.marquee__item:hover img { opacity: 1; }
@keyframes rlMarquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
