/* ═══════════════════════════ TOKENS ═══════════════════════════ */
:root{
  --paper:#EDE7D9;
  --paper-2:#E4DCC8;
  --ink:#0B1220;
  --ink-2:#070C18;
  --blue:#2B54C8;
  --blue-light:#7FA0FF;
  --blue-deep:#16264F;
  --orange:#DA5A2A;
  --line:rgba(20,30,60,.16);
  --line-dark:rgba(160,180,255,.14);
  --label:'Outfit',system-ui,sans-serif;
  --serif:'Fauna One',Georgia,serif;
  --sans:'Inter',system-ui,sans-serif;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:auto}
html,body{overscroll-behavior:none}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--serif);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
body.locked{overflow:hidden;height:100vh}
img,video{display:block;max-width:none}
a{color:inherit;text-decoration:none}
::selection{background:var(--blue);color:var(--paper)}
em{font-family:'Raleway',var(--serif);font-style:italic;font-weight:500}

.mono{font-family:var(--label);font-weight:500;font-size:10.5px;letter-spacing:.24em;text-transform:uppercase}
.mono-dim{color:rgba(11,18,32,.52)}

/* ═══════════════════════════ CHROME ═══════════════════════════ */
#progressline{position:fixed;top:0;left:0;right:0;height:2px;z-index:120;pointer-events:none}
#progressline i{display:block;height:100%;background:var(--blue);transform-origin:0 50%;transform:scaleX(0)}

header#site-head{
  position:fixed;top:0;left:0;right:0;z-index:110;
  display:flex;justify-content:space-between;align-items:center;
  padding:22px 34px;mix-blend-mode:difference;color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.4); /* black is identity under difference; carries Safari's video-blend bug */
  opacity:0;pointer-events:none;visibility:hidden;transition:opacity .8s ease;
}
header#site-head.on{opacity:1;pointer-events:auto;visibility:visible}
#site-head .brand{font-family:var(--serif);font-size:22px;letter-spacing:.02em;line-height:1}
#site-head .brand sup{font-family:var(--label);font-size:8px;letter-spacing:.2em;vertical-align:super}
#site-head nav{display:flex;gap:26px}
#site-head nav a{font-family:var(--label);font-weight:500;font-size:10px;letter-spacing:.24em;text-transform:uppercase;opacity:.75;transition:opacity .3s}
#site-head nav a:hover{opacity:1}
@media(max-width:860px){#site-head nav a:not(.keep){display:none}}

/* grain */
#grain{position:fixed;inset:0;z-index:105;pointer-events:none;opacity:.05;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ═══════════════════════════ ACT 0–II · THE STORY (one pin, no seams) ═══════════════════════════ */
#act-story{position:relative;height:100vh;overflow:hidden;background:#dfd8c6;z-index:4}
#act-story video,#blueprint-hold{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#blueprint-hold{opacity:0;filter:brightness(.94)}
#intro-video{filter:brightness(1.04)}
#dive-video,#build-video{opacity:0}

/* loader HUD */
#loader-hud{position:absolute;left:34px;bottom:30px;z-index:8;color:var(--ink)}
#loader-hud .row{display:flex;align-items:baseline;gap:14px}
#loader-hud .pct{font-family:var(--serif);font-size:40px;line-height:1}
#loader-bar{width:210px;height:1px;background:rgba(11,18,32,.2);margin-top:10px}
#loader-bar i{display:block;height:1px;background:var(--ink);transform-origin:0 50%;transform:scaleX(0)}
#loader-file{margin-top:8px;opacity:.5;min-height:14px}

/* hero typographic overlay */
#hero-overlay{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;pointer-events:none}
#hero-kicker{color:var(--blue);margin-bottom:22px;opacity:0}
#hero-title{font-size:clamp(32px,7vw,122px);line-height:1.04;font-weight:400;color:var(--ink)}
#hero-title em{color:var(--blue)}
#hero-title .w{display:inline-block;overflow:hidden;vertical-align:bottom}
#hero-title .w>span{display:inline-block;transform:translateY(112%)}
#hero-sub{margin-top:26px;color:rgba(11,18,32,.62);opacity:0}
#hero-cue{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:8px;opacity:0}
#hero-cue .linev{width:1px;height:44px;background:rgba(11,18,32,.25);position:relative;overflow:hidden}
#hero-cue .linev i{position:absolute;left:0;top:-40%;width:1px;height:40%;background:var(--ink);animation:cue 1.8s cubic-bezier(.65,0,.35,1) infinite}
@keyframes cue{to{top:120%}}

/* blueprint corner annotations */
.anno{position:absolute;z-index:5;font-family:var(--label);font-weight:500;font-size:9.5px;letter-spacing:.2em;color:var(--blue);opacity:0;text-transform:uppercase}
.anno::before{content:"";position:absolute;left:-14px;top:50%;width:8px;height:1px;background:var(--blue)}
#anno-1{top:96px;left:36px}
#anno-2{top:96px;right:36px;text-align:right}
#anno-2::before{left:auto;right:-14px}
#anno-3{bottom:96px;left:36px}
#anno-4{bottom:120px;right:36px;text-align:right}
#anno-4::before{left:auto;right:-14px}

/* drafting tools — big, physical, present. Hidden until the hero sets the table */
.tool{position:absolute;z-index:6;opacity:0;will-change:transform;filter:drop-shadow(0 18px 26px rgba(11,18,32,.28));pointer-events:none}
#tool-coffee{top:2vh;right:4vw;width:clamp(150px,19vw,360px)}
#tool-square{left:-5vw;bottom:14vh;width:clamp(190px,23vw,430px)}
#tool-ruler{left:16vw;bottom:-9vh;width:clamp(200px,24vw,440px);transform:rotate(38deg)}
#tool-pen{right:2vw;bottom:8vh;width:clamp(150px,17vw,320px);transform:rotate(64deg)}

/* scrub overlays */
.scrub-phrase{position:absolute;z-index:5;left:50%;top:14%;transform:translateX(-50%);text-align:center;color:#fff;
  font-size:clamp(30px,4.6vw,68px);line-height:1.12;width:min(90vw,1000px);opacity:0;text-shadow:0 2px 30px rgba(0,0,0,.25)}
#build-day{position:absolute;right:36px;bottom:34px;z-index:5;color:#fff;text-align:right;mix-blend-mode:difference;opacity:0;
  text-shadow:0 1px 4px rgba(0,0,0,.55),0 2px 24px rgba(0,0,0,.35)}
