/* =========================================================
   XTRAPP — Websites for the Legal Profession
   Design system: "Case Files"
   Authority navy + brand blue gradient + restrained gold seal
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --brand-1: #0F5F96;
  --brand-2: #1B69B3;
  --brand-3: #0E87CF;
  --brand-4: #2B9DE1;
  --gradient: linear-gradient(100deg, #0F5F96 0%, #1B69B3 34%, #0E87CF 66%, #2B9DE1 100%);
  --gradient-soft: linear-gradient(100deg, rgba(15,95,150,.12), rgba(43,157,225,.12));

  /* Ink / navy */
  --ink: #0A1B2E;
  --ink-2: #0E2540;
  --ink-3: #12314f;

  /* Gold seal (premium accent, used sparingly) */
  --gold: #C9A44E;
  --gold-soft: #E7D3A1;

  /* Light surfaces */
  --paper: #F6F9FC;
  --paper-2: #EDF3F9;
  --surface: #FFFFFF;
  --fg: #0E1D2E;
  --fg-2: #33475C;
  --muted: #5C7185;
  --border: #DCE6F0;
  --border-strong: #C4D4E4;

  /* On-dark */
  --on-dark: #EAF2FA;
  --on-dark-2: #A9BFD4;
  --on-dark-muted: #7E96AE;
  --border-dark: rgba(255,255,255,.12);
  --border-dark-strong: rgba(255,255,255,.20);

  /* Feedback */
  --danger: #D6453B;
  --success: #1E9E6A;

  /* Type */
  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;

  /* Spacing scale (4/8) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(10,27,46,.06), 0 1px 3px rgba(10,27,46,.05);
  --shadow-md: 0 8px 24px -8px rgba(10,27,46,.16), 0 2px 6px rgba(10,27,46,.06);
  --shadow-lg: 0 30px 60px -20px rgba(10,27,46,.28), 0 10px 24px -12px rgba(10,27,46,.16);
  --shadow-brand: 0 16px 40px -14px rgba(15,95,150,.5);

  /* Layout */
  --container: 1200px;
  --nav-h: 76px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .3s;

  --z-nav: 100;
  --z-menu: 200;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
::selection { background: rgba(43,157,225,.24); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  z-index: 1000;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--brand-4);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  min-height: 46px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  will-change: transform;
  touch-action: manipulation;
}
.btn svg { flex: none; }
.btn--lg { padding: 16px 28px; min-height: 54px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.btn--primary {
  color: #fff;
  background-image: var(--gradient);
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 22px 48px -14px rgba(15,95,150,.6);
}
.btn--primary:active { transform: translateY(0); }

.btn--outline {
  color: var(--on-dark);
  border: 1.5px solid var(--border-dark-strong);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
}
.btn--outline:hover {
  border-color: var(--brand-4);
  background: rgba(43,157,225,.12);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--fg-2);
  padding: 10px 14px;
  min-height: 42px;
  border: 1.5px solid transparent;
}
.btn--ghost:hover { color: var(--brand-1); background: var(--paper-2); }

.btn__spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s var(--ease);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  width: 100%;
}
.nav__logo { height: 26px; width: auto; }
/* Logo starts white-friendly on dark hero; we invert via filter when needed */
.nav[data-state="top"] .nav__logo { filter: brightness(0) invert(1); }
.nav[data-state="scrolled"] { background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--border), var(--shadow-sm); }
.nav[data-state="scrolled"] .nav__logo { filter: none; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.nav__links a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-dark-2);
  border-radius: var(--r-full);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--brand-4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { transform: scaleX(1); }
.nav[data-state="scrolled"] .nav__links a { color: var(--fg-2); }
.nav[data-state="scrolled"] .nav__links a:hover { color: var(--brand-1); background: var(--paper-2); }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav[data-state="top"] .nav__phone { color: var(--on-dark-2); }
.nav[data-state="top"] .nav__phone:hover { color: #fff; background: rgba(255,255,255,.08); }

.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle span {
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav[data-state="top"] .nav__toggle { color: #fff; }
.nav[data-state="scrolled"] .nav__toggle { color: var(--ink); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.nav__mobile {
  position: absolute;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--s-4) clamp(20px,5vw,48px) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav__mobile a {
  padding: 14px 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border: none; margin-top: var(--s-4); }
.nav__mobile .btn { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + var(--s-5)) 0 var(--s-7);
  color: var(--on-dark);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 70% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 30%, #000 30%, transparent 78%);
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  will-change: transform;
}
.hero__orb--1 {
  width: 620px; height: 620px;
  top: -180px; right: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(43,157,225,.55), rgba(14,135,207,.28) 45%, transparent 70%);
}
.hero__orb--2 {
  width: 480px; height: 480px;
  bottom: -220px; left: -140px;
  background: radial-gradient(circle at 60% 40%, rgba(15,95,150,.5), rgba(27,105,179,.22) 50%, transparent 72%);
}
.hero__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(5,14,24,.55) 100%),
    linear-gradient(180deg, transparent 60%, rgba(5,13,22,.6) 100%);
}

