/* ════════════════════════════════════════════════════════════════
   THEME · FOCUS  — the optical-instrument direction
   Loads on top of style.css. The mark becomes a living aperture;
   sections focus-lock on view; one red scan sweep; hairline-lit
   depth; a barely-there instrument grid. Restrained, precise.
   ════════════════════════════════════════════════════════════════ */

/* ---------- A · ambient canvas — a barely-there instrument grid, behind everything ---------- */
body::before{
  content:''; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:
    linear-gradient(var(--xy-hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--xy-hairline) 1px, transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:radial-gradient(120% 78% at 50% 0%, #000 0%, transparent 60%);
          mask-image:radial-gradient(120% 78% at 50% 0%, #000 0%, transparent 60%);
  opacity:.4;
}
@media (max-width:720px){ body::before{ background-size:44px 44px; opacity:.28; } }



/* ════════════════════════════════════════════════════════════════════════════
   FOCUS — motion, characterization & widget enrichment layer
   Appended last so it refines the components above without touching their
   markup contract. Everything degrades under prefers-reduced-motion.
   ════════════════════════════════════════════════════════════════════════════ */

/* ---------- 1 · page-load choreography (hero only) ---------- */
/* items sit 14px low until <html class="js"> + body.xy-lit releases them in sequence; they stay
   visible throughout (no fade), so the text counts as main content from the first paint */
.js .xy-rise{ transform:translateY(14px); }
.js .xy-lit .xy-rise{ opacity:1; transform:none; transition:opacity .6s var(--xy-ease), transform .6s var(--xy-ease); }
.js .xy-lit .xy-rise-1{ transition-delay:.04s; }  .js .xy-lit .xy-rise-2{ transition-delay:.13s; }
.js .xy-lit .xy-rise-3{ transition-delay:.24s; }  .js .xy-lit .xy-rise-4{ transition-delay:.37s; }
.js .xy-lit .xy-rise-5{ transition-delay:.52s; }  .js .xy-lit .xy-rise-6{ transition-delay:.68s; }
.js .xy-linemask{ overflow:hidden; display:block; }
.js .xy-linemask > *{ display:block; transform:translateY(112%); }
.js .xy-lit .xy-linemask > *{ transform:none; transition:transform .72s var(--xy-ease); }
.js .xy-lit .xy-linemask:nth-of-type(1) > *{ transition-delay:.09s; }
.js .xy-lit .xy-linemask:nth-of-type(2) > *{ transition-delay:.19s; }
.js .xy-lit .xy-linemask:nth-of-type(3) > *{ transition-delay:.29s; }
@media (prefers-reduced-motion:reduce){
  .js .xy-rise, .js .xy-lit .xy-rise, .js .xy-linemask > *, .js .xy-lit .xy-linemask > *{
    opacity:1 !important; transform:none !important; transition:none !important;
  }
}

/* ---------- 2 · scroll reveal — refine the existing .reveal into a "focus" pull ---------- */
.reveal{ opacity:0; transform:translateY(18px); filter:blur(3px); transition:opacity .6s var(--xy-ease), transform .6s var(--xy-ease), filter .6s var(--xy-ease); }
.reveal.in{ opacity:1; transform:none; filter:none; }
@media (prefers-reduced-motion:reduce){ .reveal{ filter:none; } }

/* ---------- 3 · the Sentinel — a MOTION treatment of the locked mark, never a redraw ---------- */
/* the SVG geometry mirrors the logo lockup: 4 wings around a hexagonal void.
   idle = watching; on view it focus-locks once (wings settle, void contracts, ring resolves). */
.sentinel{ display:inline-block; line-height:0; flex:none; --sen-x:0; --sen-y:0; }
.sentinel svg{ width:100%; height:100%; display:block; overflow:visible; }
.sentinel .sen-wings{ fill:var(--xy-red); transform-box:fill-box; transform-origin:center; transition:transform .8s var(--xy-ease-spring); }
.sentinel .sen-void{ fill:var(--xy-canvas); transform-box:fill-box; transform-origin:center; transition:transform .7s var(--xy-ease-spring); }
.sentinel .sen-ring{ fill:none; stroke:var(--xy-red); stroke-width:2; opacity:0; transform-box:fill-box; transform-origin:center; transform:scale(1.35); transition:opacity .5s var(--xy-ease), transform .6s var(--xy-ease); }
.sentinel .sen-eye-wrap{ transform:translate(calc(var(--sen-x)*1px), calc(var(--sen-y)*1px)); transition:transform .3s var(--xy-ease); }
/* idle drift */
.sentinel[data-state="idle"] .sen-wings{ animation:xy-sen-idle 7s var(--xy-ease) infinite; }
.sentinel[data-state="idle"] .sen-void{ animation:xy-sen-breathe 4.5s var(--xy-ease) infinite; }
/* focus-locked */
.sentinel[data-state="focus"] .sen-wings{ transform:rotate(0deg) scale(.94); }
.sentinel[data-state="focus"] .sen-void{ transform:scale(.34); }
.sentinel[data-state="focus"] .sen-ring{ opacity:.55; transform:scale(1); }
@keyframes xy-sen-idle{ 0%,100%{ transform:rotate(-2.2deg); } 50%{ transform:rotate(2.2deg) scale(1.015); } }
@keyframes xy-sen-breathe{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(.9); } }
@media (prefers-reduced-motion:reduce){
  .sentinel *{ animation:none !important; }
  .sentinel .sen-void{ transform:scale(.7); }
}
/* eyebrow-scale sentinel replaces the plain dot where present */
.eyebrow .sentinel{ width:15px; height:15px; }
.eyebrow.center .sentinel{ margin-right:1px; }

/* ---------- 4 · the scan sweep — one faint red pass over a live surface on view ---------- */
.xy-sweep{ position:relative; overflow:hidden; }
.xy-sweep::after{
  content:''; position:absolute; inset:0 auto 0 -40%; width:32%;
  background:linear-gradient(100deg, transparent, var(--xy-red-wash) 44%, var(--xy-red-line) 50%, var(--xy-red-wash) 56%, transparent);
  opacity:0; pointer-events:none; z-index:3;
}
.xy-sweep.swept::after{ animation:xy-sweep 1.2s var(--xy-ease) 1; }
@keyframes xy-sweep{ from{ left:-40%; opacity:1; } to{ left:108%; opacity:1; } }
@media (prefers-reduced-motion:reduce){ .xy-sweep.swept::after{ animation:none; } }

/* ---------- 5 · (frame crosshair markers removed) ---------- */

/* ---------- 6 · count-up numbers ---------- */
.xy-count{ font-variant-numeric:tabular-nums; }

/* ---------- 7 · card & surface micro-interaction — depth from hairline, never shadow ---------- */
.cap-card, .belief-card, .persona-card, .price-card, .tm-card, .contact-links a, .statcell{
  transition:background .18s var(--xy-ease), border-color .18s var(--xy-ease);
}
a.cap-card:hover, .contact-links a:hover{ background:var(--xy-surface-2); }
a.cap-card:hover h3{ color:var(--xy-ink); }
.cap-card .ic{ transition:background .2s var(--xy-ease), transform .2s var(--xy-ease); }
a.cap-card:hover .ic{ background:var(--xy-surface-1); transform:translateY(-1px); }
.chip{ transition:border-color .18s var(--xy-ease), color .18s var(--xy-ease), background .18s var(--xy-ease), transform .18s var(--xy-ease); }
.chip:hover{ border-color:var(--xy-hairline-lit); color:var(--xy-ink); background:var(--xy-surface-1); transform:none; }

/* ---------- 8 · hero-stat → a quiet exposure readout ---------- */
.hero-stat{ padding: var(--xy-4) var(--xy-6); border:1px solid var(--xy-hairline); border-radius:var(--xy-r-card); background:var(--xy-surface-1); gap: var(--xy-2); }
.hero-stat .hs-lbl{ letter-spacing:.14em; }
.hero-stat .hs-val{ font-size:34px; letter-spacing:-.03em; color:var(--xy-red); }
.hero-stat .hs-was{ font-family:var(--mono); font-size:11px; color:var(--xy-ink-4); letter-spacing:.02em; }

/* ---------- 9 · pipeline → connected nodes with a drawn progress line ---------- */
.pipeline{ position:relative; gap:0; }
.pstep{ transition:background .3s var(--xy-ease), border-color .3s var(--xy-ease); }
.pstep .n{ display:flex; align-items:center; gap:8px; }
.pstep .n::before{ content:''; width:9px; height:9px; border-radius:50%; border:1.5px solid var(--xy-hairline-2); background:var(--xy-canvas); flex:none; transition:all .3s var(--xy-ease); }
.pstep.active .n::before{ border-color:var(--xy-red); background:var(--xy-red); box-shadow:0 0 0 4px var(--xy-red-wash); }
.pstep.done .n::before{ border-color:var(--xy-red-btn); background:var(--xy-red-btn); }
.pstep.active{ background:var(--xy-red-wash); border-color:color-mix(in srgb, var(--xy-red) 40%, var(--xy-hairline)); }
@media (min-width:681px){
  .pipeline::before{ content:''; position:absolute; left:0; right:0; top:24px; height:1px; background:var(--xy-hairline-2); z-index:0; }
  .pipeline::after{ content:''; position:absolute; left:0; top:24px; height:1px; width:var(--pipe-progress,25%); background:var(--xy-red); z-index:1; transition:width .5s var(--xy-ease); }
  .pstep{ background:transparent; }
  .pstep.active{ background:var(--xy-red-wash); }
}

/* ---------- 10 · flowcontrast → one horizontal track, old path dim, new path in focus ---------- */
.flowcontrast{ flex-direction:column; align-items:stretch; gap:0; border:1px solid var(--xy-hairline); border-radius:var(--xy-r-card); overflow:hidden; background:var(--xy-surface-1); }
.fc-row{ flex:none; border:0; border-radius:0; padding:20px 24px; }
.fc-row.old{ background:transparent; opacity:.62; }
.fc-row.new{ background:var(--xy-red-wash); border-top:1px solid var(--xy-hairline); border-color:var(--xy-hairline); }
.fc-vs{ align-self:center; padding:10px 0; }
.fc-flow .arw{ color:var(--xy-red); }
.fc-row.old .fc-flow .arw{ color:var(--xy-ink-4); }

/* ---------- 11 · evidence chart — the self row is the one in focus ---------- */
.evrow{ transition:opacity .3s var(--xy-ease); }
.evchart:hover .evrow:not(.evself){ opacity:.5; }
.evrow.evself .evtrack{ border-color:var(--xy-red-line); }
.evrow.evself{ position:relative; }

/* ---------- 12 · cmprow → the Zeroday side reads as "resolved" ---------- */
.cmprow .zd{ position:relative; }
.cmprow .zd::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:2px; background:var(--xy-red); }

/* ---------- 13 · diff / verification window — the flagship, gets the sweep + a sharper frame ---------- */
.vf-window, .diffcard{ transition:border-color .2s var(--xy-ease); }
.vf-window.xy-focal{ border-color:var(--xy-hairline-lit); box-shadow:var(--xy-red-glow); }
.diffcard .ln.add{ color:#7fe7d6; }
.diffcard .ln.del{ color:#f3a3a3; }

/* ---------- 14 · callout → a flagged annotation ---------- */
.callout{ border-left-width:2px; position:relative; }
.callout::before{ content:''; position:absolute; left:-2px; top:-1px; width:2px; height:14px; background:var(--xy-red); }

/* ---------- 15 · certcard → an issued document ---------- */
.certcard{ position:relative; background:
  repeating-linear-gradient(90deg, transparent 0 6px, rgba(255,255,255,.012) 6px 7px), var(--xy-surface-1); }
.certcard::after{ content:'ISSUED'; position:absolute; top:18px; right:20px; font-family:var(--mono); font-size:9px; letter-spacing:.22em; color:var(--xy-red-line); border:1px solid var(--xy-red-line); padding:3px 7px; border-radius:3px; transform:rotate(3deg); }

/* ---------- 16 · section head — the eyebrow's sentinel + a hairline drop ---------- */
.section-head .eyebrow{ margin-bottom:2px; }

/* ---------- 17 · scroll progress hairline at the very top ---------- */
.xy-progress{ position:fixed; top:0; left:0; right:0; height:2px; z-index:80; background:transparent; pointer-events:none; }
.xy-progress i{ display:block; height:100%; width:100%; transform:scaleX(0); transform-origin:0 50%; background:linear-gradient(90deg,var(--xy-red-btn),var(--xy-red)); }
@media (prefers-reduced-motion:reduce){ .xy-progress{ display:none; } }

/* ---------- 18 · nav — subtle lift when the page has scrolled ---------- */