#build-day .d{font-family:var(--serif);font-size:clamp(36px,4.6vw,64px);line-height:1}
#build-phase{position:absolute;left:36px;bottom:40px;z-index:5;color:#fff;mix-blend-mode:difference;opacity:0;
  text-shadow:0 1px 4px rgba(0,0,0,.55)}
#build-phase .chip{display:inline-block;border:1px solid rgba(255,255,255,.5);padding:8px 14px;background:rgba(0,0,0,.35)}

/* ═══════════════════════════ ACT III — TWICE DRAWN (slides in beneath the story) ═══════════════════════════ */
#act-split{position:relative;height:100vh;overflow:hidden;background:var(--paper);z-index:2;margin-top:-100vh}
#split-fullhouse{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2}
#split-house-wrap{position:absolute;inset:0;z-index:3;will-change:transform}
#split-house-wrap img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#split-left{position:absolute;top:0;bottom:0;left:0;width:50%;background:var(--ink-2);z-index:4;transform:translateX(-101%);overflow:hidden}
#split-ink{position:absolute;top:50%;left:50%;width:150%;transform:translate(-50%,-50%);opacity:0;will-change:transform,opacity;
  filter:brightness(2.4) saturate(1.2) drop-shadow(0 0 22px rgba(74,120,255,.32))}
#split-midline{position:absolute;top:0;bottom:0;left:50%;width:1px;z-index:8;background:var(--ink);transform:scaleY(0);transform-origin:50% 0}
#split-midline::after{content:"+";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  font-family:var(--label);font-size:14px;color:var(--paper);background:var(--ink);width:26px;height:26px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.fig-label{position:absolute;bottom:40px;z-index:6;opacity:0}
#fig-a{left:8%;color:var(--blue-light)}
#fig-b{right:8%;color:rgba(11,18,32,.6);text-align:right}

