/* =============================================================================
   CREATIVE SURGEON - THE OPERATING THEATRE
   Design system: "Clinical Radicalism" / Surgical-Noir
   Minimalism x Brutalism. 0.5px hairline grid. Sharp 0px corners.
   Insight first. Precision always.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   0. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Surface tonal ladder */
  --surface:                 #141313;
  --surface-container-lowest: #0e0e0e;
  --surface-container-low:    #1c1b1b;
  --surface-container:        #201f1f;
  --surface-container-high:   #2b2a2a;
  --surface-container-highest:#353434;
  --surface-bright:           #3a3939;

  /* Ink */
  --on-surface:          #e5e2e1;
  --on-surface-variant:  #c4c7c7;
  --outline:             #8e9192;
  --outline-variant:     #444748;

  /* The Blade / primary */
  --primary:      #c6c6c7;
  --on-primary:   #2f3131;

  /* The Deep Shade / secondary (midnight blue) */
  --secondary:            #a5cbea;
  --secondary-container:   #003049;
  --on-secondary-container:#97bddc;

  /* The Pulse - functional only. Never decoration. */
  --pulse:      #ff0000;
  --pulse-soft: #ff3b30;

  --hairline:      rgba(255, 255, 255, 0.10);
  --hairline-soft: rgba(255, 255, 255, 0.05);
  --hairline-bold: rgba(255, 255, 255, 0.20);

  /* Type */
  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-display-xl: clamp(3rem, 11vw, 7.5rem);
  --fs-display-lg: clamp(2.75rem, 8vw, 5rem);
  --fs-headline-md: clamp(1.75rem, 3.4vw, 2.5rem);
  --fs-headline-sm: clamp(1.25rem, 2vw, 1.5rem);
  --fs-body-lg: 1.125rem;
  --fs-body-md: 1rem;
  --fs-tech-sm: 0.6875rem;
  --fs-tech-xs: 0.5625rem;

  /* Rhythm */
  --grid-unit: 4px;
  --gutter: 24px;
  --margin-edge: clamp(20px, 5vw, 48px);
  --grid-cell: 48px;
  --header-h: 128px;

  /* Motion - "camera shutter" fast, "surgeon" precise */
  --ease-shutter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-scalpel: cubic-bezier(0.7, 0, 0.2, 1);
  --dur-snap: 0.18s;
  --dur-cut: 0.42s;
  --dur-sweep: 0.7s;

  --z-grid: 0;
  --z-content: 10;
  --z-header: 50;
  --z-cursor: 9999;
  --z-shutter: 10000;
}

/* -----------------------------------------------------------------------------
   1. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--surface);
}
html.js.has-fine-pointer:not(.reduce-motion),
html.js.has-fine-pointer:not(.reduce-motion) * { cursor: none; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--hairline-soft) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--hairline-soft) 0.5px, transparent 0.5px);
  background-size: var(--grid-cell) var(--grid-cell);
  background-attachment: fixed;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; }
ul { list-style: none; }
::selection { background: var(--pulse); color: #fff; }

/* Kill native scrollbar chrome, keep scroll */
::-webkit-scrollbar { width: 0; height: 0; display: none; }
* { scrollbar-width: none; }

/* Keyboard users always get a visible ring even with custom cursor */
:focus-visible {
  outline: 2px solid var(--pulse-soft);
  outline-offset: 3px;
}

.u-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -----------------------------------------------------------------------------
   2. TYPE PRIMITIVES
   -------------------------------------------------------------------------- */
.t-display-xl {
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.t-display-lg {
  font-family: var(--font-display);
  font-size: var(--fs-display-lg);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.t-headline-md {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.t-headline-sm {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  font-weight: 700;
  line-height: 1.3;
}
.t-body-lg { font-size: var(--fs-body-lg); line-height: 1.6; color: var(--on-surface-variant); }
.t-body    { font-size: var(--fs-body-md); line-height: 1.6; color: var(--on-surface-variant); }

.t-tech {
  font-family: var(--font-mono);
  font-size: var(--fs-tech-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
}
.t-tech-xs {
  font-family: var(--font-mono);
  font-size: var(--fs-tech-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--outline);
}
.t-pulse { color: var(--pulse-soft); }
.t-red   { color: var(--pulse); }
.t-ink   { color: var(--on-surface); }
.t-mute  { color: var(--on-surface-variant); }
.italic  { font-style: italic; }

/* -----------------------------------------------------------------------------
   3. STRUCTURAL DECOR - crosshairs, L-brackets, ticks, scanlines
   -------------------------------------------------------------------------- */
.crosshair {
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--hairline-bold);
  border-style: solid;
  pointer-events: none;
  z-index: var(--z-content);
}
.crosshair--tl { top: 14px; left: 14px;  border-width: 0.5px 0 0 0.5px; }
.crosshair--tr { top: 14px; right: 14px; border-width: 0.5px 0.5px 0 0; }
.crosshair--bl { bottom: 14px; left: 14px;  border-width: 0 0 0.5px 0.5px; }
.crosshair--br { bottom: 14px; right: 14px; border-width: 0 0.5px 0.5px 0; }

/* L-bracket corner frame on cards */
.lbrackets { position: relative; }
.lbrackets::before, .lbrackets::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.lbrackets::before { top: 0; left: 0; border-top: 1px solid var(--primary); border-left: 1px solid var(--primary); }
.lbrackets::after  { bottom: 0; right: 0; border-bottom: 1px solid var(--primary); border-right: 1px solid var(--primary); }

.scanlines::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(transparent, transparent 2px, rgba(255,255,255,0.5) 2px, rgba(255,255,255,0.5) 4px);
  opacity: 0.03; mix-blend-mode: overlay;
}

.rec {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-tech-sm);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--pulse-soft);
}
.rec__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pulse); flex: none;
  animation: rec-blink 1.1s steps(1, end) infinite;
}
@keyframes rec-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.15; } }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pulse); flex: none; }
.dot--ping { position: relative; }
.dot--ping::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--pulse); animation: ping 1.6s var(--ease-scalpel) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* Right-edge measurement / progress rail */
.tick-rail {
  position: fixed; top: 0; right: 0; width: 10px; height: 100%;
  z-index: var(--z-header); pointer-events: none;
  border-left: 0.5px solid var(--hairline);
  background:
    repeating-linear-gradient(to bottom, var(--hairline) 0 0.5px, transparent 0.5px 24px);
  mix-blend-mode: screen;
}
.tick-rail__progress {
  position: absolute; top: 0; right: 0; width: 100%;
  background: var(--pulse); height: 0;
}
.tick-rail__progress::after {
  content: ""; position: absolute; left: -4px; bottom: -1px; width: 10px; height: 2px; background: var(--pulse);
}
@media (max-width: 767px) { .tick-rail { display: none; } }

