/* ============================================================
   FALCON FINSERV — main.css
   Institutional light. Navy type, hairline rules, no ornament.
   ============================================================ */

:root{
  /* ground */
  --bg:#F6F7F9;
  --bg-alt:#FFFFFF;
  --bg-sunk:#EDF0F4;

  /* ink */
  --ink:#0F1E38;
  --ink-2:#55627A;
  --ink-3:#66717F;   /* darkened: #8B95A7 failed WCAG AA (3.0:1) on small text */

  /* rules */
  --line:rgba(15,30,56,.14);
  --line-2:rgba(15,30,56,.08);

  /* accents — one navy, one blue, one teal. Nothing else. */
  --navy:#0F1E38;
  --blue:#2A55A8;
  --teal:#0F6E62;

  --serif:"Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
  --sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter:clamp(20px, 5vw, 84px);
  --rail-w:0px;
  --maxw:1280px;
  --ease:cubic-bezier(.22,1,.36,1);
  --shadow:0 1px 2px rgba(15,30,56,.04), 0 8px 24px rgba(15,30,56,.06);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--sans); font-weight:400;
  font-size:clamp(15px,1.02vw,16.5px); line-height:1.62;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,svg{display:block; max-width:100%}
a{color:inherit; text-decoration:none}
em{font-style:normal; color:var(--blue)}
strong{font-weight:600}
::selection{background:rgba(42,85,168,.16)}

/* ── WEBGL FIELD ─────────────────────────────────────────── */
#field{position:fixed; inset:0; z-index:0; pointer-events:none;
  background:var(--bg); transition:opacity .8s var(--ease);
}
#gl{width:100%; height:100%; display:block}
/* soft page-coloured vignette so the diagram dissolves into the page */
.field-veil{position:absolute; inset:0;
  background:radial-gradient(84% 72% at 50% 50%, transparent 52%,
    rgba(246,247,249,.42) 82%, rgba(246,247,249,.92) 100%);
}
body.past-journey #field{opacity:0}

/* ── HEADER ──────────────────────────────────────────────── */
.site-head{
  position:fixed; top:0; left:0; right:0; z-index:60;
  display:flex; align-items:center; justify-content:space-between;
  padding:20px var(--gutter);
  border-bottom:1px solid transparent;
  transition:background .4s var(--ease), border-color .4s var(--ease),
             backdrop-filter .4s var(--ease);
}
.site-head.is-solid{
  background:rgba(246,247,249,.86);
  backdrop-filter:blur(12px) saturate(1.2); -webkit-backdrop-filter:blur(12px) saturate(1.2);
  border-bottom-color:var(--line-2);
}
.brand{display:flex; align-items:center; gap:11px}
.brand-mark{width:24px; height:24px; color:var(--navy)}
.brand-name{font-weight:650; font-size:13.5px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--navy)}
.brand-thin{font-weight:400; color:var(--ink-2); margin-left:.5em}
.head-nav{display:flex; align-items:center; gap:clamp(14px,2vw,32px);
  font-size:12.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--ink-2)}
.head-nav a{transition:color .3s var(--ease)}
.head-nav a:hover{color:var(--navy)}
.btn-ghost{border:1px solid var(--line); border-radius:2px; padding:9px 18px;
  color:var(--navy)!important; font-weight:500; background:var(--bg-alt)}
.btn-ghost:hover{border-color:var(--navy); background:var(--navy); color:#fff!important}
@media(max-width:760px){ .head-nav a:not(.btn-ghost){display:none} }

/* ── PROGRESS RAIL ───────────────────────────────────────── */
.rail{position:fixed; right:var(--gutter); top:50%; transform:translateY(-50%);
  z-index:55; display:flex; gap:16px; opacity:0; pointer-events:none;
  transition:opacity .6s var(--ease)}
body.in-journey .rail{opacity:1}
.rail::before{content:""; position:absolute; inset:-28px -30px -28px -44px; z-index:-1;
  background:radial-gradient(70% 58% at 74% 50%, rgba(246,247,249,.94), rgba(246,247,249,0) 76%);
}
.rail-line{position:relative; width:1px; background:var(--line); }
.rail-fill{position:absolute; top:0; left:0; width:100%; height:0%; background:var(--navy)}
.rail-steps{list-style:none; margin:0; padding:0; display:flex; flex-direction:column;
  justify-content:space-between; height:216px}
.rail-steps li{display:flex; align-items:center; gap:11px;
  font-family:var(--mono); font-size:10px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink-3); transition:color .4s var(--ease)}