/* belts — text lives up top; the houses stay glorious below */
.belt-col{position:absolute;top:0;bottom:0;width:50%;overflow:hidden;z-index:5;opacity:0;pointer-events:none}
#beltcol-l{left:0}
#beltcol-r{right:0}
.belt{position:absolute;left:0;right:0;top:0;will-change:transform}
.cell{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:13vh 6vw 0;gap:16px;text-align:center}
.cell h2{font-weight:400;font-size:clamp(24px,3vw,48px);line-height:1.14}
#beltcol-l .cell{color:var(--paper)}
#beltcol-l .cell .mono{color:var(--blue-light)}
#beltcol-l .cell h2 em{color:var(--blue-light)}
#beltcol-r .cell{color:var(--ink)}
#beltcol-r .cell .mono{color:rgba(11,18,32,.5)}
#beltcol-r .cell h2 em{color:var(--orange)}

/* split mobile fallback */
#split-mobile{display:none}
@media(max-width:779px){
  #act-split{display:none}
  #split-mobile{display:block;background:var(--paper)}
  .pair-card{display:grid;grid-template-rows:1fr 1fr;min-height:88vh}
  .pair-card .half{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;text-align:center;padding:40px 8vw}
  .pair-card .half.dark{background:var(--ink-2);color:var(--paper)}
  .pair-card .half.dark .mono{color:var(--blue-light)}
  .pair-card .half.dark h2 em{color:var(--blue-light)}
  .pair-card .half h2{font-weight:400;font-size:clamp(24px,6.4vw,38px);line-height:1.14}
  .pair-card .half h2 em{color:var(--orange)}
  .pair-card .half .mono{color:rgba(11,18,32,.5)}
}

/* ═══════════════════════════ CRAFT ═══════════════════════════ */
#craft{background:var(--paper);padding:16vh 6vw 10vh;position:relative}
#craft .kicker{color:var(--blue);margin-bottom:10px}
#craft h3{font-size:clamp(34px,4.6vw,72px);font-weight:400;line-height:1.08;margin-bottom:9vh}
#craft h3 em{color:var(--blue)}
.svc{display:grid;grid-template-columns:80px 1fr 1.1fr auto;gap:3vw;align-items:baseline;
  padding:34px 18px;border-top:1px solid var(--line);cursor:default;position:relative;overflow:hidden}
.svc:last-of-type{border-bottom:1px solid var(--line)}
/* on hover the whole row becomes the photograph — cyanotype-tinted, darkened for the text */
.svc .svc-photo{position:absolute;inset:0;z-index:0;opacity:0;transition:opacity .55s cubic-bezier(.65,0,.35,1);
  background-size:cover;background-position:center 35%;pointer-events:none;
  filter:sepia(1) saturate(1.7) hue-rotate(185deg) brightness(.52) contrast(1.05)}
.svc:hover .svc-photo,.svc.is-hover .svc-photo{opacity:1}
.svc>*:not(.svc-photo){position:relative;z-index:1;transition:color .4s ease}
.svc .num{font-family:var(--label);font-weight:500;font-size:11px;color:var(--blue)}
.svc .name{font-size:clamp(24px,2.7vw,40px);line-height:1}
.svc .desc{font-family:var(--sans);font-size:13px;line-height:1.75;color:rgba(11,18,32,.62)}
.svc .arrow{font-family:var(--label);font-size:14px;color:var(--blue);transform:translateX(-8px);opacity:0;transition:all .4s}
.svc:hover .arrow,.svc.is-hover .arrow{transform:none;opacity:1;color:var(--paper)}
.svc:hover .num,.svc.is-hover .num{color:var(--blue-light)}
.svc:hover .name,.svc.is-hover .name{color:var(--paper)}
.svc:hover .desc,.svc.is-hover .desc{color:rgba(237,231,217,.85)}
@media(max-width:860px){.svc{grid-template-columns:44px 1fr;grid-template-rows:auto auto}.svc .desc{grid-column:2}.svc .arrow{display:none}}