.hero__inner { position: relative; max-width: 880px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-full);
  background: rgba(255,255,255,.03);
  margin-bottom: var(--s-5);
}
.hero__eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-4);
  box-shadow: 0 0 0 4px rgba(43,157,225,.22);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(43,157,225,.22); }
  50% { box-shadow: 0 0 0 8px rgba(43,157,225,.04); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin-bottom: var(--s-4);
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title em {
  font-style: italic;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  color: var(--on-dark-2);
  max-width: 58ch;
  margin-bottom: var(--s-5);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: var(--s-5); }

.hero__scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--brand-4), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--brand-4);
  animation: scrolldot 2s var(--ease) infinite;
}
@keyframes scrolldot {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ---------- Trust marquee ---------- */
.trust {
  background: var(--ink-2);
  color: var(--on-dark);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--border-dark);
  overflow: hidden;
}
.trust__label {
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: var(--s-4);
}
.marquee {
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  width: max-content;
  animation: marquee 34s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-style: italic;
  color: var(--on-dark-2);
  white-space: nowrap;
}
.marquee__track .sep { color: var(--brand-4); font-style: normal; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section__head { max-width: 720px; margin-bottom: var(--s-8); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__index {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-1);
  margin-bottom: var(--s-4);
  position: relative;
  padding-left: 30px;
}
.section__index::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 22px; height: 1.5px;
  background: var(--gold);
}
.section__head--center .section__index { padding-left: 0; }
.section__head--center .section__index::before { display: none; }
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--fg);
}
.section__lead {
  margin-top: var(--s-4);
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 60ch;
}
.section__head--center .section__lead { margin-inline: auto; }
.section__lead a { color: var(--brand-1); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Stats ---------- */
.stats {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding: clamp(40px, 6vw, 72px) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
}
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: "";
  position: absolute; right: calc(var(--s-6) / -2); top: 10%;
  height: 80%; width: 1px;
  background: var(--border);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__num span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { margin-top: var(--s-3); font-size: 14.5px; color: var(--muted); }

/* ---------- Services ---------- */
.services { background: var(--paper); }

/* ---------- Work / Case files ---------- */
.work { background: var(--ink); color: var(--on-dark); }
.work .section__title { color: #fff; }
.work .section__lead { color: var(--on-dark-2); }
.work .section__index { color: var(--brand-4); }

.cases { display: flex; flex-direction: column; gap: var(--s-6); }
.case {
  display: grid;
  grid-template-columns: 210px 1fr 230px;
  grid-template-areas: "meta body art";
  gap: var(--s-6) var(--s-7);
  align-items: center;
  padding: var(--s-7);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--border-dark);
  border-radius: var(--r-lg);
  transition: transform .4s var(--ease-out), border-color .4s var(--ease), background-color .4s var(--ease);
}
.case:hover { transform: translateY(-4px); border-color: var(--border-dark-strong); }
.case__meta { grid-area: meta; }
.case__body { grid-area: body; }
.case__art  { grid-area: art; }
/* Reverse: art moves to the left, body keeps the wide column, meta to the right rail */
.case--reverse {
  grid-template-columns: 230px 1fr 210px;
  grid-template-areas: "art body meta";
}
.case--reverse .case__meta { align-items: flex-end; text-align: right; }

.case__meta { display: flex; flex-direction: column; gap: 6px; }
.case__exhibit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold-soft);
}
.case__area {
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.case__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: var(--s-3);
}
.case__desc { color: var(--on-dark-2); font-size: 15.5px; margin-bottom: var(--s-5); max-width: 52ch; }
.case__stats { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.case__stats li { display: flex; flex-direction: column; }
.case__stats strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--brand-4);
  font-variant-numeric: tabular-nums;
}
.case__stats span { font-size: 12.5px; color: var(--on-dark-muted); letter-spacing: .04em; }

