/* ============================================================
   Xelia Digital — Homepage
   Banking-grade, editorial, restrained. Serif display + sans body.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy:        #0F2B46;
  --navy-deep:   #0A1F33;
  --navy-darker: #081826;
  --accent:      #2E75B6;   /* steel-blue */
  --accent-bright:#3E8FD8;  /* bright highlight (tweakable) */
  --on-navy:     #CFE0F0;   /* light blue-white text on navy */
  --on-navy-dim: #8FA9C2;
  --paper:       #F7F8FA;
  --paper-2:     #EEF1F5;
  --ink:         #12222F;
  --ink-dim:     #4A5C6B;
  --hairline-d:  rgba(207,224,240,0.16);  /* hairline on dark */
  --hairline-l:  rgba(18,34,47,0.14);     /* hairline on light */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 80px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-y: 22px;     /* set to 0 when motion off */
  --reveal-dur: 0.85s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--accent-bright); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Type primitives ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.serif { font-family: var(--serif); }
.ital { font-style: italic; color: var(--accent-bright); }
.band--paper .ital { color: var(--accent); }

h1, h2, h3 { font-weight: 400; margin: 0; }

.h-display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.02;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.band { position: relative; padding-block: clamp(72px, 10vw, 140px); overflow: hidden; }
.band--dark  { background: var(--navy-deep); color: var(--on-navy); }
.band--navy  { background: var(--navy); color: var(--on-navy); }
.band--paper { background: var(--paper); color: var(--ink); }

/* faint grid + radial glow on dark bands */
.band--dark::before, .band--navy::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline-d) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-d) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 80% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 90% at 80% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}
.glow {
  position: absolute; pointer-events: none; z-index: 0;
  width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62,143,216,0.22) 0%, rgba(46,117,182,0.10) 35%, transparent 68%);
  filter: blur(8px);
}
.band > .wrap { position: relative; z-index: 1; }

/* ---------- Section header ---------- */
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0;
}
.band--dark .section-num, .band--navy .section-num { color: var(--accent-bright); }
.section-kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim);
}
.band--dark .section-kicker, .band--navy .section-kicker { color: var(--on-navy-dim); }
.hr { height: 1px; background: var(--hairline-l); border: 0; margin: 0; }
.band--dark .hr, .band--navy .hr { background: var(--hairline-d); }