#stats{display:grid;grid-template-columns:repeat(4,1fr);gap:2vw;margin-top:12vh}
@media(max-width:860px){#stats{grid-template-columns:repeat(2,1fr);gap:6vw}}
.stat .v{font-size:clamp(38px,5vw,80px);line-height:1;color:var(--ink)}
.stat .v i{font-style:normal}
.stat .l{margin-top:10px;color:rgba(11,18,32,.55)}

/* ═══════════════════════════ FAMILY — full-bleed window ═══════════════════════════ */
#family{background:var(--paper);position:relative;padding:10vh 0 12vh;text-align:center}
#family .kicker{color:var(--blue)}
#family h3{font-size:clamp(30px,4.2vw,64px);font-weight:400;line-height:1.18;margin:16px auto 7vh;width:min(92vw,940px)}
#family h3 em{color:var(--orange)}
#family-window{position:relative;margin:0 auto;width:100vw;height:min(92vh,900px);overflow:hidden;
  clip-path:polygon(50% 0%, 64% 9%, 64% 3.5%, 71% 3.5%, 71% 13.5%, 96% 30%, 100% 33%, 100% 100%, 0% 100%, 0% 33%, 4% 30%);}
#family-window img{position:absolute;left:50%;top:0;height:150%;width:auto;min-width:100%;object-fit:cover;transform:translateX(-50%);will-change:transform}
#family-caption{margin-top:5vh;color:rgba(11,18,32,.55)}
@media(max-width:779px){#family-window{height:120vw}}

/* ═══════════════════════════ SKYLINE FINALE — the last page ═══════════════════════════
   Full-bleed, full color, no seams: the background holds the empty site; the city rises
   ONLY inside the cutout-buildings mask, driven by the cursor. No clip wipe — no edge.
   The letters live ABOVE everything — never in the back, always readable. */
#skyline{position:relative;height:100vh;overflow:hidden;background:var(--paper)}
#sky-back,#sky-front-v{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#sky-title{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;text-align:center;pointer-events:none}
/* No backdrop-filter here. These sit over the finale film, whose pixels change with
   the cursor, so a live blur would re-rasterise the region every frame. A flat scrim
   reads the same and costs nothing. */
#sky-title .kicker{color:#fff;background:rgba(7,12,24,.72);padding:8px 16px}
#sky-title h3{font-size:clamp(46px,8.6vw,150px);font-weight:400;line-height:1;color:var(--ink);
  text-shadow:0 1px 4px rgba(237,231,217,.85),0 2px 34px rgba(255,255,255,.6)}
#sky-cta{pointer-events:auto;margin-top:16px;display:inline-block;border:1.5px solid var(--ink);color:var(--ink);padding:20px 44px;border-radius:999px;
  font-family:var(--label);font-weight:600;font-size:12px;letter-spacing:.3em;text-transform:uppercase;
  background:rgba(237,231,217,.62);transition:background .35s,color .35s,transform .35s}
#sky-cta:hover{background:var(--ink);color:var(--paper);transform:translateY(-2px)}
#sky-front{position:absolute;inset:0;z-index:4;pointer-events:none}
#sky-front-v{
  -webkit-mask-image:url("assets/skyline-cutout.webp");mask-image:url("assets/skyline-cutout.webp");
  -webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}

/* keyboard focus must stay visible */
a:focus-visible,button:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:2px}
#site-head a:focus-visible{outline-color:#fff}

/* static fallback — the page must work even if the animation CDN never arrives */
body.static #hero-title .w>span{transform:none}
body.static #hero-kicker,body.static #hero-sub,body.static .anno,body.static #hero-cue,body.static .tool{opacity:1}
body.static #blueprint-hold{opacity:1}
body.static #loader-hud{display:none}
body.static #act-split{display:none}
body.static #split-mobile{display:block}

/* reduced motion */
@media(prefers-reduced-motion:reduce){
  #hero-cue .linev i{animation:none}
}