/* -----------------------------------------------------------------------------
   4. CUSTOM CURSOR
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pulse);
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  pointer-events: none; z-index: var(--z-cursor);
  mix-blend-mode: normal;
  transition: width var(--dur-snap) var(--ease-shutter),
              height var(--dur-snap) var(--ease-shutter),
              background var(--dur-snap) linear,
              border-color var(--dur-snap) linear,
              opacity 0.2s linear;
}
.cursor::before, .cursor::after {
  content: ""; position: absolute; background: var(--pulse); opacity: 0;
  transition: opacity var(--dur-snap) linear;
}
.cursor::before { left: 50%; top: -8px; width: 1px; height: calc(100% + 16px); transform: translateX(-50%); }
.cursor::after  { top: 50%; left: -8px; height: 1px; width: calc(100% + 16px); transform: translateY(-50%); }
.cursor.is-hot {
  width: 34px; height: 34px;
  background: rgba(255, 0, 0, 0.10);
  border: 0.5px solid var(--pulse);
}
.cursor.is-hot::before, .cursor.is-hot::after { opacity: 1; }
.cursor.is-down { width: 20px; height: 20px; background: rgba(255, 0, 0, 0.25); }
.cursor.is-hidden { opacity: 0; }
html:not(.js) .cursor, html:not(.has-fine-pointer) .cursor, html.reduce-motion .cursor { display: none; }

/* -----------------------------------------------------------------------------
   5. SHUTTER / PAGE TRANSITION
   -------------------------------------------------------------------------- */
.shutter {
  position: fixed; inset: 0; z-index: var(--z-shutter);
  display: grid; grid-template-columns: repeat(6, 1fr);
  pointer-events: none;
}
.shutter__blade {
  background: var(--surface-container-lowest);
  transform: scaleY(0);
  transform-origin: top;
  border-right: 0.5px solid var(--hairline-soft);
}
.shutter__scan {
  position: fixed; left: 0; right: 0; top: 0; height: 2px;
  background: var(--pulse); box-shadow: 0 0 24px 2px var(--pulse);
  opacity: 0; z-index: calc(var(--z-shutter) + 1); pointer-events: none;
}
.shutter__stamp {
  position: fixed; inset: 0; display: grid; place-content: center;
  z-index: calc(var(--z-shutter) + 2); opacity: 0; pointer-events: none;
}
.shutter__stamp span {
  font-family: var(--font-mono); font-size: var(--fs-tech-sm);
  letter-spacing: 0.4em; text-transform: uppercase; color: var(--pulse-soft);
  border: 0.5px solid var(--pulse-soft); padding: 10px 18px;
}
html.reduce-motion .shutter, html.reduce-motion .shutter__scan, html.reduce-motion .shutter__stamp { display: none; }

/* -----------------------------------------------------------------------------
   6. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap { width: 100%; padding-inline: var(--margin-edge); }
.stack > * + * { margin-top: 1rem; }
main { display: block; position: relative; z-index: var(--z-content); padding-top: var(--header-h); }
@media (max-width: 860px) { :root { --header-h: 80px; } }

/* Ambient column grid behind a section */
.colgrid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  padding-inline: var(--margin-edge);
  display: flex; justify-content: space-between;
  opacity: 0.5;
}
.colgrid span { width: 0; border-left: 0.5px solid var(--hairline); }
.colgrid span:nth-child(n+4) { display: none; }
@media (min-width: 768px) { .colgrid span:nth-child(n+4) { display: block; } }

.divider { width: 100%; height: 0.5px; background: var(--hairline); transform-origin: left; }

/* -----------------------------------------------------------------------------
   7. HEADER + NAV
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--hairline);
}
.site-header__bar {
  height: 80px; display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--margin-edge);
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand__logo { height: 40px; width: auto; }
@media (max-width: 600px) { .brand__logo { height: 34px; } }
.brand__meta {
  display: flex; flex-direction: column; gap: 2px;
  padding-left: 14px; border-left: 0.5px solid var(--hairline);
}
.brand__meta span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }
.brand__meta .live { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 600px) { .brand__meta { display: none; } }

.site-header__aux { display: flex; align-items: center; gap: 28px; }
.status-readout { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.status-readout span:first-child { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }
.status-readout span:last-child { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); }
@media (max-width: 900px) { .status-readout { display: none; } }

.nav-toggle {
  display: none; width: 40px; height: 40px; position: relative;
  border: 0.5px solid var(--hairline-bold);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1px;
  background: var(--on-surface); transform: translate(-50%, -50%);
  transition: transform var(--dur-snap) var(--ease-shutter);
}
.nav-toggle span::before { transform: translate(-50%, -6px); }
.nav-toggle span::after  { transform: translate(-50%, 5px); }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-open .nav-toggle span::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.site-nav {
  height: 48px; padding-inline: var(--margin-edge);
  border-bottom: 0.5px solid var(--hairline-soft);
  background: color-mix(in srgb, var(--surface-container-lowest) 50%, transparent);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
}
.site-nav a {
  position: relative;
  font-family: var(--font-mono); font-size: var(--fs-tech-sm);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: color var(--dur-snap) linear;
  white-space: nowrap;
}
.site-nav a::before {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px;
  background: var(--on-surface); transition: right var(--dur-cut) var(--ease-scalpel);
}
.site-nav a:hover { color: var(--on-surface); }
.site-nav a:hover::before { right: 0; }
.site-nav a[aria-current="page"] { color: var(--on-surface); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; top: -5px; right: -9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--pulse);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: auto;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px var(--margin-edge) 24px;
    background: var(--surface);
    border-bottom: 0.5px solid var(--hairline);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform var(--dur-cut) var(--ease-shutter), opacity var(--dur-cut) linear;
  }
  .site-nav a { width: 100%; padding: 16px 0; border-bottom: 0.5px solid var(--hairline-soft); font-size: 0.8rem; }
  .nav-open .site-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
}

/* -----------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --_pad-y: 16px;
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: var(--_pad-y) 20px;
  font-family: var(--font-mono); font-size: var(--fs-tech-sm);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--on-surface);
  border: 1px solid var(--hairline-bold);
  background: transparent;
  overflow: hidden;
  transition: color var(--dur-snap) var(--ease-shutter), border-color var(--dur-snap) linear;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--on-surface);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-cut) var(--ease-scalpel);
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--surface); border-color: var(--on-surface); }
.btn:hover::before { transform: scaleX(1); }
.btn__arrow { transition: transform var(--dur-cut) var(--ease-shutter); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--active .btn__pulse {
  position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pulse); z-index: 2;
}
.btn--active .btn__pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--pulse);
  animation: ping 1.6s var(--ease-scalpel) infinite;
}
.btn--solid { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn--solid::before { background: #fff; }
.btn--solid:hover { color: #000; }
.btn--block { width: 100%; }

/* -----------------------------------------------------------------------------
   9. REVEAL ANIMATION SYSTEM  (no-JS safe: hidden only when html.js)
   -------------------------------------------------------------------------- */