.case__art {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-dark);
}
.case__art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.case:hover .case__art img { transform: scale(1.05); }
/* Overlay: adds depth + a subtle brand tint so all three photos read cohesively */
.case__art::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,27,46,0) 45%, rgba(10,27,46,.5) 100%),
    linear-gradient(125deg, rgba(15,95,150,.16), rgba(43,157,225,.05));
  pointer-events: none;
}
/* Gradient fallback shown only if an image fails to load */
.case__art--a { background: linear-gradient(135deg, #0F5F96, #2B9DE1); }
.case__art--b { background: linear-gradient(135deg, #12314f, #0E87CF); }
.case__art--c { background: linear-gradient(135deg, #0A1B2E, #1B69B3); }

/* ---------- Process timeline ---------- */
.process { background: var(--paper); }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  counter-reset: step;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 34px; left: 8%; right: 8%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
  z-index: 1;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease);
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step__no {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: var(--s-5);
  box-shadow: var(--shadow-brand);
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: var(--s-2);
}
.step p { color: var(--muted); font-size: 15px; margin-bottom: var(--s-4); }
.step__time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-1);
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--gradient-soft);
}

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq__grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.faq .section__head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 32px); }
.accordion { display: flex; flex-direction: column; gap: var(--s-3); }
.acc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.acc[data-open] { border-color: var(--brand-3); box-shadow: var(--shadow-md); }
.acc__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5);
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--fg);
}
.acc__q svg { flex: none; color: var(--brand-1); transition: transform .35s var(--ease-out); }
.acc[data-open] .acc__q svg { transform: rotate(135deg); }
.acc__a { overflow: hidden; height: 0; }
.acc__a p { padding: 0 var(--s-5) var(--s-5); color: var(--muted); font-size: 15.5px; max-width: 62ch; }

/* ---------- Book / CTA ---------- */
.book { background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.book::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(15,95,150,.4), transparent 45%),
    radial-gradient(circle at 88% 80%, rgba(43,157,225,.28), transparent 45%);
}
.book__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.book__index { color: var(--brand-4); }
.book__index::before { background: var(--gold); }
.book__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: #fff;
  margin: var(--s-4) 0 var(--s-4);
}
.book__lead { color: var(--on-dark-2); font-size: 1.1rem; margin-bottom: var(--s-6); max-width: 48ch; }
.book__perks { display: grid; gap: var(--s-3); }
.book__perks li { display: flex; align-items: center; gap: 12px; color: var(--on-dark); font-size: 15.5px; }
.book__perks svg { flex: none; color: var(--brand-4); }

.book__form {
  background: rgba(255,255,255,.98);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-lg);
  color: var(--fg);
  position: relative;
}
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg-2); margin-bottom: 7px; }
.field label span { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  min-height: 48px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 15px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-3);
  box-shadow: 0 0 0 4px rgba(43,157,225,.16);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field--row > div { margin: 0; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(214,69,59,.14);
}
.field__error {
  display: block;
  min-height: 0;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 5px;
}
.book__note { margin-top: var(--s-3); font-size: 12.5px; color: var(--muted); text-align: center; }
.book__form .btn { margin-top: var(--s-2); }

.book__success {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-6);
  gap: var(--s-3);
}
.book__success svg {
  width: 56px; height: 56px;
  padding: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
}
.book__success h3 { font-family: var(--font-display); font-size: 1.6rem; }
.book__success p { color: var(--muted); max-width: 34ch; }

/* ---------- Footer ---------- */
.footer { background: #061420; color: var(--on-dark-2); padding: var(--s-9) 0 var(--s-6); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--border-dark);
}
.footer__brand img { height: 30px; width: auto; margin-bottom: var(--s-4); }
.footer__brand p { font-size: 14.5px; max-width: 34ch; color: var(--on-dark-muted); }
.footer__col h4, .footer__cta h4 {
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 14.5px; color: var(--on-dark-muted); transition: color .2s var(--ease); width: fit-content; }
.footer__col a:hover { color: var(--brand-4); }
.footer__cta .btn { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-top: var(--s-5);
  font-size: 12.5px;
  color: var(--on-dark-muted);
}
.footer__fine { opacity: .8; }