.rail-steps li i{width:5px; height:5px; border:1px solid currentColor; border-radius:50%;
  transition:background .4s var(--ease), border-color .4s var(--ease)}
.rail-steps li.on{color:var(--navy)}
.rail-steps li.on i{background:var(--blue); border-color:var(--blue)}
@media(max-width:900px){ .rail{display:none} }

/* ── FIXED NARRATIVE PANELS ──────────────────────────────── */
#panels{position:fixed; inset:0; z-index:20; pointer-events:none}
body.past-journey #panels{visibility:hidden}
.panel{
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center;
  padding:0 var(--gutter); visibility:hidden;
}
.panel.is-live{visibility:visible}
.panel::before{content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(54% 58% at var(--sx,50%) 50%, rgba(246,247,249,.90),
    rgba(246,247,249,.58) 56%, rgba(246,247,249,0) 80%);
}
.panel > *{position:relative; will-change:transform,opacity}
.panel[data-align="center"]{align-items:center; text-align:center; --sx:50%}
.panel[data-align="left"]{align-items:flex-start; --sx:26%}
.panel[data-align="right"]{align-items:flex-end; text-align:right; --sx:74%}
.panel[data-align="bottom"]{justify-content:flex-end; align-items:center; text-align:center;
  padding-bottom:clamp(56px,11vh,130px); --sx:50%;
  background:linear-gradient(0deg, rgba(246,247,249,.96) 0%, rgba(246,247,249,.68) 36%, rgba(246,247,249,0) 64%)}
.panel > *{max-width:min(600px, 50vw)}
.panel[data-align="bottom"] > *{max-width:min(860px, 82vw)}
.panel[data-align="center"] > *{max-width:min(720px, 86vw)}

/* keep copy clear of the fixed progress rail */
@media(min-width:901px){ :root{ --rail-w:136px } }
.panel[data-align="right"]{ padding-right:calc(var(--gutter) + var(--rail-w)) }
.panel[data-align="center"],
.panel[data-align="bottom"]{
  padding-left:calc(var(--gutter) + var(--rail-w));
  padding-right:calc(var(--gutter) + var(--rail-w));
}

.eyebrow{font-family:var(--mono); font-size:10.5px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--ink-2); margin:0 0 20px; display:flex; align-items:center; gap:9px}
.panel[data-align="right"] .eyebrow{justify-content:flex-end}
.panel[data-align="center"] .eyebrow,.panel[data-align="bottom"] .eyebrow{justify-content:center}
.eyebrow .dot{width:5px; height:5px; background:var(--blue)}
.idx{font-family:var(--mono); font-size:10.5px; letter-spacing:.18em; color:var(--ink-3); margin:0 0 8px}

.display{
  font-family:var(--serif); font-weight:600;
  font-size:clamp(34px, 4.8vw, 72px); line-height:1.06; letter-spacing:-.016em;
  margin:0 0 22px; text-wrap:balance; color:var(--navy);
}
.panel[data-panel="3"] .display{font-size:clamp(28px,3.5vw,52px); line-height:1.12}
.lede{font-size:clamp(14.5px,1.08vw,17px); color:var(--ink-2); margin:0; max-width:52ch; line-height:1.68}
.panel[data-align="right"] .lede{margin-left:auto}
.panel[data-align="center"] .lede,.panel[data-align="bottom"] .lede{margin:0 auto}

.hint{margin-top:52px; font-family:var(--mono); font-size:10px; letter-spacing:.2em;
  text-transform:uppercase; color:var(--ink-3); display:flex; align-items:center; gap:12px}
.hint-line{width:40px; height:1px; background:var(--ink-3); opacity:.5;
  animation:sweep 2.8s var(--ease) infinite}
@keyframes sweep{0%{transform:translateX(-5px);opacity:.25}50%{opacity:.8}100%{transform:translateX(5px);opacity:.25}}

.chiprow{list-style:none; margin:28px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end}
.chiprow li{border:1px solid var(--line); border-radius:2px; padding:6px 14px; background:var(--bg-alt);
  font-size:11.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--ink-2)}

.ticklist{list-style:none; margin:30px 0 0; padding:0; counter-reset:t; width:100%; max-width:400px}
.ticklist li{counter-increment:t; display:flex; align-items:baseline; gap:16px;
  padding:11px 0; border-top:1px solid var(--line-2); font-size:14.5px; color:var(--navy); font-weight:450}