/* Pre-reveal states never zero out element geometry (IntersectionObserver
   would then never fire). opacity + a one-shot clip animation do the wipe. */
html.js .reveal { opacity: 0; }
html.js .reveal--rise  { transform: translateY(28px); }
html.js .reveal--left  { transform: translateX(-28px); }
html.js .reveal--right { transform: translateX(28px); }
html.js .reveal--scale { transform: scale(1.04); }
html.js .reveal.is-in {
  opacity: 1; transform: none;
  transition:
    opacity var(--dur-cut) var(--ease-shutter),
    transform var(--dur-cut) var(--ease-shutter);
  transition-delay: var(--reveal-delay, 0s);
}
html.js .reveal--clip.is-in {
  animation: incision var(--dur-sweep) var(--ease-scalpel) var(--reveal-delay, 0s) both;
}
@keyframes incision { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(-40px -24px -48px 0); } }
html.reduce-motion .reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; }

/* Line draw - stays full size (opacity 0) so IO fires, then wipes in */
html.js .line-draw { opacity: 0; }
html.js .line-draw.is-in {
  opacity: 1;
  animation: incision var(--dur-sweep) var(--ease-scalpel) var(--reveal-delay, 0s) both;
}

/* Char/word mask reveal (spans injected by JS) */
.split-line { display: block; overflow: hidden; }
.split-unit { display: inline-block; will-change: transform; }
html.js .split-pending .split-unit { transform: translateY(110%); }
html.js .split-in .split-unit {
  transform: translateY(0);
  transition: transform var(--dur-cut) var(--ease-shutter);
  transition-delay: calc(var(--u-i, 0) * 0.028s);
}
html.reduce-motion .split-unit { transform: none !important; }

/* -----------------------------------------------------------------------------
   10. HERO (index)
   -------------------------------------------------------------------------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(32px, 6vh, 72px); overflow: hidden; }
.hero__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-bottom: 16px; border-bottom: 0.5px solid var(--hairline-bold); margin-bottom: clamp(28px, 5vh, 56px);
}
.hero__meta-col { display: flex; flex-direction: column; gap: 8px; }
.hero__meta-col--r { text-align: right; align-items: flex-end; }
@media (max-width: 600px) {
  .hero__meta { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero__meta-col--r { text-align: left; align-items: flex-start; }
  .hero__meta-col span { word-break: break-word; }
}
.hero__title { position: relative; }
.hero__title .accent { color: var(--pulse-soft); }
.hero__title-line { color: var(--primary); }
.hero__arrow {
  position: absolute; right: -0.4em; top: 0; color: var(--pulse-soft);
  font-size: var(--fs-headline-sm); animation: bob 1.6s var(--ease-scalpel) infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

.hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); margin-top: clamp(28px, 5vh, 52px); align-items: end; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: repeat(12, 1fr); } }
.hero__card {
  position: relative; grid-column: span 12;
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px;
  background: color-mix(in srgb, var(--surface-container) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--primary); border-left: 1px solid var(--hairline-bold);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.85);
}
@media (min-width: 900px) { .hero__card { grid-column: span 5; } }
.hero__card::before { content:""; position:absolute; top:0; right:0; width:16px; height:1px; background: var(--on-surface); }
.hero__card::after  { content:""; position:absolute; bottom:0; left:0; width:1px; height:16px; background: var(--on-surface); }
.hero__card p.lead { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-sm); line-height: 1.35; color: var(--on-surface); }
.hero__card p.sub { border-top: 0.5px solid var(--hairline); padding-top: 16px; }
.hero__cta { grid-column: span 12; display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
@media (min-width: 900px) { .hero__cta { grid-column: 9 / span 4; } }
.hero__cta-label { border-bottom: 0.5px solid var(--hairline); padding-bottom: 8px; }

.hero__reticle {
  position: absolute; right: -4%; bottom: -12%;
  width: min(42vw, 560px); aspect-ratio: 1; opacity: 0.32;
  pointer-events: none; mix-blend-mode: screen;
}
@media (max-width: 900px) { .hero__reticle { opacity: 0.14; right: -30%; } }
.hero__reticle .ring { border-color: rgba(255,255,255,0.5); }
.hero__reticle .cross-v, .hero__reticle .cross-h { background: rgba(255,255,255,0.4); }

.hero__cue { position: absolute; left: var(--margin-edge); bottom: 22px; display: flex; align-items: center; gap: 14px; z-index: 2; }
.hero__cue-line { width: 56px; height: 1px; background: var(--outline-variant); position: relative; overflow: hidden; }
.hero__cue-line::after { content: ""; position: absolute; inset: 0; background: var(--pulse); transform: translateX(-100%); animation: cue 2.6s var(--ease-scalpel) infinite; }
@keyframes cue { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
html.reduce-motion .hero__cue-line::after { animation: none; }
.hero__sec {
  position: absolute; left: calc(var(--margin-edge) - 18px); top: 42%;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--outline);
}
@media (max-width: 1100px) { .hero__sec { display: none; } }
@media (max-width: 640px) { .hero__cue { display: none; } }
.hero__reticle .ring { position: absolute; inset: 0; border: 1px solid var(--hairline-bold); border-radius: 50%; }
.hero__reticle .ring:nth-child(2) { inset: 12%; opacity: 0.7; }
.hero__reticle .ring:nth-child(3) { inset: 30%; opacity: 0.4; }
.hero__reticle .cross-v { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: var(--hairline-bold); }
.hero__reticle .cross-h { position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--hairline-bold); }
.hero__reticle.spin { animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Client logo wall (continuous marquee) */
.logo-wall {
  --lw-gap: clamp(44px, 6vw, 88px);
  position: relative; overflow: hidden;
  border-block: 0.5px solid var(--hairline);
  background: var(--surface-container-lowest);
  padding-block: clamp(24px, 4.5vh, 40px);
}
.logo-wall__head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(16px, 3vh, 26px); }
.logo-wall__head .divider { flex: 1; }
.logo-wall__head .t-tech { white-space: nowrap; }
.logo-wall__viewport {
  overflow: hidden; display: flex;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
html:not(.js) .logo-wall__viewport, html.reduce-motion .logo-wall__viewport { overflow-x: auto; }
.logo-wall__marquee { display: flex; width: max-content; }
.logo-wall.is-live .logo-wall__marquee { animation: logo-marquee var(--lw-dur, 60s) linear infinite; }
.logo-wall.is-live:hover .logo-wall__marquee,
.logo-wall.is-live:focus-within .logo-wall__marquee { animation-play-state: paused; }
@keyframes logo-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html.reduce-motion .logo-wall.is-live .logo-wall__marquee { animation: none; }

.logo-wall__track { display: flex; align-items: center; flex: none; margin: 0; padding: 0; list-style: none; }
.logo-wall__item { flex: none; display: flex; align-items: center; justify-content: center; height: 44px; margin-inline: calc(var(--lw-gap) / 2); }
.logo-wall__item img {
  max-height: 44px; width: auto; display: block;
  filter: grayscale(1) brightness(1.75) contrast(0.85); opacity: 0.5;
  transition: opacity var(--dur-snap) linear, filter var(--dur-snap) linear;
}
.logo-wall__item:hover img { filter: grayscale(0) brightness(1) contrast(1); opacity: 1; }
.logo-wall__word {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.25rem); letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--outline); white-space: nowrap;
  transition: color var(--dur-snap) linear;
}
.logo-wall__item:hover .logo-wall__word { color: var(--on-surface); }