/* =========================================================
   Repositioning: new sections & components
   ========================================================= */

/* Hero micro-copy line */
.hero__micro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-dark);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--on-dark-2);
}
.hero__micro svg { color: var(--gold); flex: none; }
.dot-sep { color: var(--brand-4); opacity: .7; }

/* Outline button for light surfaces */
.btn--outline-dark {
  color: var(--fg);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
}
.btn--outline-dark:hover {
  border-color: var(--brand-3);
  color: var(--brand-1);
  background: var(--paper-2);
  transform: translateY(-2px);
}

/* ---------- Quote strip (below hero) ---------- */
.quotestrip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: clamp(44px, 7vw, 76px) 0;
}
.quotestrip__inner { max-width: 900px; margin-inline: auto; text-align: center; }
.quotestrip__mark { width: 40px; height: 40px; color: var(--brand-3); opacity: .45; margin: 0 auto var(--s-4); }
.quotestrip__quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--fg);
}
.quotestrip__quote::before { content: "\201C"; }
.quotestrip__quote::after { content: "\201D"; }
.quotestrip__who {
  margin-top: var(--s-5);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.quotestrip__loc { display: inline-flex; align-items: center; gap: 12px; color: var(--brand-1); }
.quotestrip__loc::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ---------- Problem section (dark, urgent) ---------- */
.problem {
  background: var(--ink);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.problem__grid { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.problem__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.problem .section__index { color: var(--brand-4); }
.problem__head { position: sticky; top: calc(var(--nav-h) + 32px); }
.problem__head .section__title { color: #fff; }
.problem__body { display: grid; gap: var(--s-4); }
.problem__body p { color: var(--on-dark-2); font-size: 1.1rem; }
.problem__body strong { color: #fff; font-weight: 600; }
.problem__body em { color: var(--on-dark); }
.problem__kicker {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem !important;
  line-height: 1.3;
  color: #fff !important;
}

/* ---------- Solution section (light) ---------- */
.solution { background: var(--paper); }
.solution__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.solution__intro .btn { margin-top: var(--s-6); color: #fff; }
.solution__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md);
}
.solution__card-label {
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-1);
  font-weight: 600;
  margin-bottom: var(--s-5);
}
.checklist { display: grid; gap: var(--s-4); }
.checklist li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.02rem; color: var(--fg-2); }
.checklist svg {
  flex: none;
  width: 26px; height: 26px;
  padding: 4px;
  color: #fff;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 5px 12px -4px rgba(15,95,150,.5);
}

/* ---------- Founder ---------- */
.founder {
  background: var(--ink);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.founder::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 18% 25%, rgba(15,95,150,.3), transparent 42%),
    radial-gradient(circle at 92% 90%, rgba(43,157,225,.16), transparent 45%);
}
.founder__inner {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 960px;
  margin-inline: auto;
}
.founder__photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-dark-strong);
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(43,157,225,.06);
}
.founder__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* pull the warm selfie toward the cool brand palette */
  filter: saturate(.82) contrast(1.05) brightness(1.02);
}
.founder__photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(158deg, rgba(43,157,225,.14), transparent 40%, rgba(10,27,46,.42));
  pointer-events: none;
}
.founder__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-4);
  margin-bottom: var(--s-4);
}
.founder__eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--gold); }
.founder__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 6px;
}
.founder__role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: var(--s-5);
}
.founder__line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--on-dark);
  max-width: 32ch;
  margin-bottom: var(--s-6);
}
.founder__cta { color: var(--on-dark); }

