/* ============================================================
   BODN LLC — Site stylesheet
   Cool paper/ink palette, Cormorant + Hanken Grotesk, one living
   blue accent. Light + dark themes via [data-theme]; the theme is
   set by an inline <head> script (no flash) and toggled in main.js.
   ============================================================ */

:root {
  /* ---- Type families ---- */
  --serif: 'Cormorant', 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, sans-serif;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* ---- Elevation ---- */
  --shadow-lg:  0 20px 36px -22px rgba(27, 42, 51, 0.28);
  --shadow-cta: 0 14px 30px -12px rgba(110, 155, 174, 0.6);
  --shadow-cta-lg: 0 16px 34px -14px rgba(110, 155, 174, 0.7);
}

/* ---- Theme tokens ---- */
[data-theme="light"] {
  color-scheme: light; /* match the UA canvas so navigations never flash white/dark */
  --paper:       #F7F9FA;
  --white:       #FFFFFF;
  --ink:         #1B2A33;
  --slate:       #5E7482;
  --soft:        #5A7280;
  --line:        #E4E9EC;
  --accent:      #6E9BAE;
  --accent-deep: #4E7C90;
  --sig:         #CAD3DA;
  --softbg:      #EAF1F3;
  --meta:        #A7B5BE;
  --navbg:       rgba(247, 249, 250, 0.86);
  --panel:       #1B2A33;
  --panel-text:  #FFFFFF;
  --panel-muted: #AEC2CB;
  --btn-bg:      #1B2A33;
  --btn-text:    #FFFFFF;
  --accent-text: #FFFFFF;  /* text on --accent surfaces */
}
[data-theme="dark"] {
  color-scheme: dark; /* dark UA canvas — kills the white flash between pages */
  --paper:       #0E171D;
  --white:       #16222B;
  --ink:         #E6EDF1;
  --slate:       #9FB2BD;
  --soft:        #AAB9C3;
  --line:        #26333C;
  --accent:      #7DAAC0;
  --accent-deep: #A9CBDA;
  --sig:         #3C4E59;
  --softbg:      #1B2A33;
  --meta:        #5C6F7A;
  --navbg:       rgba(14, 23, 29, 0.86);
  --panel:       #101B22;
  --panel-text:  #E6EDF1;
  --panel-muted: #9FB2BD;
  --btn-bg:      #7DAAC0;
  --btn-text:    #0E171D;
  --accent-text: #0E171D;  /* dark text on the lighter dark-mode accent (7.2:1) */
}

/* smooth theme cross-fade */
[data-theme], [data-theme] * {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

/* ============ cross-page transitions ============ */
/* Staged page choreography (View Transitions API; browsers without
   support navigate normally):
   - outgoing content lifts away, incoming content rises in (the
     site's signature entrance), slightly delayed so it reads as
     staged rather than blended
   - the nav is a shared element pinned across pages
   - the accent CTA pill morphs from the dark CTA block into the
     form's footer button — the click literally travels */
@view-transition { navigation: auto; }

@keyframes vt-leave {
  to { opacity: 0; transform: translateY(-18px); }
}
@keyframes vt-enter {
  from { opacity: 0; transform: translateY(26px); }
}
::view-transition-old(root) { animation: vt-leave 0.3s var(--ease) both; }
::view-transition-new(root) { animation: vt-enter 0.55s var(--ease) 0.12s both; }

.nav { view-transition-name: site-nav; }
.cta-block .pill-accent-lg { view-transition-name: cta-pill; }

::view-transition-group(site-nav) { animation-duration: 0.45s; animation-timing-function: var(--ease); }
::view-transition-group(cta-pill) { animation-duration: 0.55s; animation-timing-function: var(--ease); }

/* keep the scrollbar gutter constant between scrolling and
   fixed-height pages so the transition doesn't shift sideways */
html { scrollbar-gutter: stable; }

/* ============ base ============ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background-color: var(--paper); } /* themed canvas so cross-page View Transitions never flash white */

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

/* quiet, accessible focus — thin accent ring */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ utilities ============ */

.wrap { max-width: 1080px; margin: 0 auto; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); }