/* -----------------------------------------------------------------------------
   11. PAGE HERO (interior pages)
   -------------------------------------------------------------------------- */
.page-head { position: relative; padding-block: clamp(48px, 9vh, 110px); }
.page-head__grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
@media (min-width: 768px) { .page-head__grid { grid-template-columns: repeat(12, 1fr); } }
.page-head__main { grid-column: span 12; }
@media (min-width: 768px) { .page-head__main { grid-column: span 8; } }
.page-head__aside { grid-column: span 12; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .page-head__aside { grid-column: 9 / span 4; padding-left: 32px; border-left: 0.5px solid var(--hairline); justify-content: flex-end; } }
.page-head__kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.page-head h1 { margin-bottom: 8px; }
.page-head__aside .readout { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }

/* -----------------------------------------------------------------------------
   12. SECTION SCAFFOLD
   -------------------------------------------------------------------------- */
.section { position: relative; padding-block: clamp(52px, 8vh, 104px); }
.section--tight { padding-block: clamp(40px, 6vh, 72px); }
.section__label { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(28px, 4.5vh, 52px); }
.section__label .t-tech { white-space: nowrap; }
.section__label .divider { flex: 1; }
.section--lowest { background: var(--surface-container-lowest); }
.section--surface { background: var(--surface); }

/* Diagnostic list rows */
.dlist { border-top: 0.5px solid var(--hairline); }
.dlist__row {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  padding-block: 28px; border-bottom: 0.5px solid var(--hairline);
  transition: background var(--dur-snap) linear, padding-left var(--dur-cut) var(--ease-shutter);
}
@media (min-width: 768px) { .dlist__row { grid-template-columns: 3fr 3fr 6fr; gap: var(--gutter); align-items: baseline; } }
.dlist__row:hover { background: var(--surface-container-low); padding-left: 12px; }
.dlist__coord { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.08em; color: var(--outline); }
.dlist__row:hover .dlist__coord { color: var(--primary); }
.dlist__key { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-surface); }
.dlist__row--crit .dlist__key, .dlist__row--crit .dlist__coord { color: var(--pulse-soft); }

/* -----------------------------------------------------------------------------
   13. DIAGNOSIS PAGE
   -------------------------------------------------------------------------- */
.vs { position: relative; display: flex; flex-direction: column; gap: 48px; align-items: stretch; }
@media (min-width: 1024px) { .vs { flex-direction: row; align-items: flex-start; justify-content: space-between; } }
.vs__card { position: relative; padding: clamp(28px, 4vw, 48px); background: var(--surface-container); box-shadow: 0 40px 80px -50px rgba(0,0,0,0.9); }
@media (min-width: 1024px) { .vs__card { width: 42%; } }
.vs__card--b { background: var(--primary); color: var(--on-primary); }
@media (min-width: 1024px) { .vs__card--b { margin-top: 128px; } }
.vs__card h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-md); line-height: 1.15; text-transform: uppercase; }
.vs__card--b h2 { color: var(--on-primary); }
.vs__tag { display: block; font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-surface-variant); margin-bottom: 20px; }
.vs__card--b .vs__tag { color: color-mix(in srgb, var(--on-primary) 65%, transparent); }
.vs__tag b { color: var(--pulse-soft); margin-right: 8px; }
.vs__card--b .vs__tag b { color: var(--on-primary); }
.vs__connector { display: none; }
@media (min-width: 1024px) { .vs__connector { display: flex; flex-direction: column; align-items: center; width: 12%; padding-top: 40px; } }
.vs__connector .stem { width: 0.5px; height: 120px; background: var(--hairline-bold); }
.vs__connector .node { margin-block: 16px; padding: 8px 16px; background: var(--surface-container-highest); font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.2em; }