/* ---------- Diamond mark ---------- */
.diamond { display: inline-block; vertical-align: middle; }
.diamond .d-out { fill: none; stroke: var(--accent-bright); }
.diamond .d-in  { fill: var(--accent-bright); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav.scrolled {
  background: rgba(10,31,51,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hairline-d);
}
.nav.scrolled .nav__inner { padding-block: 13px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__wordmark { font-family: var(--serif); font-size: 1.35rem; color: #fff; letter-spacing: -0.01em; }
.brand__wordmark b { font-weight: 500; }
.brand__sub { font-family: var(--sans); font-size: 10px; letter-spacing: 0.34em; color: var(--accent-bright); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__link {
  font-size: 14px; font-weight: 500; color: var(--on-navy);
  letter-spacing: 0.01em; position: relative; padding-block: 4px; white-space: nowrap;
  transition: color 0.25s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--accent-bright); transition: right 0.3s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after { right: 0; }
.nav__cta {
  font-size: 14px; font-weight: 600; color: var(--navy-deep); white-space: nowrap;
  background: var(--on-navy); padding: 10px 20px;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.nav__cta:hover { background: #fff; }
.nav__toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  padding: 15px 26px; cursor: pointer; border: 1px solid transparent;
  transition: background 0.28s var(--ease), color 0.28s, border-color 0.28s, transform 0.28s;
}
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--accent-bright); color: #fff; }
.btn--primary:hover { background: #5AA3E2; }
.btn--ghost-d { background: transparent; color: var(--on-navy); border-color: var(--hairline-d); }
.btn--ghost-d:hover { border-color: var(--accent-bright); color: #fff; }
.btn--ghost-l { background: transparent; color: var(--ink); border-color: var(--hairline-l); }
.btn--ghost-l:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding-top: 96px; padding-bottom: 56px; overflow: hidden; }
.hero > .wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; }
.hero .glow { top: -14%; right: -10%; }
.hero__diamond-bg {
  position: absolute; z-index: 0; pointer-events: none;
  right: clamp(-120px, -2vw, 0px); top: 50%; transform: translateY(-50%);
  width: min(46vw, 560px); opacity: 0.05;
}
.hero__diamond-bg .d-out { stroke: var(--on-navy); }
.hero__diamond-bg .d-in { fill: var(--on-navy); }

.hero__grid { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 48px; align-items: end; width: 100%; }
.hero__main { min-width: 0; }
.hero .eyebrow { color: var(--accent-bright); display: flex; align-items: center; gap: 12px; }
.hero .eyebrow::before { content:""; width: 28px; height:1px; background: var(--accent-bright); display:inline-block; }
.hero h1 {
  font-size: calc(clamp(2.7rem, 6.4vw, 5.6rem) * var(--hero-scale, 1));
  margin: 26px 0 0;
  max-width: 16ch;
}

/* tweak: hide hero meta rail */
body.no-rail .hero__grid { grid-template-columns: 1fr; }
body.no-rail .hero__rail { display: none; }

/* tweak: grid texture off */
[data-grid="off"] .band--dark::before,
[data-grid="off"] .band--navy::before { display: none; }
.hero__sub {
  margin: 30px 0 0; max-width: 52ch; font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  color: var(--on-navy); line-height: 1.62;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* right meta rail */
.hero__rail { border-left: 1px solid var(--hairline-d); padding-left: 24px; padding-bottom: 8px; }
.hero__rail dl { margin: 0; display: grid; gap: 20px; }
.hero__rail dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-navy-dim); font-weight: 600; }
.hero__rail dd { margin: 5px 0 0; font-family: var(--serif); font-size: 1.05rem; color: var(--on-navy); line-height: 1.3; }

/* client strip */
.clients { margin-top: clamp(48px, 7vh, 88px); }
.clients__label { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-navy-dim); font-weight: 600; }
.clients__row {
  margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(22px, 4vw, 56px); border-top: 1px solid var(--hairline-d); padding-top: 22px;
}
.client {
  font-family: var(--serif); font-size: clamp(1.05rem, 1.8vw, 1.5rem); color: var(--on-navy);
  opacity: 0.62; letter-spacing: 0.01em; transition: opacity 0.3s, color 0.3s; cursor: default;
}
.client:hover { opacity: 1; color: #fff; }

/* scroll hint */
.scroll-hint { position: absolute; bottom: 24px; left: var(--pad); display: flex; align-items: center; gap: 10px; z-index: 1; color: var(--on-navy-dim); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.scroll-hint .line { width: 1px; height: 38px; background: var(--hairline-d); position: relative; overflow: hidden; }
.scroll-hint .line::after { content:""; position:absolute; left:0; top:-50%; width:1px; height:50%; background: var(--accent-bright); animation: drop 2.4s var(--ease) infinite; }
@keyframes drop { 0%{transform:translateY(-100%)} 60%,100%{transform:translateY(300%)} }

/* ============================================================
   STATEMENT
   ============================================================ */
.statement__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 90px); align-items: stretch; }
.statement__text { align-self: center; }
.statement__figure { margin: 0; align-self: stretch; min-height: 380px; background: var(--navy-deep); overflow: hidden; }
.statement__figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.statement .lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 1.12; letter-spacing: -0.015em;
  max-width: 15ch; margin: 0;
}
.statement__aside { max-width: 48ch; }
.statement__body { margin: 0; max-width: 52ch; color: var(--ink-dim); font-size: clamp(1.02rem,1.4vw,1.18rem); }
.statement__kicker { margin: 32px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.stakes { list-style: none; margin: 16px 0 0; padding: 0; }
.stakes li { display: flex; align-items: center; gap: 16px; padding: 15px 0; border-top: 1px solid var(--hairline-l); font-family: var(--serif); font-size: clamp(1.15rem,1.6vw,1.45rem); color: var(--ink); letter-spacing: -0.01em; }
.stakes li::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ============================================================
   01 — THE MODEL
   ============================================================ */
.model__intro { max-width: 70ch; }
.model__intro .section-title { max-width: 28ch; }
.model__intro p { margin: 22px 0 0; color: var(--ink-dim); max-width: 66ch; font-size: 1.08rem; }
.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px); }
.model-col { position: relative; padding-top: 28px; border-top: 1px solid var(--hairline-l); }
.model-col__tag { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.model-col h3 { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 14px 0 0; letter-spacing: -0.01em; }
.model-col p { margin: 14px 0 0; color: var(--ink-dim); }
.model-col ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; }
.model-col li { padding: 14px 0; border-top: 1px solid var(--hairline-l); display: flex; align-items: center; gap: 14px; font-size: 0.98rem; }
.model-col li::before { content:""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ============================================================
   02 — SERVICES (dark)
   ============================================================ */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hairline-d); border: 1px solid var(--hairline-d); margin-top: clamp(32px,4vw,52px); }