.mark { display: block; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.eyebrow.center { justify-content: center; }
.tick { width: 26px; height: 1.5px; background: var(--accent); display: inline-block; flex-shrink: 0; }
.eyebrow-txt {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}

.pill {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  transition: transform 0.18s ease;
  cursor: pointer;
}
.pill:hover { transform: translateY(-2px); }
.pill-ink {
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
}
.pill-accent {
  background: var(--accent);
  color: var(--accent-text);
  padding: 15px 30px;
  font-weight: 600;
  font-size: 15.5px;
  box-shadow: var(--shadow-cta);
}
.pill-accent-lg {
  background: var(--accent);
  color: var(--accent-text);
  padding: 16px 36px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-cta-lg);
}

.navlink { cursor: pointer; transition: color 0.15s ease; color: var(--slate); }
.navlink:hover { color: var(--ink); }
.link-quiet {
  font-size: 14.5px;
  color: var(--slate);
  border-bottom: 1px solid var(--sig);
  padding-bottom: 3px;
}

.dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); flex-shrink: 0; }

.point-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.point-row span:last-child { font-size: 14.5px; color: var(--ink); }

/* ============ theme toggle + mobile menu ============ */

.theme-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--slate);
  width: 38px;
  height: 38px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-btn:hover { color: var(--ink); border-color: var(--accent); }

/* theme + menu buttons are JS-driven; hide them when JS is unavailable */
html:not(.js) .theme-btn,
html:not(.js) .ham { display: none; }

.nav-mobile { display: none; align-items: center; gap: 12px; }
.ham {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  width: 40px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ham-line { display: block; width: 18px; height: 1.6px; background: var(--ink); margin: 3.5px 0; border-radius: 2px; }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 18px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .navlink { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mobile-menu .pill { margin-top: 12px; text-align: center; }

/* ============ welcome veil (first visit of the session) ============ */
/* The head script tags <html> with .intro (play it) or .no-intro
   (skip it). Sequence: monogram rises in, wordmark tracks into
   place, the accent tick draws, "consulting" follows — then the
   whole veil lifts like a curtain and the hero rises beneath it. */

.intro-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
html:not(.intro) .intro-veil { display: none; }

.intro-lockup { display: flex; flex-direction: column; align-items: center; }
.intro-mark { opacity: 0; animation: introRise 1.6s var(--ease) 0.3s both; }
.intro-word {
  margin-top: 20px;
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* visually center despite trailing tracking */
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  opacity: 0;
  animation: introTrack 1.8s var(--ease) 0.7s both;
}
.intro-tick {
  width: 0;
  height: 1.5px;
  background: var(--accent);
  margin: 16px 0 12px;
  animation: introTick 1.1s var(--ease) 1.4s both;
}
.intro-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--slate);
  opacity: 0;
  animation: introRise 1.2s var(--ease) 1.8s both;
}

@keyframes introRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes introTrack {
  from { opacity: 0; letter-spacing: 0.55em; text-indent: 0.55em; }
  to { opacity: 1; letter-spacing: 0.3em; text-indent: 0.3em; }
}
@keyframes introTick { to { width: 84px; } }

html.intro .intro-veil { animation: veilLift 1.45s var(--ease) 3.15s both; }
@keyframes veilLift { to { transform: translateY(-101%); } }

/* hold the hero entrance until the curtain clears */
html.intro .rise { animation-delay: 3.3s; }
html.intro .rise.d1 { animation-delay: 3.4s; }
html.intro .rise.d2 { animation-delay: 3.5s; }
html.intro .rise.d3 { animation-delay: 3.6s; }

/* ============ animations ============ */

.rise {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s var(--ease) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }

.float { animation: float 11s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

.drift { animation: drift 16s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(2deg); }
}

/* scroll-into-view reveal — hidden only when JS is available */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in-view { opacity: 1; transform: none; }