.close-gap {
  position: relative; margin-inline: auto; margin-top: clamp(48px, 10vh, 128px);
  padding: clamp(32px, 5vw, 56px) clamp(32px, 8vw, 88px);
  background: var(--pulse); color: #fff; text-align: center;
  box-shadow: 0 0 60px -10px rgba(255, 0, 0, 0.35);
  max-width: max-content;
}
.close-gap h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-lg); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 12px; }
.close-gap p { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
.close-gap .corner { position: absolute; width: 8px; height: 8px; background: #fff; }
.close-gap .corner.tl { top: 8px; left: 8px; } .close-gap .corner.br { bottom: 8px; right: 8px; }

/* Scanner interaction */
.scanner {
  position: relative; width: 100%; min-height: 640px;
  background: var(--surface-container-lowest); overflow: hidden;
  display: grid; place-items: center; margin-top: 16px;
  border-block: 0.5px solid var(--hairline);
}
.scanner__noise { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 24px; padding: 48px; transition: opacity var(--dur-sweep) linear; }
.scanner__noise span { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 4rem); color: color-mix(in srgb, var(--surface-bright) 55%, transparent); text-transform: uppercase; transition: opacity .5s var(--ease-scalpel), transform .5s var(--ease-scalpel); user-select: none; }
.scanner__line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--pulse); box-shadow: 0 0 20px 1px var(--pulse); z-index: 4; opacity: 0; will-change: transform; }
.scanner__signal {
  position: absolute; inset: 0; display: grid; place-items: center; padding: var(--margin-edge);
  opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease-shutter); z-index: 5;
}
.scanner__signal .panel {
  position: relative; max-width: 760px; padding: clamp(28px, 4vw, 48px);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-align: center; box-shadow: 0 40px 90px -50px #000;
}
.scanner__signal .panel::before, .scanner__signal .panel::after { content:""; position:absolute; width: 24px; height: 24px; }
.scanner__signal .panel::before { top:0; left:0; border-top: 1px solid var(--pulse); border-left: 1px solid var(--pulse); }
.scanner__signal .panel::after  { bottom:0; right:0; border-bottom: 1px solid var(--pulse); border-right: 1px solid var(--pulse); }
.scanner__signal .panel p.big { font-size: var(--fs-body-lg); line-height: 1.55; color: var(--on-surface); text-transform: uppercase; }
.scanner__hud { position: absolute; z-index: 6; font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); pointer-events: none; }
.scanner__hud.tl { top: 24px; left: 24px; } .scanner__hud.br { bottom: 24px; right: 24px; }
.scanner__hint {
  position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--pulse-soft); pointer-events: none; text-align: center;
  transition: opacity 0.4s linear;
}
.scanner__hint-arrow { font-size: 1.6rem; line-height: 1; animation: hint-sweep 1.8s var(--ease-scalpel) infinite; }
@keyframes hint-sweep { 0%, 100% { transform: translateX(-12px); } 50% { transform: translateX(12px); } }
.scanner.is-touched .scanner__hint, .scanner.is-done .scanner__hint { opacity: 0; }
html.reduce-motion .scanner__hint-arrow { animation: none; }
.scanner.is-done .scanner__noise { opacity: 0; }
.scanner.is-done .scanner__signal { opacity: 1; pointer-events: auto; }
.scanner.is-done .scanner__line { opacity: 0 !important; }

/* -----------------------------------------------------------------------------
   14. OPERATING TABLE PAGE
   -------------------------------------------------------------------------- */
.console { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 1100px) { .console { grid-template-columns: 340px 1fr; align-items: start; } }
.tray { position: relative; background: var(--surface-container-low); box-shadow: 0 30px 60px -50px #000; }
@media (min-width: 1100px) { .tray { position: sticky; top: calc(var(--header-h) + 16px); } }
.tray__head { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--surface-container); }
.tray__list { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.proto {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  width: 100%; padding: 18px 16px; text-align: left;
  background: var(--surface); color: var(--on-surface);
  transition: background var(--dur-snap) var(--ease-shutter), color var(--dur-snap) linear;
}
.proto__i { font-family: var(--font-mono); font-size: var(--fs-tech-sm); color: var(--outline); }
.proto__dot { margin-left: auto; }
.proto__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-sm); text-transform: uppercase; }
.proto__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pulse); opacity: 0; transition: opacity var(--dur-snap) linear; }
.proto:hover { background: var(--surface-container-high); }
.proto.is-active { background: var(--primary); color: var(--on-primary); }
.proto.is-active .proto__i { color: color-mix(in srgb, var(--on-primary) 70%, transparent); }
.proto.is-active .proto__dot { opacity: 1; }

.monitor { position: relative; background: var(--surface-container-lowest); box-shadow: 0 30px 60px -50px #000; overflow: hidden; min-height: 620px; display: flex; flex-direction: column; }
.monitor__grid { position: absolute; inset: 0; pointer-events: none; opacity: 0.16;
  background-image: linear-gradient(#fff 0.5px, transparent 0.5px), linear-gradient(90deg, #fff 0.5px, transparent 0.5px);
  background-size: 24px 24px; }
.monitor__bar { position: relative; z-index: 1; height: 48px; display: flex; align-items: center; justify-content: space-between; padding-inline: 24px; background: var(--surface-container); }
.monitor__bar .eq { display: flex; gap: 4px; align-items: flex-end; height: 16px; }
.monitor__bar .eq i { width: 3px; background: var(--outline-variant); display: block; }
.monitor__bar .eq i:nth-child(1) { height: 40%; } .monitor__bar .eq i:nth-child(2) { height: 70%; } .monitor__bar .eq i:nth-child(3) { height: 100%; background: var(--primary); }
.monitor__quads { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hairline-soft); }
@media (min-width: 720px) { .monitor__quads { grid-template-columns: 1fr 1fr; } }
.quad { position: relative; background: var(--surface-container-lowest); padding: clamp(18px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 14px; transition: background var(--dur-snap) linear; }
.quad:hover { background: var(--surface-container-low); }
.quad--wide { grid-column: 1 / -1; }
.quad__top { display: flex; justify-content: space-between; align-items: flex-start; }
.quad__code { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; color: var(--outline); background: var(--surface-container); padding: 4px 8px; }
.quad h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-sm); text-transform: uppercase; }
.quad p { transition: opacity var(--dur-snap) linear; }
.quad.is-swapping p, .quad.is-swapping h3, .quad.is-swapping ul { opacity: 0.15; }
.quad--wide h3 { color: var(--primary); }

.scope-list { display: grid; grid-template-columns: 1fr; gap: 8px 22px; margin-top: 2px; transition: opacity var(--dur-snap) linear; }
@media (min-width: 520px) { .scope-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .scope-list { grid-template-columns: 1fr 1fr 1fr; } }
.scope-list li { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.02em; color: var(--on-surface-variant); display: flex; gap: 10px; }
.scope-list li::before { content: "+"; color: var(--pulse-soft); flex: none; }
.monitor__foot { position: relative; z-index: 1; height: 44px; display: flex; align-items: center; justify-content: space-between; padding-inline: 24px; background: var(--surface-container); font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }


/* -----------------------------------------------------------------------------
   15. CASE FILES PAGE
   -------------------------------------------------------------------------- */
.casefiles__toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 8px 14px; border: 0.5px solid var(--hairline-bold);
  font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-surface-variant);
  transition: background var(--dur-snap) var(--ease-shutter), color var(--dur-snap) linear, border-color var(--dur-snap) linear;
}
.filters button:hover { border-color: var(--on-surface); color: var(--on-surface); }
.filters button.is-active { background: var(--on-surface); color: var(--surface); border-color: var(--on-surface); }
.casefiles__count { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }

.evidence { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hairline-soft); }
@media (min-width: 640px) { .evidence { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .evidence { grid-template-columns: repeat(3, 1fr); } }
.case {
  position: relative; background: var(--surface-container-lowest);
  min-height: 248px; padding: 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid transparent; overflow: hidden;
  transition: background var(--dur-cut) var(--ease-shutter), border-color var(--dur-cut) linear, transform var(--dur-cut) var(--ease-shutter);
  will-change: transform;
}
.case::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background-image: repeating-linear-gradient(transparent, transparent 2px, #fff 2px, #fff 4px);
  transition: opacity var(--dur-cut) linear;
}
.case:hover { background: var(--surface-container); border-color: var(--hairline-bold); z-index: 2; }
.case:hover::after { opacity: 0.06; }
.case.is-hidden { display: none; }
.case__rec { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity var(--dur-cut) linear; }
.case:hover .case__rec { opacity: 1; }
.case__rec span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--pulse-soft); }
.case__head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.case__meta { display: flex; flex-direction: column; gap: 4px; }
.case__meta.r { text-align: right; }
.case__meta .k { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }
.case__meta .v { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.06em; color: var(--primary); }
.case__body { position: relative; z-index: 1; transform: translateY(0); transition: transform var(--dur-cut) var(--ease-shutter); }
.case:hover .case__body { transform: translateY(-6px); }
.case__body h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-sm); text-transform: uppercase; margin-bottom: 10px; transition: color var(--dur-snap) linear; }
.case:hover .case__body h3 { color: var(--primary); }
.case__desc {
  font-size: 0.9rem; line-height: 1.55; color: var(--on-surface-variant);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height var(--dur-sweep) var(--ease-scalpel), opacity var(--dur-cut) linear;
}
.case:hover .case__desc,
.case:focus-within .case__desc { max-height: 360px; opacity: 1; }
.case:focus-within { background: var(--surface-container); border-color: var(--hairline-bold); }
.case:focus-within .case__rec { opacity: 1; }
@media (hover: none) {
  .case__desc { max-height: none; opacity: 1; }
  .case__rec { opacity: 1; }
  .case__body { transform: none; }
}
.case__tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.case__tags span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); border: 0.5px solid var(--hairline); padding: 3px 7px; }
.case__status { position: absolute; left: 26px; top: 16px; font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--pulse-soft); }
.case__thumb { position: relative; margin: -26px -26px 18px; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 0.5px solid var(--hairline); }
.case__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); opacity: 0.66; transition: opacity var(--dur-cut) var(--ease-shutter), filter var(--dur-cut) var(--ease-shutter); }
.case:hover .case__thumb img, .case:focus-within .case__thumb img { opacity: 1; filter: none; }
.case__subtitle { margin-top: 6px; color: var(--on-surface-variant); letter-spacing: 0.04em; }
.case__conclusion { margin-top: 10px; }
.case__corner { position: absolute; width: 12px; height: 12px; opacity: 0; transition: opacity var(--dur-cut) linear; }
.case:hover .case__corner, .case:focus-within .case__corner { opacity: 1; }
.case__corner.tl { top: 0; left: 0; border-top: 1px solid var(--hairline-bold); border-left: 1px solid var(--hairline-bold); }
.case__corner.br { bottom: 0; right: 0; border-bottom: 1px solid var(--hairline-bold); border-right: 1px solid var(--hairline-bold); }
.loadmore { margin-top: 40px; display: flex; justify-content: center; }

/* Card affordance: always-visible "open file" cue */
.case { cursor: pointer; }
.case__open {
  align-self: flex-start; margin-top: 6px; position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--on-surface-variant); border: 0.5px solid var(--hairline-bold); padding: 6px 10px;
  background: var(--surface-container);
  transition: color var(--dur-snap) linear, border-color var(--dur-snap) linear, background var(--dur-snap) linear, transform var(--dur-snap) var(--ease-shutter);
}
.case__open svg { width: 12px; height: 12px; flex: none; }
.case__open b { color: var(--pulse-soft); font-weight: 500; margin-left: 2px; }
.case:hover .case__open, .case:focus-within .case__open {
  color: var(--surface); background: var(--on-surface); border-color: var(--on-surface); transform: translateX(2px);
}
.case:hover .case__open b, .case:focus-within .case__open b { color: var(--surface); }

/* =============================================================================
   CASE FILE VIEWER (modal + media slider)
   ========================================================================== */
body.cf-lock { overflow: hidden; }

.cf-modal { position: fixed; inset: 0; z-index: var(--z-shutter); display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); }
.cf-modal[hidden] { display: none; }
.cf-modal__scrim {
  position: absolute; inset: 0; background: rgba(8, 8, 8, 0.82);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--dur-cut) linear;
}
.cf-modal.is-open .cf-modal__scrim { opacity: 1; }
.cf-modal__frame {
  position: relative; z-index: 1; width: min(1120px, 100%); max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-container-lowest);
  border: 1px solid var(--hairline-bold);
  box-shadow: 0 60px 120px -40px #000;
  transform: translateY(16px) scale(0.985); opacity: 0;
  transition: transform var(--dur-cut) var(--ease-shutter), opacity var(--dur-cut) linear;
}
.cf-modal.is-open .cf-modal__frame { transform: none; opacity: 1; }
html.reduce-motion .cf-modal__scrim, html.reduce-motion .cf-modal__frame { transition: none; }
.cf-modal__frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background-image: repeating-linear-gradient(transparent, transparent 2px, #fff 2px, #fff 4px);
  opacity: 0.025;
}

.cf-modal__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 28px); background: var(--surface-container); flex: none;
  border-bottom: 0.5px solid var(--hairline);
}
.cf-modal__ident { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cf-modal__ident .no { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.1em; color: var(--pulse-soft); flex: none; }
.cf-modal__ident .cat { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-modal__close {
  flex: none; width: 36px; height: 36px; position: relative; border: 0.5px solid var(--hairline-bold);
  transition: background var(--dur-snap) linear, border-color var(--dur-snap) linear;
}
.cf-modal__close::before, .cf-modal__close::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 1px; background: var(--on-surface);
}
.cf-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.cf-modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.cf-modal__close:hover { background: var(--pulse); border-color: var(--pulse); }
.cf-modal__close:hover::before, .cf-modal__close:hover::after { background: #fff; }

.cf-modal__scroll { overflow-y: auto; overflow-x: hidden; flex: 1; }
.cf-modal__info { padding: clamp(20px, 3vw, 34px) clamp(16px, 3vw, 34px) clamp(14px, 2vw, 22px); }
.cf-modal__title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-headline-md); line-height: 1.05; text-transform: uppercase; }
.cf-modal__title small { display: block; font-size: 0.5em; color: var(--on-surface-variant); margin-top: 4px; letter-spacing: 0.02em; }
.cf-modal__desc { margin-top: 16px; max-width: 68ch; color: var(--on-surface-variant); line-height: 1.6; font-size: var(--fs-body-md); }
.cf-modal__tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.cf-modal__tags span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); border: 0.5px solid var(--hairline); padding: 3px 7px; }