.ticklist li::before{content:"0" counter(t); font-family:var(--mono); font-size:10px;
  letter-spacing:.12em; color:var(--ink-3); min-width:20px}

.domainlist{list-style:none; margin:28px 0 0; padding:0; display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; width:100%; max-width:440px}
.domainlist li{padding:9px 0; border-top:1px solid var(--line-2);
  font-size:13.5px; color:var(--navy); font-weight:450; display:flex; align-items:center; gap:9px}
.domainlist li::before{content:""; width:4px; height:4px; background:var(--teal); flex:none}

.stamp{margin:26px 0 0; font-family:var(--mono); font-size:10.5px; letter-spacing:.2em;
  text-transform:uppercase; color:var(--ink-2); display:inline-flex; align-items:center; gap:11px}
.stamp .inf{font-family:var(--serif); font-size:22px; color:var(--blue); letter-spacing:0}

@media(max-width:900px){
  .panel{align-items:flex-start!important; text-align:left!important; justify-content:flex-end;
    padding-bottom:9vh}
  .panel > *{max-width:100%!important}
  .panel[data-align="right"] .lede,.panel[data-align="center"] .lede{margin:0}
  .panel .eyebrow{justify-content:flex-start!important}
  .chiprow{justify-content:flex-start}
  .panel::before{background:linear-gradient(0deg, rgba(246,247,249,.97) 0%, rgba(246,247,249,.72) 44%, rgba(246,247,249,0) 74%)}
  .display{font-size:clamp(31px,8.4vw,46px)}
  .panel[data-panel="3"] .display{font-size:clamp(26px,7vw,38px)}
}

/* ── JOURNEY SCROLL SPACE ────────────────────────────────── */
#journey{height:620vh; position:relative; z-index:1}

/* ── OUTRO ───────────────────────────────────────────────── */
#outro{position:relative; z-index:10; background:var(--bg)}
.sec{max-width:var(--maxw); margin:0 auto; padding:clamp(84px,12vh,160px) var(--gutter)}
/* Full-bleed bands. The content column is centred with padding rather than
   `> * { margin-inline: auto }` — a child margin shorthand would silently
   reset those auto margins and drag the child to the left edge. */
.sec-lead,.sec-engine,.sec-cta{
  max-width:none;
  padding-inline:max(var(--gutter), calc((100% - var(--maxw)) / 2));
}
.sec-head{margin-bottom:clamp(40px,5.5vh,72px); max-width:880px}
.sec-head .eyebrow{margin-bottom:16px}
.h-lg{font-family:var(--serif); font-weight:600; font-size:clamp(30px,3.9vw,56px);
  line-height:1.1; letter-spacing:-.018em; margin:0; text-wrap:balance; color:var(--navy)}
.h-xl{font-family:var(--serif); font-weight:600; font-size:clamp(33px,4.6vw,66px);
  line-height:1.08; letter-spacing:-.018em; margin:0 0 22px; text-wrap:balance; color:var(--navy)}
.sec-sub{color:var(--ink-2); max-width:62ch; margin:20px 0 0}
.sec-lead{background:var(--bg-alt); border-bottom:1px solid var(--line-2)}
.lead-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(24px,4vw,60px); margin-top:40px}
.lead-grid p{color:var(--ink-2); margin:0}
.lead-grid strong{color:var(--navy)}
@media(max-width:820px){ .lead-grid{grid-template-columns:1fr} }

/* cards */
.cards{display:grid; gap:0; border:1px solid var(--line-2); background:var(--bg-alt)}
.cards-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.cards-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.card{padding:clamp(22px,2.2vw,34px); position:relative;
  border-right:1px solid var(--line-2); transition:background .35s var(--ease)}
.card:last-child{border-right:0}
.card::after{content:""; position:absolute; left:-1px; top:-1px; height:2px; width:0;
  background:var(--blue); transition:width .5s var(--ease)}
.card:hover{background:var(--bg)}
.card:hover::after{width:calc(100% + 2px)}
.card-i{font-family:var(--mono); font-size:10px; letter-spacing:.16em; color:var(--ink-3)}
.card h3{font-family:var(--serif); font-weight:600; font-size:clamp(18px,1.5vw,23px);
  line-height:1.2; margin:14px 0 11px; letter-spacing:-.008em; color:var(--navy)}