.service-card {
  background: var(--navy-deep); padding: clamp(28px, 3vw, 44px);
  position: relative; transition: background 0.4s var(--ease);
  display: flex; flex-direction: column;
}
.service-card:hover { background: var(--navy); }
.service-card__num { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--accent-bright); }
.service-card h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.85rem); margin: 18px 0 0; letter-spacing: -0.01em; color: #fff; }
.service-card p { margin: 16px 0 0; color: var(--on-navy); font-size: 1rem; max-width: 46ch; }
.service-card__tags { margin: 28px 0 0; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--hairline-d); display: flex; flex-wrap: wrap; gap: 8px; }
.service-card .tag { font-size: 12px; letter-spacing: 0.03em; color: var(--on-navy-dim); border: 1px solid var(--hairline-d); padding: 6px 11px; white-space: nowrap; transition: border-color 0.3s, color 0.3s; }
.service-card:hover .tag { border-color: rgba(207,224,240,0.30); color: var(--on-navy); }

/* ============================================================
   03 — WHY (paper)
   ============================================================ */
.pillar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 3.5vw, 56px); margin-top: clamp(36px,4vw,56px); }
.pillar { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.pillar__n { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--accent); width: 1.6ch; }
.pillar h3 { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -0.01em; }
.pillar p { margin: 12px 0 0; color: var(--ink-dim); font-size: 1rem; }
.pillar .proof { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline-l); font-size: 0.92rem; color: var(--ink); }
.pillar .proof b { font-weight: 600; color: var(--accent); }

/* ============================================================
   04 — ABOUT (dark)
   ============================================================ */
.about-grid { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: clamp(36px, 5vw, 76px); align-items: start; }
.about__col { min-width: 0; }
.about h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; max-width: 16ch; }
.about__body p { margin: 22px 0 0; color: var(--on-navy); }
.about__body b { color: #fff; font-weight: 600; }
.creds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.cred { font-size: 12px; letter-spacing: 0.06em; padding: 7px 13px; border: 1px solid var(--hairline-d); color: var(--on-navy-dim); white-space: nowrap; }

/* portrait */
.about__portrait { margin: 0; }
.about__portrait-frame { display: block; position: relative; overflow: hidden; border: 1px solid var(--hairline-d); background: var(--navy-darker); }
.about__portrait-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -90px 80px -40px rgba(8,24,38,0.85); }
.about__portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1363 / 2048; object-fit: cover; transition: filter 0.4s var(--ease); }
.about__portrait figcaption { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline-d); display: flex; flex-direction: column; gap: 3px; }
.about__name { font-family: var(--serif); font-size: 1.25rem; color: #fff; letter-spacing: -0.01em; }
.about__role { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-bright); }