.detail-fade { animation: detailFade 0.45s ease; }
@keyframes detailFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ============ nav ============ */

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--navbg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.nav.sticky { position: sticky; top: 0; z-index: 50; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.wordmark { letter-spacing: 0.3em; font-weight: 700; font-size: 15px; }
.brand-consulting { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--slate); margin-left: 4px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--slate); }

/* ============ hero ============ */

.hero { padding: 104px 48px 84px; position: relative; overflow: hidden; }
.wm {
  position: absolute;
  top: -40px;
  right: -120px;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: 40px;
  right: 120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 155, 174, 0.22) 0%, rgba(247, 249, 250, 0) 70%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 78px;
  line-height: 0.98;
  letter-spacing: 0.004em;
  max-width: 840px;
  color: var(--ink);
}
.hero-h1 em { font-style: italic; color: var(--accent-deep); }
.hero-lead {
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--soft);
  max-width: 580px;
  margin-top: 30px;
}
.hero-ctas { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; align-items: center; }

/* ============ sector marquee ============ */

.marquee-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  background: var(--white);
}
.marquee-label { margin-bottom: 12px; }
.marquee-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee {
  display: flex;
  gap: 0;
  width: max-content;
  animation: scroll 34s linear infinite;
}
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee-item {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--slate);
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  gap: 30px;
  white-space: nowrap;
}
.marquee-item .sep { width: 5px; height: 5px; border-radius: 99px; background: var(--sig); }

/* ============ section headings ============ */

.h2 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.03;
  color: var(--ink);
}

/* ============ audience segment (01 · Who we serve) ============ */

.audience { padding: 82px 48px 30px; }
.audience .h2 { font-size: 44px; margin: 0 0 28px; max-width: 580px; }
.seg-control {
  display: inline-flex;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 26px;
}
.seg-btn {
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--slate);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-btn.on { background: var(--btn-bg); color: var(--btn-text); }
.aud-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
}
.aud-main { padding: 38px; position: relative; }
.aud-kicker { font-size: 10.5px; margin-bottom: 14px; }
.aud-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.08;
}
.aud-desc { font-size: 16px; line-height: 1.65; color: var(--soft); max-width: 420px; }
.aud-note {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--accent-deep);
  background: var(--softbg);
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 600;
}
.aud-note .dot { width: 6px; height: 6px; }
.aud-side { padding: 38px; background: var(--softbg); position: relative; overflow: hidden; }
.aud-side .panel-wm { position: absolute; bottom: -24px; right: -24px; opacity: 0.06; pointer-events: none; }
.aud-side-label { font-size: 10.5px; margin-bottom: 16px; position: relative; }
.aud-points { position: relative; }
.aud-points .point-row { margin-bottom: 13px; }

/* ============ capabilities (02 · Why BODN) ============ */

.capabilities { padding: 78px 48px 30px; }
.capabilities .h2 { font-size: 42px; margin: 0 0 44px; max-width: 560px; line-height: 1.04; }
.capabilities .cols3 { gap: 20px; }
.cap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  transition: transform 0.2s ease;
}
.cap:hover { transform: translateY(-3px); }
.cap-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--softbg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.cap h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 10px; }
.cap p { font-size: 14.5px; color: var(--soft); line-height: 1.65; }

/* ============ services explorer (03 · What we do) ============ */