.card p{margin:0; font-size:13.5px; color:var(--ink-2); line-height:1.62}
.card-dom::after{background:var(--teal)}
@media(max-width:1080px){
  .cards-5,.cards-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card{border-bottom:1px solid var(--line-2)}
  .card:nth-child(2n){border-right:0}
}
@media(max-width:640px){
  .cards-5,.cards-3{grid-template-columns:1fr}
  .card{border-right:0}
}

/* engine */
.sec-engine{background:var(--bg-alt); border-block:1px solid var(--line-2)}
.engine-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(24px,3vw,56px)}
.engine-col{border-top:2px solid var(--navy); padding-top:22px}
.engine-n{font-family:var(--mono); font-size:11px; letter-spacing:.18em; color:var(--blue)}
.engine-col h3{font-family:var(--serif); font-weight:600; font-size:21px; margin:12px 0 10px; color:var(--navy)}
.engine-col p{margin:0; color:var(--ink-2); font-size:14px}
@media(max-width:820px){ .engine-grid{grid-template-columns:1fr} }

.schematic{margin:clamp(52px,7vh,100px) 0 0; padding:clamp(20px,3vw,44px);
  border:1px solid var(--line-2); background:var(--bg)}
.schematic svg{width:100%; height:auto; overflow:visible}
.sch-in path,.sch-out path{fill:none; stroke:var(--blue); stroke-width:1; opacity:.55;
  stroke-dasharray:1400; stroke-dashoffset:1400}
.sch-out path{stroke:var(--teal)}
.sch-nodes circle{fill:var(--navy)}
.sch-box{fill:var(--bg-alt); stroke:var(--navy); stroke-width:1}
.sch-t{font-family:var(--mono); font-size:15px; letter-spacing:.16em; fill:var(--navy)}
.sch-inf{font-family:var(--serif); font-size:30px; fill:var(--blue)}
.sch-lab text{font-family:var(--mono); font-size:14px; letter-spacing:.08em; fill:var(--ink-2)}
.sch-src text{font-family:var(--mono); font-size:13px; letter-spacing:.1em; fill:var(--ink-3)}
.sch-gate line{stroke:var(--teal); stroke-width:1; stroke-dasharray:3 5; opacity:.55}
.sch-gate text{font-family:var(--mono); font-size:12px; letter-spacing:.2em; fill:var(--teal)}
.schematic figcaption{margin-top:24px; font-size:12.5px; color:var(--ink-3); max-width:60ch}
/* The diagram has a legibility floor — below ~800px its labels shrink into
   illegibility, so it scrolls inside its own frame instead of scaling down.
   `.is-scrollable` is set from JS by measuring, not by guessing a breakpoint. */
.schematic{overflow-x:auto; -webkit-overflow-scrolling:touch}
.schematic svg{min-width:800px}
.schematic:focus-visible{outline:2px solid var(--blue); outline-offset:3px}

/* steps */
.steps{list-style:none; margin:0; padding:0; display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--line-2); background:var(--bg-alt)}
.steps li{padding:clamp(24px,2.4vw,36px); border-right:1px solid var(--line-2);
  border-bottom:1px solid var(--line-2)}
.steps li:nth-child(3n){border-right:0}
.steps li:nth-last-child(-n+3){border-bottom:0}
.step-n{font-family:var(--mono); font-size:10.5px; letter-spacing:.18em; color:var(--blue)}
.steps h3{font-family:var(--serif); font-weight:600; font-size:21px; margin:12px 0 9px; color:var(--navy)}
.steps p{margin:0; font-size:13.5px; color:var(--ink-2)}
@media(max-width:900px){
  .steps{grid-template-columns:1fr 1fr}
  .steps li:nth-child(3n){border-right:1px solid var(--line-2)}
  .steps li:nth-child(2n){border-right:0}
  .steps li:nth-last-child(-n+3){border-bottom:1px solid var(--line-2)}
  .steps li:nth-last-child(-n+2){border-bottom:0}
}
@media(max-width:600px){
  .steps{grid-template-columns:1fr}
  .steps li{border-right:0!important; border-bottom:1px solid var(--line-2)!important}
  .steps li:last-child{border-bottom:0!important}
}

/* CTA */
.sec-cta{text-align:center; padding-top:clamp(100px,15vh,190px); padding-bottom:clamp(84px,12vh,160px);
  background:var(--bg-sunk); border-top:1px solid var(--line-2)}