/* portrait tone treatments (Tweak-controlled) */
.about__portrait img { filter: saturate(0.62) contrast(1.05) brightness(0.97); }
[data-portrait="natural"] .about__portrait img { filter: contrast(1.03) saturate(0.96); }
[data-portrait="muted"] .about__portrait img { filter: saturate(0.62) contrast(1.05) brightness(0.97); }
[data-portrait="duo"] .about__portrait img { filter: grayscale(1) contrast(1.06) brightness(1.0); }
[data-portrait="duo"] .about__portrait-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(170deg, rgba(46,117,182,0.30) 0%, rgba(10,31,51,0.55) 100%); mix-blend-mode: multiply; }

.stats { display: grid; gap: 0; }
.stats--row { grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--hairline-d); }
.stats--row .stat { padding: 30px clamp(22px, 2.6vw, 40px); border-top: 0; border-left: 1px solid var(--hairline-d); }
.stats--row .stat:first-child { border-left: 0; padding-left: 0; }
.stat { padding: 26px 0; border-top: 1px solid var(--hairline-d); }
.stats--row .stat:last-child { border-bottom: 0; }
.stat:last-child { border-bottom: 1px solid var(--hairline-d); }
.stat__n { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: #fff; letter-spacing: -0.02em; }
.stat__n .u { color: var(--accent-bright); font-size: 0.5em; }
.stat__l { margin-top: 10px; font-size: 0.95rem; color: var(--on-navy-dim); max-width: 30ch; }

/* ============================================================
   05 — CASE STUDY (paper)
   ============================================================ */
.case__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: baseline; }
.case__flag { font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-dim); }
.case__flag b { color: var(--accent); font-weight: 600; }
.case__link { color: var(--accent); font-weight: 600; font-size: 14px; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .25s; }
.case__link:hover { color: var(--accent-bright); }
.case h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; max-width: 22ch; margin-top: 22px; }
.case__intro { margin: 24px 0 0; color: var(--ink-dim); max-width: 64ch; font-size: 1.08rem; }
.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hairline-l); border: 1px solid var(--hairline-l); margin: clamp(40px,5vw,60px) 0; }
.cstat { background: var(--paper); padding: 26px clamp(18px,2vw,28px); }
.cstat__n { font-family: var(--serif); font-size: clamp(1.7rem, 2.8vw, 2.4rem); color: var(--navy); line-height: 1; letter-spacing: -0.01em; }
.cstat__l { margin-top: 12px; font-size: 0.86rem; color: var(--ink-dim); line-height: 1.4; }
.cao-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(24px,3vw,44px); }
.cao { padding-top: 22px; border-top: 1px solid var(--hairline-l); }
.cao h4 { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.cao p { margin: 14px 0 0; color: var(--ink-dim); font-size: 0.98rem; }
.case__foot { margin-top: clamp(34px,4vw,52px); display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--hairline-l); }
.case__stack { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-dim); }
.case__stack b { color: var(--ink); font-weight: 600; }
.case__led { font-size: 0.95rem; color: var(--ink-dim); }
.case__led b { color: var(--ink); font-weight: 600; }

/* ============================================================
   CONTACT (deep navy)
   ============================================================ */
.contact { text-align: left; overflow: hidden; }
.contact .glow { bottom: -30%; left: 30%; }
.contact h2 { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -0.02em; max-width: 18ch; }
.contact p { margin: 26px 0 0; color: var(--on-navy); max-width: 52ch; font-size: 1.12rem; }
.contact__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-darker); color: var(--on-navy-dim); padding-block: 56px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer__meta { font-size: 13.5px; line-height: 1.9; }
.footer__meta a { color: var(--on-navy); border-bottom: 1px solid var(--hairline-d); }
.footer__meta a:hover { color: #fff; }
.footer__bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--hairline-d); font-size: 12.5px; color: var(--on-navy-dim); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }

/* ============================================================
   CONTACT MODAL / FORM
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8,24,38,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.35s var(--ease); }
.modal.open .modal__backdrop { opacity: 1; }
.modal__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(540px, calc(100vw - 40px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--paper); color: var(--ink); padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 40px 100px -20px rgba(8,24,38,0.6); border-top: 3px solid var(--accent-bright);
  opacity: 0; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.modal.open .modal__panel { opacity: 1; transform: translate(-50%, -50%); }
.modal__close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; color: var(--ink-dim); display: flex; align-items: center; justify-content: center; transition: color 0.25s, transform 0.25s; }
.modal__close:hover { color: var(--ink); transform: rotate(90deg); }
.modal__panel .eyebrow { color: var(--accent); display: flex; align-items: center; gap: 12px; }
.modal__panel .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); display: inline-block; }
.modal__panel h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.08; letter-spacing: -0.015em; margin: 18px 0 0; }
.modal__sub { margin: 14px 0 0; color: var(--ink-dim); font-size: 1rem; }
#contactForm { margin-top: 26px; display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.field input, .field textarea { font-family: var(--sans); font-size: 1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--hairline-l); padding: 10px 2px; transition: border-color 0.25s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #9AA9B6; }
.field.invalid input, .field.invalid textarea { border-bottom-color: #C0492F; }
.field__err { font-size: 12px; color: #C0492F; display: none; }
.field.invalid .field__err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#contactForm .btn { width: 100%; justify-content: center; margin-top: 4px; }
.form__error { font-size: 13px; color: #C0492F; margin: 0; text-align: center; min-height: 1px; }
.modal__legal { font-size: 12px; color: var(--ink-dim); margin: 0; text-align: center; }
.modal__success { text-align: center; padding: 14px 0 4px; }
.modal__check { width: 62px; height: 62px; border-radius: 50%; background: rgba(46,117,182,0.12); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.modal__success h3 { font-family: var(--serif); font-weight: 400; font-size: 1.65rem; margin: 0; letter-spacing: -0.01em; }
.modal__success p { color: var(--ink-dim); margin: 12px 0 26px; }
body.modal-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .modal__backdrop, .modal__panel { transition: opacity 0.2s; } .modal__close:hover { transform: none; } }

/* ============================================================
   MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(var(--reveal-y)); transition: opacity var(--reveal-dur) var(--ease), transform var(--reveal-dur) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint .line::after { animation: none; }
}
[data-motion="off"] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
[data-motion="off"] .scroll-hint { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__rail { border-left: 0; border-top: 1px solid var(--hairline-d); padding-left: 0; padding-top: 24px; }
  .hero__rail dl { grid-template-columns: 1fr 1fr; }
  .model-grid, .about-grid { grid-template-columns: 1fr; }
  .statement__grid { grid-template-columns: 1fr; gap: 30px; }
  .statement__figure { min-height: 280px; max-height: 360px; }
  .about__portrait { position: static; max-width: 340px; }
  .about__col { margin-top: 8px; }
  .stats--row { grid-template-columns: 1fr; margin-top: clamp(36px,5vw,56px); }
  .stats--row .stat { padding: 24px 0; border-left: 0; border-top: 1px solid var(--hairline-d); }
  .stats--row .stat:first-child { padding-top: 24px; }
  .service-grid, .pillar-grid { grid-template-columns: 1fr; }
  .case-stats { grid-template-columns: repeat(2,1fr); }
  .cao-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__links.open { display: flex; position: fixed; top: 0; right: 0; height: 100dvh; width: min(82vw, 320px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; background: var(--navy-deep); padding: 40px; border-left: 1px solid var(--hairline-d); box-shadow: -24px 0 60px rgba(0,0,0,0.45); z-index: 100; overflow-y: auto; }
  .nav__toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; z-index: 101; }
  .nav__toggle span { width: 24px; height: 2px; background: var(--on-navy); transition: 0.3s; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .scroll-hint { display: none; }
  .hero__rail dl { grid-template-columns: 1fr; }
}