.services { padding: 64px 48px 30px; }
.services .h2 { font-size: 44px; margin: 0 0 32px; max-width: 560px; }
.explorer-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
}
.explorer-list { border-right: 1px solid var(--line); }
.svc-list-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.svc-list-row:last-child { border-bottom: none; }
.svc-num { font-family: var(--serif); font-size: 19px; width: 26px; line-height: 1; color: var(--sig); }
.svc-title { font-family: var(--serif); font-weight: 400; font-size: 23px; margin: 0; color: var(--slate); transition: color 0.2s ease; }
.svc-list-row.on { border-left-color: var(--accent); background: var(--softbg); }
.svc-list-row.on .svc-num { color: var(--accent-deep); }
.svc-list-row.on .svc-title { color: var(--ink); }
.svc-detail { position: relative; padding: 40px 38px; overflow: hidden; }
.svc-detail .panel-wm { position: absolute; bottom: -20px; right: -20px; opacity: 0.06; pointer-events: none; }
.svc-detail-inner { position: relative; }
.svc-cat { font-size: 10.5px; margin-bottom: 14px; }
.svc-h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.05;
}
.svc-desc { font-size: 16px; line-height: 1.65; color: var(--soft); margin: 0 0 24px; max-width: 380px; }

/* ============ approach (04) ============ */

.approach {
  padding: 72px 48px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.approach .h2 { font-size: 42px; margin: 0 0 46px; max-width: 560px; line-height: 1.04; }
.approach .cols2 { gap: 44px 64px; }
.step { display: flex; gap: 22px; }
.step-num { font-family: var(--serif); font-size: 38px; color: var(--accent); line-height: 1; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin: 0 0 9px; }
.step p { font-size: 14.5px; line-height: 1.65; color: var(--soft); }

/* ============ testimonial ============ */

.testimonial { padding: 88px 48px 70px; text-align: center; position: relative; }
.quote-glyph {
  font-family: var(--serif);
  font-size: 150px;
  line-height: 0.6;
  color: var(--sig);
  height: 60px;
  user-select: none;
}
.quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.38;
  margin: 0 auto;
  max-width: 780px;
  font-style: italic;
  color: var(--ink);
}
.quote-attr { margin-top: 30px; }

/* ============ stats ============ */

.stats { padding: 0 48px 84px; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 24px;
  border-top: 1px solid var(--line);
  padding-top: 46px;
}
.stat-n { font-family: var(--serif); font-size: clamp(34px, 9vw, 50px); font-weight: 300; color: var(--ink); line-height: 1; }
.stat-bar { width: 28px; height: 2px; background: var(--accent); margin: 14px 0 10px; }
.stat-l { font-size: 11px; }

/* ============ FAQ (05) ============ */

.faq { padding: 72px 48px; background: var(--white); border-top: 1px solid var(--line); }
.faq .wrap { max-width: 770px; }
.faq-head { text-align: center; margin-bottom: 34px; }
.faq-head .h2 { font-size: 40px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}
.faq-q .q-text { font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--ink); }
.faq-q .q-toggle {
  font-size: 24px;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}
.faq-item.open .q-toggle { transform: rotate(45deg); }
.faq-a { display: none; margin: 0; padding: 0 4px 22px; font-size: 15.5px; line-height: 1.7; color: var(--soft); }
.faq-item.open .faq-a { display: block; }

/* ============ insights (06) ============ */

.insights { padding: 78px 48px 30px; }
.insights-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 34px;
  flex-wrap: wrap;
  gap: 12px;
}
.insights-head .h2 { font-size: 38px; }
.insights .cols3 { gap: 18px; }
.insight {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 0 24px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.insight:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.insight:hover h3 { color: var(--accent-deep); }
.insight-bar { height: 5px; }
.insight-body { padding: 24px 24px 0; }
.insight-cat { margin-bottom: 16px; }
.insight h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  margin: 0 0 18px;
  line-height: 1.25;
  transition: color 0.15s ease;
  color: var(--ink);
}
.insight-date { font-size: 12px; color: var(--meta); letter-spacing: 0.08em; }

/* ============ CTA ============ */

.cta { padding: 60px 48px 84px; }
.cta-block {
  background: var(--panel);
  border-radius: 28px;
  padding: 74px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-wm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  opacity: 0.05;
  pointer-events: none;
}
.cta-glow {
  position: absolute;
  bottom: -140px;
  left: -70px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 155, 174, 0.4) 0%, rgba(27, 42, 51, 0) 70%);
}
.cta-block h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 48px;
  color: var(--panel-text);
  margin: 0 0 18px;
  position: relative;
  line-height: 1.06;
}
.cta-block p {
  color: var(--panel-muted);
  font-size: 16.5px;
  max-width: 460px;
  margin: 0 auto 32px;
  position: relative;
  line-height: 1.6;
}
.cta-block .pill { position: relative; }