/* --- Slider --- */
.cf-slider { border-top: 0.5px solid var(--hairline); background: var(--surface-container-lowest); }
.cf-slider[hidden] { display: none; }
.cf-slider__label { display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 34px) 0; }
.cf-slider__label .t { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--outline); }
.cf-slider__label .rule { flex: 1; height: 0.5px; background: var(--hairline); }
.cf-slider__label .count { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.1em; color: var(--primary); }

.cf-stage {
  position: relative; margin: 12px clamp(16px, 3vw, 34px) 0;
  background: #000; border: 0.5px solid var(--hairline);
  aspect-ratio: 16 / 9; overflow: hidden;
}
@media (max-width: 560px) { .cf-stage { aspect-ratio: 4 / 3; } }
.cf-stage__track { position: absolute; inset: 0; display: flex; transition: transform var(--dur-cut) var(--ease-scalpel); }
html.reduce-motion .cf-stage__track { transition: none; }
.cf-slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.cf-slide img, .cf-slide video, .cf-slide iframe { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; background: #000; }
.cf-slide--contain-cover img { object-fit: cover; }

.cf-slide__ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background:
    linear-gradient(rgba(255,255,255,0.04) 0.5px, transparent 0.5px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 0.5px, transparent 0.5px), var(--surface-container-low);
  background-size: 32px 32px, 32px 32px, auto; text-align: center; padding: 24px;
}
.cf-slide__ph .kind { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 5vw, 3rem); text-transform: uppercase; letter-spacing: -0.02em; color: var(--surface-bright); }
.cf-slide__ph .meta { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--outline); }
.cf-slide__ph .hint { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.04em; color: var(--outline-variant); max-width: 42ch; }
.cf-slide__ph .play { width: 54px; height: 54px; border: 1px solid var(--pulse-soft); border-radius: 50%; display: grid; place-items: center; }
.cf-slide__ph .play::before { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--pulse-soft); margin-left: 4px; }
.cf-slide__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-surface-variant); pointer-events: none; }
.cf-stage__x { position: absolute; width: 12px; height: 12px; pointer-events: none; z-index: 4; border-color: rgba(255,255,255,0.35); border-style: solid; }
.cf-stage__x.tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; } .cf-stage__x.tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.cf-stage__x.bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; } .cf-stage__x.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

.cf-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 40px; height: 56px; display: grid; place-items: center;
  background: rgba(14,14,14,0.72); border: 0.5px solid var(--hairline-bold); color: var(--on-surface);
  transition: background var(--dur-snap) linear, color var(--dur-snap) linear;
}
.cf-arrow:hover { background: var(--on-surface); color: var(--surface); }
.cf-arrow[disabled] { opacity: 0.25; pointer-events: none; }
.cf-arrow--prev { left: 0; } .cf-arrow--next { right: 0; }
.cf-arrow svg { width: 16px; height: 16px; }

/* Filmstrip / slide menu */
.cf-strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px clamp(16px, 3vw, 34px) clamp(16px, 3vw, 28px); scroll-snap-type: x proximity; }
.cf-strip__item {
  flex: 0 0 auto; scroll-snap-align: start; min-width: 132px; max-width: 172px; padding: 10px 12px; text-align: left;
  border: 0.5px solid var(--hairline-bold); background: var(--surface-container);
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color var(--dur-snap) linear, background var(--dur-snap) linear;
}
.cf-strip__item .n { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; color: var(--outline); }
.cf-strip__item .lbl { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-strip__item .typ { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--outline-variant); }
.cf-strip__item:hover { border-color: var(--on-surface); }
.cf-strip__item.is-active { border-color: var(--pulse-soft); background: var(--surface-container-high); }
.cf-strip__item.is-active .lbl { color: var(--on-surface); }
.cf-strip__item.is-active .n { color: var(--pulse-soft); }

@media (max-width: 560px) {
  .cf-modal { padding: 0; }
  .cf-modal__frame { max-height: 100vh; height: 100%; width: 100%; border: 0; }
}

/* -----------------------------------------------------------------------------
   16. SURGEONS PAGE
   -------------------------------------------------------------------------- */
.intersect { position: relative; padding-block: clamp(44px, 8vh, 92px); overflow: hidden; }
.intersect__kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.kinetic { position: relative; }
.kinetic__word {
  display: block; margin: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.75rem, 10vw, 6.5rem); line-height: 0.94;
  letter-spacing: -0.04em; text-transform: uppercase; color: var(--on-surface);
}
.kinetic__word + .kinetic__word { color: var(--on-surface-variant); }
@media (min-width: 768px) { .kinetic__word + .kinetic__word { margin-left: 1.1em; } }
.kinetic .x { color: var(--pulse); font-weight: 800; }
.kinetic__note {
  margin-top: clamp(28px, 6vh, 60px);
  max-width: 640px;
  border-left: 1px solid var(--pulse);
  padding-left: clamp(16px, 3vw, 28px);
}
.kinetic__note p {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-headline-sm); line-height: 1.32; text-transform: uppercase;
}
.kinetic__note .t-pulse { color: var(--pulse-soft); }