/* ---------- Services tiers ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.tier:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tier--featured {
  background: var(--ink);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px) scale(1.02);
}
.tier--featured:hover { transform: translateY(-12px) scale(1.02); }
.tier__flag {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--gradient);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 15px;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-brand);
  white-space: nowrap;
}
.tier__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.tier__name { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; color: var(--fg); }
.tier__badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 5px 11px;
  border-radius: var(--r-full);
  background: var(--gradient-soft);
  color: var(--brand-1);
  white-space: nowrap;
}
.tier__desc { color: var(--muted); font-size: 15.5px; }
.tier__list {
  display: grid;
  gap: 12px;
  padding-top: var(--s-4);
  margin-top: 2px;
  border-top: 1px solid var(--border);
}
.tier__list li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg-2); }
.tier__list svg { flex: none; color: var(--brand-2); }
.tier .btn { margin-top: auto; }
.tier--featured .tier__name { color: #fff; }
.tier--featured .tier__desc { color: var(--on-dark-2); }
.tier--featured .tier__badge { background: rgba(255,255,255,.08); color: var(--on-dark-2); }
.tier--featured .tier__list { border-color: var(--border-dark); }
.tier--featured .tier__list li { color: var(--on-dark); }
.tier--featured .tier__list svg { color: var(--brand-4); }

/* ---------- Why us bento ---------- */
.whyus { background: var(--ink); color: var(--on-dark); }
.whyus .section__title { color: #fff; }
.whyus .section__lead { color: var(--on-dark-2); }
.whyus .section__index { color: var(--brand-4); }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(196px, auto);
  gap: var(--s-4);
}
.bento__cell {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--border-dark);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform .4s var(--ease-out), border-color .4s var(--ease), background-color .4s var(--ease);
}
.bento__cell:hover {
  transform: translateY(-4px);
  border-color: var(--border-dark-strong);
  background: linear-gradient(180deg, rgba(43,157,225,.1), rgba(255,255,255,.02));
}
.bento__cell--feature {
  grid-row: span 2;
  background: linear-gradient(150deg, rgba(15,95,150,.3), rgba(43,157,225,.08) 55%, rgba(255,255,255,.02));
  border-color: var(--border-dark-strong);
}
.bento__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: rgba(43,157,225,.12);
  color: var(--brand-4);
  margin-bottom: var(--s-5);
}
.bento__icon svg { width: 26px; height: 26px; }
.bento__cell--feature .bento__icon {
  width: 64px; height: 64px;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.bento__cell--feature .bento__icon svg { width: 32px; height: 32px; }
.bento__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: var(--s-3);
}
.bento__cell--feature .bento__title { font-size: clamp(1.7rem, 2.6vw, 2.1rem); margin-top: auto; }
.bento__text { color: var(--on-dark-2); font-size: 15.5px; }
.bento__cell--feature .bento__text { font-size: 1.05rem; max-width: 42ch; }

/* Book direct-contact line */
.book__contact { margin-top: var(--s-5); font-size: 14.5px; color: var(--on-dark-2); }
.book__contact a { color: var(--brand-4); font-weight: 600; }
.book__contact a:hover { text-decoration: underline; }

/* =========================================================
   Reveal animation states (JS-driven; CSS fallback safe)
   ========================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); }
.js-ready [data-reveal] { will-change: transform, opacity; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* When JS is off, show everything */
.no-js [data-reveal],
.no-js [data-hero],
.no-js [data-hero-line] { opacity: 1 !important; transform: none !important; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
  .case,
  .case--reverse {
    grid-template-columns: 1fr 200px;
    grid-template-areas:
      "meta meta"
      "body art";
  }
  .case__meta,
  .case--reverse .case__meta {
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    gap: var(--s-4);
  }
  .problem__inner { grid-template-columns: 1fr; gap: var(--s-6); }
  .problem__head { position: static; }
  .solution__grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__cell--feature { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 860px) {
  .nav__links, .nav__phone { display: none; }
  .nav__toggle { display: flex; }
  .founder__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .founder__photo { width: 168px; }
  .founder__eyebrow { justify-content: center; }
  .founder__line { margin-inline: auto; }
  .faq__grid { grid-template-columns: 1fr; }
  .faq .section__head { position: static; }
  .book__inner { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-7) var(--s-4); }
  .stat:nth-child(2)::after { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .tiers { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .tier--featured { transform: none; }
  .tier--featured:hover { transform: translateY(-6px); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .timeline { grid-template-columns: 1fr; }
  .case,
  .case--reverse {
    grid-template-columns: 1fr;
    grid-template-areas: "meta" "body" "art";
    padding: var(--s-5);
  }
  .case__art { max-width: 120px; }
  .case__meta,
  .case--reverse .case__meta { flex-direction: column; align-items: flex-start; text-align: left; gap: 4px; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat::after { display: none !important; }
  .field--row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .footer__bottom { flex-direction: column; }
  .hero__scroll { display: none; } /* avoid overlap with proof row on short/tall-content screens */
  .bento { grid-template-columns: 1fr; }
  .bento__cell--feature { grid-row: auto; }
  .quotestrip__who { flex-direction: column; gap: 8px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal], [data-hero], [data-hero-line] { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
  .hero__scroll { display: none; }
}