/* ============ footer ============ */

.footer { padding: 10px 48px 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; align-items: start; }
.footer-brand .brand-lockup { gap: 10px; margin-bottom: 14px; }
.footer-brand .wordmark { font-size: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--soft); max-width: 250px; line-height: 1.6; }
.footer-col .eyebrow-txt { display: block; margin-bottom: 14px; }
.footer-col div:not(.eyebrow-txt),
.footer-col a { display: block; font-size: 13.5px; color: var(--slate); margin-bottom: 8px; }
.footer-col a { transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-brand .footer-copy { margin-top: 22px; font-size: 12.5px; color: var(--meta); }

/* ============ error pages ============ */

.err-page { min-height: 100vh; display: flex; flex-direction: column; }
.err-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 48px;
  overflow: hidden;
}
.err-wm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}
.err-wm.drift { animation: errDrift 16s ease-in-out infinite; }
@keyframes errDrift {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  50% { transform: translate(-50%, calc(-50% - 16px)) rotate(2deg); }
}
.err-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  width: 420px;
  height: 420px;
  margin-left: -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 155, 174, 0.18) 0%, rgba(247, 249, 250, 0) 70%);
  z-index: 0;
}
.err-inner { position: relative; z-index: 1; max-width: 680px; }
.err-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 200px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex;
  justify-content: center;
}
.err-num .zero { font-style: italic; color: var(--accent-deep); }
.fade { animation: fade 0.45s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.err-tag { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 22px 0 18px; }
.err-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 50px;
  line-height: 1.04;
  margin: 0 0 18px;
  color: var(--ink);
}
.err-body { font-size: 17.5px; line-height: 1.7; color: var(--soft); max-width: 480px; margin: 0 auto 36px; }
.err-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: center; }
.err-links {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.err-links-label {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--meta);
  font-weight: 600;
}
.err-links .navlink { font-size: 14px; }
.footer-slim { border-top: 1px solid var(--line); padding: 22px 48px; }
.footer-slim .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-slim .brand-lockup { gap: 10px; }
.footer-slim .wordmark { font-size: 13px; }

/* ============ responsive ============ */

@media (max-width: 900px) {
  .explorer-grid { grid-template-columns: 1fr; }
  .explorer-list { border-right: none; border-bottom: 1px solid var(--line); }
  .aud-panel { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .cols2, .cols3 { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none !important; }
  .nav-mobile { display: flex; }
  .hero-h1 { font-size: 46px; line-height: 1.02; }
  .sect { padding-left: 24px !important; padding-right: 24px !important; }
  .wm { opacity: 0.035; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 28px 22px; }
  .seg-control { display: flex; flex-direction: column; width: 100%; border-radius: 16px; }
  .seg-btn { width: 100%; }
}

@media (max-width: 720px) {
  .err-num { font-size: 120px; }
}

/* ============ reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  .intro-veil { display: none !important; }
  .rise, .fade, .detail-fade { animation: none; opacity: 1; transform: none; }
  .float, .drift, .marquee { animation: none; }
  .err-wm.drift { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  [data-theme], [data-theme] * { transition: none; }
}

/* ============ insights listing + article (detail) ============ */

/* turn the insight card into a real link without disturbing its look:
   grid blockifies the anchor; base `a` already handles color/decoration */
.insight { display: block; }

/* listing page header — same rhythm as the home #insights section */
.insights-lead {
  max-width: 620px;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
}

/* article shell — narrower measure than .wrap (1080) for readable prose */
.article { padding: 64px 0 24px; }
.article-head { max-width: 768px; margin: 0 auto; padding: 0 48px; }
.article-cat { color: var(--accent-deep); margin-bottom: 18px; display: block; }
.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 22px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--meta);
}
.article-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--meta); }
.article-rule { max-width: 768px; margin: 30px auto 0; padding: 0 48px; }
.article-rule .bar { height: 4px; border-radius: 2px; }