.surgeons { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
@media (min-width: 900px) { .surgeons { grid-template-columns: repeat(12, 1fr); } }
.surgeon { position: relative; grid-column: span 12; display: flex; flex-direction: column; gap: 28px; padding: 32px; }
@media (min-width: 900px) { .surgeon--a { grid-column: span 5; } .surgeon--b { grid-column: 8 / span 5; margin-top: 120px; } }
.surgeon .lb { position: absolute; width: 16px; height: 16px; }
.surgeon .lb.tl { top: 0; left: 0; border-top: 1px solid rgba(255,255,255,0.5); border-left: 1px solid rgba(255,255,255,0.5); }
.surgeon .lb.tr { top: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.5); border-right: 1px solid rgba(255,255,255,0.5); }
.surgeon .lb.bl { bottom: 0; left: 0; border-bottom: 1px solid rgba(255,255,255,0.5); border-left: 1px solid rgba(255,255,255,0.5); }
.surgeon .lb.br { bottom: 0; right: 0; border-bottom: 1px solid rgba(255,255,255,0.5); border-right: 1px solid rgba(255,255,255,0.5); }
.surgeon__op { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.16em; color: var(--pulse-soft); }
@media (min-width: 900px) {
  .surgeon--b .surgeon__op, .surgeon--b .surgeon__name, .surgeon--b .surgeon__body { text-align: right; }
}
.surgeon__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-md); text-transform: uppercase; }
.surgeon__role { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-surface-variant); background: var(--surface-container-low); padding: 6px 10px; }
@media (min-width: 900px) { .surgeon--b .surgeon__role { align-self: flex-end; } }
.surgeon__body p { color: var(--on-surface-variant); line-height: 1.6; }
.surgeon__body p + p { margin-top: 14px; }
.surgeon__portrait {
  position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--surface-container); box-shadow: 0 40px 90px -50px #000;
}
.surgeon__portrait .fig {
  position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 30% 10%, var(--surface-container-high), var(--surface-container-lowest));
  filter: grayscale(1); transition: filter var(--dur-sweep) var(--ease-shutter);
  display: grid; place-items: center;
}
.surgeon:hover .surgeon__portrait .fig { filter: grayscale(0); }
.surgeon__portrait .fig .glyph { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 10vw, 7rem); color: color-mix(in srgb, var(--surface-bright) 70%, transparent); }
.surgeon__portrait .fig--photo { background: none; padding: 0; }
.surgeon__portrait .fig--photo img { width: 100%; height: 100%; object-fit: cover; }
.surgeon__portrait .grad { position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 2%, transparent 55%); }
.surgeon__portrait .scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--pulse); opacity: 0; box-shadow: 0 0 20px var(--pulse); }
.surgeon:hover .surgeon__portrait .scan { animation: portrait-scan 1.1s var(--ease-scalpel); }
@keyframes portrait-scan { 0% { top: 0; opacity: 0.9; } 100% { top: 100%; opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (min-width: 900px) { .surgeon--b .chips { justify-content: flex-end; } }
.chips span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); border: 0.5px solid var(--hairline); padding: 4px 8px; }

/* -----------------------------------------------------------------------------
   17. CONSULTATION PAGE
   -------------------------------------------------------------------------- */
.discharge { position: relative; min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding-block: clamp(64px, 12vh, 140px); overflow: hidden; }
.discharge__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; max-width: 900px; }
.discharge__badge { display: inline-flex; align-items: center; gap: 20px; padding: 12px 20px; background: var(--surface-container-high); box-shadow: 0 30px 60px -40px #000; }
.discharge__badge span { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.1em; text-transform: uppercase; }
.discharge__badge .sep { width: 1px; height: 16px; background: var(--outline-variant); }
.discharge__badge .act { color: var(--pulse-soft); font-weight: 700; letter-spacing: 0.2em; }
.discharge h1 { font-size: var(--fs-display-xl); }
.discharge h1.glitch { position: relative; }
.discharge h1.glitch.on { text-shadow: 2px 0 var(--pulse-soft), -2px 0 var(--secondary); }
.discharge__sub { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-surface-variant); }
.discharge__sub b { color: var(--on-surface); font-weight: 700; }
.discharge__chan { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--outline); }
.discharge__chan .d { width: 4px; height: 4px; border-radius: 50%; background: var(--outline); }

.intake { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--hairline-soft); margin-top: 8px; }
@media (min-width: 900px) { .intake { grid-template-columns: 5fr 7fr; } }
.intake__aside { background: var(--surface-container-lowest); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 28px; }
.intake__aside h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-headline-md); text-transform: uppercase; }
.contact-row { display: flex; flex-direction: column; gap: 4px; padding-block: 14px; border-top: 0.5px solid var(--hairline); }
.contact-row .k { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); }
.contact-row .v { font-size: var(--fs-body-lg); color: var(--on-surface); display: inline-flex; align-items: center; gap: 10px; }
.contact-row button.copy { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--outline); border: 0.5px solid var(--hairline); padding: 3px 7px; transition: color var(--dur-snap) linear, border-color var(--dur-snap) linear; }
.contact-row button.copy:hover { color: var(--pulse-soft); border-color: var(--pulse-soft); }

.intake__form { background: var(--surface-container-lowest); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); }
.field label .req { color: var(--pulse-soft); }
.field input, .field textarea, .field select {
  width: 100%; background: transparent; color: var(--on-surface);
  border: 0; border-bottom: 0.5px solid var(--hairline-bold);
  padding: 10px 0; font-family: var(--font-body); font-size: var(--fs-body-md);
  transition: border-color var(--dur-snap) linear;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--pulse-soft); }
.field option { background: var(--surface-container); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--pulse); }
.field__err { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pulse-soft); min-height: 0; opacity: 0; transition: opacity var(--dur-snap) linear; }
.field.invalid .field__err { opacity: 1; }
.form-note { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--outline); }
.form-status { font-family: var(--font-mono); font-size: var(--fs-tech-sm); letter-spacing: 0.1em; text-transform: uppercase; color: var(--pulse-soft); min-height: 1.2em; }

/* -----------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { position: relative; z-index: var(--z-content); border-top: 0.5px solid var(--hairline); background: var(--surface-container-lowest); padding: clamp(48px, 8vh, 72px) var(--margin-edge); }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; align-items: flex-start; }
.site-footer__brand { display: flex; flex-direction: column; gap: 16px; }
.site-footer__brand .line { display: inline-flex; align-items: center; gap: 12px; }
.site-footer__brand .line .d { width: 6px; height: 6px; border-radius: 50%; background: var(--outline); }
.site-footer__brand img { height: 60px; width: auto; margin-top: 6px; }
.site-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 24px clamp(24px, 6vw, 64px); }
@media (min-width: 1024px) { .site-footer__cols { grid-template-columns: repeat(4, auto); } }
@media (max-width: 460px) { .site-footer__cols { grid-template-columns: 1fr; gap: 20px; } }
.site-footer__cols .col { display: flex; flex-direction: column; gap: 6px; }
.site-footer__cols .k { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--outline); }
.site-footer__cols a:hover { color: var(--primary); }
.site-footer__base { margin-top: clamp(40px, 6vh, 64px); padding-top: 28px; border-top: 0.5px solid var(--hairline-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer__base span { font-family: var(--font-mono); font-size: var(--fs-tech-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--outline); opacity: 0.6; }

/* -----------------------------------------------------------------------------
   19. UTILITIES
   -------------------------------------------------------------------------- */
.flow > * + * { margin-top: var(--flow, 1.25rem); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.mono-list { display: flex; flex-direction: column; }
.grid-12 { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
@media (min-width: 768px) { .grid-12 { grid-template-columns: repeat(12, 1fr); } }
.span-8 { grid-column: span 12; } .span-4 { grid-column: span 12; }
@media (min-width: 768px) { .span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; } }
.mt-s { margin-top: 1rem; } .mt-m { margin-top: 2rem; } .mt-l { margin-top: clamp(3rem, 8vh, 6rem); }
.measure { max-width: 62ch; } .measure-sm { max-width: 46ch; }
.text-r { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