.sec-cta .eyebrow{justify-content:center}
.cta-sub{color:var(--ink-2); max-width:56ch; margin:0 auto 38px}
.cta-actions{display:flex; gap:14px; justify-content:center; flex-wrap:wrap}
.btn-primary{background:var(--navy); color:#fff; font-weight:500; font-size:14px;
  padding:15px 32px; border-radius:2px; transition:background .3s var(--ease)}
.btn-primary:hover{background:var(--blue)}
.btn-line{border:1px solid var(--line); background:var(--bg-alt); border-radius:2px;
  padding:15px 28px; font-size:14px; color:var(--ink-2);
  display:inline-flex; align-items:center; gap:10px; transition:.3s var(--ease)}
.btn-line:hover{border-color:var(--navy); color:var(--navy)}
.btn-line .loop{display:inline-block; transition:transform .6s var(--ease)}
.btn-line:hover .loop{transform:rotate(360deg)}
/* sits on --bg-sunk, which is darker than the page — needs --ink-2 to hold AA */
.cta-note{margin:30px 0 0; font-family:var(--mono); font-size:10px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-2)}

/* footer */
.site-foot{max-width:var(--maxw); margin:0 auto; padding:40px var(--gutter) 52px;
  border-top:1px solid var(--line-2); display:flex; justify-content:space-between;
  gap:32px; flex-wrap:wrap; align-items:flex-end}
.site-foot p{margin:8px 0 0; font-size:12.5px; color:var(--ink-3); max-width:46ch}
.foot-r{text-align:right}
.foot-c{margin-top:12px!important}
@media(max-width:700px){ .foot-r{text-align:left} }

/* reveal */
.js-on .reveal{opacity:0; transform:translateY(22px)}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms!important; animation-iteration-count:1!important}
  .js-on .reveal{opacity:1; transform:none}
}

/* ============================================================
   MOBILE HARDENING
   ============================================================ */

/* 1. Labels: 10–11.5px mono is fine on a desktop monitor, too small on a phone. */
@media(max-width:900px){
  .eyebrow,.idx{font-size:11.5px; letter-spacing:.18em}
  .chiprow li{font-size:12px}
  .hint{font-size:11px; margin-top:40px}
  .stamp{font-size:11.5px}
  .card-i,.step-n,.engine-n{font-size:11px}
  .cta-note{font-size:11px}
  .site-foot p{font-size:13px}
}

/* 2. Tap targets: the header links were 24px and 40px tall. */
@media(max-width:900px){
  .site-head{padding:12px var(--gutter)}
  .brand{min-height:44px; align-items:center}
  .btn-ghost{min-height:44px; display:inline-flex; align-items:center; padding:0 20px}
}

/* 3. Short viewports — landscape phones especially. The narrative panels are
      position:fixed and deliberately not scrollable, so anything that doesn't
      fit is simply lost. Tighten type and reflow the lists instead of clipping. */
@media(max-height:700px) and (max-width:1100px){
  .panel{padding-bottom:6vh}
  .display{font-size:clamp(24px,5.2vw,34px)}
  .panel[data-panel="3"] .display{font-size:clamp(22px,4.6vw,30px)}
  .lede{font-size:13.5px; line-height:1.55}
  .eyebrow{margin-bottom:12px}
  .ticklist{margin-top:18px}
  .ticklist li,.domainlist li{padding:7px 0; font-size:13px}
  .chiprow{margin-top:18px}
  .hint{margin-top:24px}
}
@media(max-height:560px){
  /* landscape phones: reflow the lists and compress vertical rhythm so the
     copy still clears the fixed header instead of tucking under it */
  .panel{padding-bottom:4vh}
  .ticklist{max-width:none; display:grid; grid-template-columns:1fr 1fr;
    column-gap:24px; margin-top:12px}
  .domainlist{max-width:none; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:14px}
  .ticklist li,.domainlist li{padding:5px 0}
  .display{font-size:clamp(22px,4.4vw,29px); margin-bottom:10px}
  .lede{font-size:13px; line-height:1.45}
  .eyebrow{margin-bottom:8px}
  .chiprow{margin-top:12px}
  .stamp{margin-top:14px}
  .hint{display:none}
}

/* 4. Tell people the diagram scrolls — only when it actually does. */
.schematic.is-scrollable::after{content:"Scroll the diagram horizontally →";
  display:block; margin-top:14px;
  font-family:var(--mono); font-size:11px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-3)}