.article-body { max-width: 768px; margin: 0 auto; padding: 38px 48px 16px; }
.article-body p { font-size: 18px; line-height: 1.78; color: var(--soft); margin: 0 0 24px; }
.article-body > p.lede { font-size: 21px; line-height: 1.6; color: var(--ink); }
.article-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 29px;
  line-height: 1.22;
  color: var(--ink);
  margin: 48px 0 14px;
}
.article-body h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 32px 0 10px;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body ul { margin: 0 0 24px; padding: 0; list-style: none; }
.article-body li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--soft);
}
.article-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.article-body blockquote {
  margin: 34px 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  color: var(--ink);
}
.article-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.article-foot { max-width: 768px; margin: 8px auto 0; padding: 0 48px; }
.article-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); }
.article-back:hover { color: var(--ink); }

@media (max-width: 880px) {
  .article-head, .article-rule, .article-body, .article-foot {
    padding-left: 24px;
    padding-right: 24px;
  }
  .article-title { font-size: 34px; }
  .article-body > p.lede { font-size: 19px; }
}

/* ============ home insights rail (arrow-paged) ============ */
/* Progressive enhancement: the track keeps .cols3 as its base layout, so
   if this block (or the JS) fails to load, the cards fall back to the
   original 3-up grid rather than a broken stack. */
.insights-rail { position: relative; }
.insights-track.cols3 {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 16px;
  scrollbar-width: none; /* arrows drive it; hide the native bar */
}
.insights-track::-webkit-scrollbar { display: none; }
.insights-track > .insight,
.insights-track > .rail-viewall {
  flex: 0 0 calc((100% - 36px) / 3); /* three across, like the grid */
  scroll-snap-align: start;
}

/* discreet circular arrows in the site's button language */
/* minimal chevron — no chrome; a slate stroke that reads on white cards and
   dark paper alike, brightening to ink on hover, seated in the side gutter */
.rail-arrow {
  position: absolute;
  top: calc(50% + 3px);
  transform: translateY(-50%);
  width: 34px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--slate);
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, color 0.15s ease;
}
.rail-arrow svg { width: 22px; height: 22px; }
.rail-arrow:hover { color: var(--ink); }
.rail-arrow.show { opacity: 1; pointer-events: auto; }
.rail-arrow.show:disabled { opacity: 0.28; pointer-events: none; } /* dim at an end */
.rail-prev { left: -44px; } /* in the gutter, clear of the cards */
.rail-next { right: -44px; }
html:not(.js) .rail-arrow { display: none; }

/* trailing "view all" cell — present only when the archive exceeds the row */
.rail-viewall {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border: 1px dashed var(--sig);
  border-radius: 16px;
  padding: 0 26px;
  background: var(--softbg);
  color: var(--accent-deep);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
}
.rail-viewall:hover { border-color: var(--accent); }

/* the chevrons need a side gutter to sit in; below that, scroll/swipe instead */
@media (max-width: 1180px) {
  .rail-arrow { display: none; }
}
@media (max-width: 880px) {
  .insights-track > .insight,
  .insights-track > .rail-viewall { flex-basis: 82%; }
}

/* ============ skip the welcome veil on interaction ============ */
/* A quick curtain lift and immediate hero entrance, overriding the
   timed .intro choreography so a click/keypress skips the wait. */
html.intro-skip .intro-veil { animation: veilLift 0.45s var(--ease) both; }
html.intro-skip .rise { animation-delay: 0.05s !important; }
html.intro-skip .rise.d1 { animation-delay: 0.13s !important; }
html.intro-skip .rise.d2 { animation-delay: 0.21s !important; }
html.intro-skip .rise.d3 { animation-delay: 0.29s !important; }
