/* =========================================================================
   DOCTOR OVERLAP — Motion Clinic
   ========================================================================= */
:root {
  --orange: #FF5500;
  --orange-hot: #FF6A1A;
  --orange-deep: #E04A00;
  --orange-soft: rgba(255, 85, 0, 0.08);
  --orange-line: rgba(255, 85, 0, 0.28);
  --white: #FFFFFF;
  --paper: #FFFFFF;
  --ink: #1A0B02;
  --ink-2: #4A3428;
  --ink-3: #8A7466;
  --line: rgba(26, 11, 2, 0.12);
  --w-line: rgba(255, 255, 255, 0.35);
  --f-sans: "Inter Tight", system-ui, -apple-system, Segoe UI, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-serif: "Instrument Serif", "PT Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grid: 44px;
  --gutter: clamp(16px, 3.4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
img, video, canvas { display: block; max-width: 100%; }
::selection { background: var(--orange); color: #fff; }

.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.serif, em.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.theme-orange { background: var(--orange); color: #fff; position: relative; }

.section-label { color: var(--orange); margin-bottom: 28px; display: inline-flex; align-items: center; gap: 12px; }
.theme-orange .section-label { color: #fff; }
.h2 {
  font-size: clamp(36px, 6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0;
  max-width: 15ch;
}
.h2 em { color: var(--orange); font-size: 1.04em; }
.theme-orange .h2 em { color: #fff; opacity: 0.92; }

/* reveal: blur → sharp, the zkPass way */
.reveal { opacity: 0; filter: blur(10px); transform: translateY(18px); }
.no-js .reveal, .reduced .reveal { opacity: 1; filter: none; transform: none; }

/* scanlines */
.scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* corner ticks */
.tick { position: absolute; width: 12px; height: 12px; border-color: currentColor; border-style: solid; border-width: 0; pointer-events: none; z-index: 4; }
.tick--tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.tick--tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.tick--bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.tick--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }

/* ---------------- logo ---------------- */
.logo-box { position: relative; width: 38px; height: 38px; display: inline-block; flex: none; }
.logo-box i { position: absolute; inset: 0; }
.logo-box i:first-child { background: #fff; border: 1.5px solid #fff; transform: translate(4px, 4px); opacity: 0.45; transition: transform .5s var(--ease); }
.logo-box i:last-child { background: var(--orange); border: 1.5px solid #fff; }
.logo-box i:last-child::before, .logo-box i:last-child::after { content: ""; position: absolute; background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.logo-box i:last-child::before { width: 56%; height: 16%; }
.logo-box i:last-child::after { width: 16%; height: 56%; }
.nav__brand:hover .logo-box i:first-child { transform: translate(-4px, -4px); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  height: 48px; padding: 0 22px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease);
  white-space: nowrap;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); }
.btn:hover::before { transform: scaleY(1); }
.btn__arrow { font-size: 14px; transition: transform .45s var(--ease); }
.btn:hover .btn__arrow { transform: translate(3px, -3px) rotate(0deg); }
.btn--white { background: #fff; color: var(--orange); }
.btn--white::before { background: var(--ink); }
.btn--white:hover { color: #fff; }
.btn--ghost { color: #fff; box-shadow: inset 0 0 0 1px var(--w-line); }
.btn--ghost::before { background: #fff; }
.btn--ghost:hover { color: var(--orange); }
.btn--orange { background: var(--orange); color: #fff; }
.btn--orange::before { background: var(--ink); }
.btn--xl { height: 64px; padding: 0 30px; font-size: 13px; }

/* ---------------- badge ---------------- */
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 11px; border: 1px solid rgba(255,255,255,0.6); color: #fff; font-size: 10px; letter-spacing: 0.26em; }
.badge__sq { width: 6px; height: 6px; background: #fff; animation: breath 1.6s ease-in-out infinite; }
@keyframes breath { 0%,100% { opacity: .35; box-shadow: 0 0 0 0 rgba(255,255,255,0); } 50% { opacity: 1; box-shadow: 0 0 10px 2px rgba(255,255,255,.7); } }

/* =========================================================================
   LOADER
   ========================================================================= */
.loader { position: fixed; inset: 0; z-index: 1000; pointer-events: all; }
.loader__panel { position: absolute; inset: 0; }
.loader__panel--white { background: #fff; }
.loader__panel--orange { background: var(--orange); color: #fff; display: grid; place-items: center; overflow: hidden; }
.loader__ascii { position: absolute; inset: 0; opacity: 0.55; }
.loader__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.loader__logo .logo-box { width: 56px; height: 56px; }
.loader__status { font-size: 11px; min-height: 1.2em; }
.loader__bar { font-size: 12px; letter-spacing: 0.08em; white-space: pre; }
.loader__count { font-family: var(--f-mono); font-weight: 800; font-size: clamp(64px, 12vw, 150px); line-height: 1; letter-spacing: -0.04em; text-shadow: 0 0 30px rgba(255,255,255,.45); }
.loader__corner { position: absolute; z-index: 2; font-size: 10px; line-height: 1.7; }
.loader__corner--tl { top: 24px; left: var(--gutter); }
.loader__corner--br { bottom: 24px; right: var(--gutter); }

/* =========================================================================
   GLOBAL LAYERS
   ========================================================================= */
.dotgrid { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .nav { position: relative; z-index: 1; }

.cursor { position: fixed; left: 0; top: 0; z-index: 900; pointer-events: none; --c: var(--orange); }
.cursor.is-light { --c: #fff; }
.cursor__cross { position: absolute; width: 16px; height: 16px; transform: translate(-50%, -50%); }
.cursor__cross::before, .cursor__cross::after { content: ""; position: absolute; background: var(--c); left: 50%; top: 50%; transform: translate(-50%, -50%); transition: background .3s; }
.cursor__cross::before { width: 16px; height: 1.5px; }
.cursor__cross::after { width: 1.5px; height: 16px; }
.cursor__ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--c);
  display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s, transform .45s var(--ease);
}
.cursor__label { font-size: 10px; letter-spacing: .2em; color: #fff; opacity: 0; transition: opacity .25s; font-weight: 700; }
.cursor.is-play .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--orange); border-color: var(--orange); }
.cursor.is-light.is-play .cursor__ring { background: #fff; border-color: #fff; }
.cursor.is-light.is-play .cursor__label { color: var(--orange); }
.cursor.is-play .cursor__label { opacity: 1; }
.cursor.is-play .cursor__cross { opacity: 0; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; transform: rotate(45deg); }
.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: flex; align-items: center; gap: 24px;
  height: 72px; padding: 0 var(--gutter);
  color: #fff;
  transition: color .4s, background .4s, height .4s var(--ease);
}
.nav.is-light-bg { color: var(--ink); background: rgba(255,255,255,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); height: 64px; }
.nav__brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.nav.is-light-bg .logo-box i:first-child { background: var(--orange); border-color: var(--orange); }
.nav__word { font-size: 11px; line-height: 1.25; font-weight: 700; letter-spacing: 0.24em; }
.nav__tc { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 11px; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: rec 1.2s steps(2) infinite; }
.nav.is-light-bg .rec { background: var(--orange); }
@keyframes rec { 50% { opacity: .15; } }
.nav__links { display: flex; gap: 30px; }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { height: 40px; }
.nav.is-light-bg .nav__cta { background: var(--orange); color: #fff; }
@media (max-width: 1000px) { .nav__links { display: none; } }
@media (max-width: 640px) { .nav__cta { padding: 0 14px; } .nav__cta [data-scramble] { display: none; } }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  min-height: 100vh; min-height: 100svh; overflow: hidden;
  /* real grid: on short or narrow screens the hero grows instead of overlapping */
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto minmax(clamp(40px, 18vh, 260px), 1fr) auto auto;
  column-gap: 24px; padding: clamp(84px, 12vh, 104px) var(--gutter) 0;
}
.hero__ascii { position: absolute; inset: 0; z-index: 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 34% 44% at 70% 42%, rgba(255,200,150,0.42), transparent 70%), radial-gradient(ellipse 80% 60% at 0% 100%, rgba(170,40,0,0.35), transparent 70%); }
.hero__spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; z-index: 3; box-shadow: 0 0 12px 3px rgba(255,255,255,.8), 0 0 30px 8px rgba(255,255,255,.25); pointer-events: none; }
.hero__spark--a { left: 66%; top: 12%; animation: sparkA 7s ease-in-out infinite; }
.hero__spark--b { left: 92%; top: 64%; animation: sparkB 9s ease-in-out infinite; }
@keyframes sparkA { 0%,100% { opacity: .15; transform: scale(.8); } 30% { opacity: .2; } 33% { opacity: 1; transform: scale(1.4); } 40% { opacity: .3; transform: scale(1); } }
@keyframes sparkB { 0%,100% { opacity: .1; transform: scale(.8); } 18% { opacity: .6; transform: scale(1.2); } 22% { opacity: .15; } 64% { opacity: 1; transform: scale(1.5); } 70% { opacity: .2; } }

.hero__meta { grid-row: 1; grid-column: 1; position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__label { color: rgba(255,255,255,0.85); font-size: 10px; letter-spacing: .28em; }
.hero__side { grid-row: 1; grid-column: 2; position: relative; z-index: 3; display: grid; gap: 8px; align-content: start; font-size: 10px; letter-spacing: .2em; text-align: right; }
.hero__side div { display: flex; gap: 16px; justify-content: flex-end; }
.hero__side .k { opacity: .6; }
.hero__side .v { font-weight: 700; min-width: 16ch; }

.hero__content { grid-row: 3; grid-column: 1 / -1; position: relative; z-index: 3; padding-bottom: clamp(16px, 3vh, 28px); min-width: 0; }
.hero__title { margin: 0; font-weight: 700; font-size: clamp(38px, min(10.5vw, 17vh), 168px); line-height: 0.86; letter-spacing: -0.06em; text-shadow: 0 2px 40px rgba(160,40,0,.25); overflow-wrap: anywhere; }
.hero__title .line { display: block; }
.hero__title .serif { font-weight: 400; letter-spacing: -0.035em; font-size: 0.86em; margin-top: 0.08em; }
.hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-top: clamp(18px, 4vh, 34px); flex-wrap: wrap; }
.hero__sub { max-width: 46ch; margin: 0; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: rgba(255,255,255,0.92); }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.ecg-wrap { grid-row: 4; grid-column: 1 / -1; position: relative; z-index: 3; margin: 0 calc(-1 * var(--gutter)); height: clamp(48px, 9vh, 96px); }
.ecg { width: 100%; height: 100%; overflow: visible; display: block; }
.ecg__base, .ecg__path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ecg__base { stroke: rgba(255,255,255,.28); stroke-width: 1.5; }
.ecg__path { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.ecg__dot { position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(255,255,255,.9), 0 0 30px 10px rgba(255,255,255,.35); will-change: transform; }
.ecg__bpm { position: absolute; right: var(--gutter); top: -6px; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }


/* =========================================================================
   VITALS
   ========================================================================= */
.vitals { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(60px, 8vw, 120px); }
.vitals__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.vital { padding: 28px 24px 30px 0; border-right: 1px solid var(--line); position: relative; }
.vital + .vital { padding-left: 24px; }
.vital:last-child { border-right: 0; }
.vital__num { font-size: clamp(54px, 7vw, 112px); font-weight: 700; line-height: 1; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.vital__num small { font-size: .35em; letter-spacing: 0; color: var(--orange); margin-left: 4px; font-weight: 600; }
.vital__k { margin-top: 14px; color: var(--ink-3); font-size: 10px; }
.vital__bar { margin-top: 22px; height: 3px; background: var(--orange-soft); overflow: hidden; }
.vital__bar i { display: block; height: 100%; width: calc(var(--f) * 100%); background: var(--orange); transform: scaleX(0); transform-origin: left; }
@media (max-width: 860px) { .vitals__grid { grid-template-columns: repeat(2, 1fr); } .vital:nth-child(2) { border-right: 0; } .vital:nth-child(3) { padding-left: 0; } .vital:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* =========================================================================
   SHOWREEL / OVERLAP
   ========================================================================= */
.showreel { position: relative; }
.showreel__pin { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; padding: 100px var(--gutter) 60px; overflow: hidden; }
.showreel__bgword { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 1vw; pointer-events: none; font-weight: 800; font-size: 22vw; letter-spacing: -0.07em; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--orange-line); z-index: 0; }
.showreel__head { position: relative; z-index: 2; align-self: start; padding-top: 6vh; }
.showreel__head .h2 { font-size: clamp(32px, 3.8vw, 60px); max-width: 11ch; }
.reel-frame { position: relative; z-index: 2; height: min(78vh, 820px); aspect-ratio: 9 / 16; background: var(--orange); color: #fff; overflow: hidden; box-shadow: 0 40px 120px -30px rgba(255,85,0,.55), 0 0 0 1px var(--orange); touch-action: pan-y; }
.reel-frame video, .reel-frame__ascii { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-frame__ascii { z-index: 2; }
.reel-frame__divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; z-index: 3; box-shadow: 0 0 14px rgba(255,255,255,.9); }
.reel-frame__handle { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; background: #fff; color: var(--orange); display: grid; place-items: center; font-size: 18px; letter-spacing: 0; font-weight: 800; }
.reel-frame__tag { position: absolute; top: 18px; z-index: 4; font-size: 9px; padding: 5px 8px; background: rgba(255,255,255,.95); color: var(--orange); font-weight: 700; }
.reel-frame__tag--l { left: 28px; }
.reel-frame__tag--r { right: 28px; background: var(--orange); color: #fff; }
.showreel__meta { position: relative; z-index: 2; align-self: end; justify-self: end; display: grid; gap: 10px; text-align: right; color: var(--ink-3); font-size: 10px; padding-bottom: 6vh; }
.showreel__meta span:nth-child(2) { color: var(--orange); font-size: 28px; letter-spacing: .04em; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) {
  .showreel__pin { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .showreel__head { padding-top: 0; justify-self: start; text-align: left; }
  .showreel__meta { justify-self: center; text-align: center; padding: 0; }
  .reel-frame { height: auto; width: min(86vw, 420px); }
}

/* =========================================================================
   WORK
   ========================================================================= */
.work { position: relative; padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(80px, 10vw, 140px); }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 56px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { padding: 10px 14px; border: 1px solid var(--line); transition: background .35s var(--ease), color .35s, border-color .35s; font-size: 10px; letter-spacing: .2em; }
.filters button sup { color: var(--orange); margin-left: 4px; font-size: 9px; }
.filters button:hover { border-color: var(--orange); }
.filters button.is-active { background: var(--orange); color: #fff; border-color: var(--orange); }
.filters button.is-active sup { color: #fff; }
.work__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 24px); }
@media (max-width: 1200px) { .work__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .work__grid { grid-template-columns: repeat(2, 1fr); } }

.card { position: relative; color: var(--ink); transform-style: preserve-3d; }
.card.is-hidden { display: none; }
.card:nth-child(4n+2) { margin-top: 60px; }
.card:nth-child(4n+4) { margin-top: 30px; }
@media (max-width: 1200px) { .card:nth-child(n) { margin-top: 0; } .card:nth-child(3n+2) { margin-top: 50px; } }
@media (max-width: 820px) { .card:nth-child(n) { margin-top: 0; } .card:nth-child(2n) { margin-top: 40px; } }
.card__media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--orange); color: #fff; transform: translateZ(0); clip-path: inset(0 0 0 0); transition: clip-path .7s var(--ease); }
.card__media img, .card__media video, .card__media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__media img { transition: transform 1.2s var(--ease), opacity .3s; }
.card__media video { opacity: 0; }
.card__media canvas { z-index: 2; opacity: 0; pointer-events: none; }
.card.is-live .card__media video { opacity: 1; }
.card.is-live .card__media img { opacity: 0; }
.card:hover .card__media { clip-path: inset(10px 10px 10px 10px); }
.card__media .tick { opacity: 0; transition: opacity .4s; }
.card:hover .card__media .tick { opacity: 1; }
.card__no { position: absolute; top: 12px; left: 12px; z-index: 3; font-size: 9px; padding: 5px 7px; background: #fff; color: var(--orange); font-weight: 700; transition: transform .5s var(--ease); }
.card__dur { position: absolute; bottom: 12px; right: 12px; z-index: 3; font-size: 9px; padding: 5px 7px; background: var(--orange); color: #fff; font-weight: 700; }
.card:hover .card__no { transform: translate(10px, 10px); }
.card__info { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 14px; }
.card__title { font-size: clamp(18px, 1.5vw, 24px); font-weight: 600; letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.card__sector { color: var(--ink-3); font-size: 9px; margin-top: 6px; }
.card__lang { color: var(--orange); font-size: 9px; white-space: nowrap; }
.card__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255,255,255,.25); }
.card__bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* =========================================================================
   BEHIND THE CUT
   ========================================================================= */
.behind { padding: clamp(90px, 11vw, 150px) var(--gutter); overflow: hidden; }
.behind__head { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px 48px; margin-bottom: 56px; }
.behind__head .section-label { grid-column: 1 / -1; margin-bottom: 0; }
.behind__p { margin: 0; max-width: 40ch; justify-self: end; color: rgba(255,255,255,.88); font-size: 17px; }
.behind__row { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.pov { position: relative; cursor: none; }
.pov__media { position: relative; aspect-ratio: 9/16; overflow: hidden; background: rgba(0,0,0,.15); box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.pov__media video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease); }
.pov:hover .pov__media video { transform: scale(1); }
.pov__cap { display: flex; justify-content: space-between; margin-top: 14px; font-size: 10px; }
.pov__cap span:last-child { opacity: .7; }
.pov__media .tick { color: #fff; }
@media (max-width: 820px) { .behind__head { grid-template-columns: 1fr; } .behind__p { justify-self: start; } .behind__row { grid-template-columns: 1fr 1fr; } .pov:nth-child(3) { display: none; } }

/* =========================================================================
   PROCESS
   ========================================================================= */
.process { position: relative; padding: clamp(90px, 11vw, 160px) var(--gutter); }
.process .h2 { max-width: 16ch; }
.process__track { position: relative; margin-top: 80px; }
.process__line { position: absolute; left: 0; right: 0; top: 18px; height: 1px; background: var(--line); }
.process__fill { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }
/* compositor-only beam: the full-width carrier slides, its 60px head rides the right edge */
.process__line { overflow: hidden; }
.process__beam { position: absolute; top: -1px; left: 0; width: 100%; height: 3px; z-index: 2; animation: beam 3.2s linear infinite; will-change: transform, opacity; }
.process__beam::before { content: ""; position: absolute; right: 0; top: 0; width: 60px; height: 100%; background: linear-gradient(90deg, transparent, var(--orange), transparent); box-shadow: 0 0 10px var(--orange); }
@keyframes beam { 0% { transform: translateX(-100%) translateX(60px); opacity: 0; } 10%, 90% { opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }
.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step { position: relative; padding-top: 0; }
.step__num { display: inline-grid; place-items: center; width: 38px; height: 38px; background: #fff; border: 1px solid var(--orange); color: var(--orange); font-weight: 700; letter-spacing: .05em; position: relative; z-index: 3; transition: background .4s, color .4s; }
.step.is-on .step__num { background: var(--orange); color: #fff; box-shadow: 0 0 0 6px var(--orange-soft); }
.step__art { font-family: var(--f-mono); font-size: 13px; line-height: 1.15; color: var(--orange); margin: 34px 0 26px; min-height: 6.2em; white-space: pre; }
.step h3 { font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -0.04em; margin: 0 0 12px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.step__dose { margin-top: 22px; color: var(--ink-3); font-size: 9px; padding-top: 14px; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .process__steps { grid-template-columns: 1fr 1fr; gap: 56px 28px; } .process__line { display: none; } }
@media (max-width: 520px) { .process__steps { grid-template-columns: 1fr; } }

/* =========================================================================
   RX
   ========================================================================= */
.rx { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(100px, 12vw, 180px); }
.rx__list { list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid var(--line); }
.rx__list li { display: flex; align-items: baseline; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(20px, 2vw, 30px); letter-spacing: -0.03em; font-weight: 500; transition: padding .5s var(--ease), color .3s; }
.rx__list li .mono { color: var(--orange); font-size: 10px; }
.rx__list li:hover { padding-left: 14px; color: var(--orange); }
.rx__card-wrap { perspective: 1200px; display: grid; place-items: center; }
.rx-card { position: relative; width: min(100%, 460px); background: var(--orange); color: #fff; padding: 34px 32px 28px; transform-style: preserve-3d; box-shadow: 0 50px 100px -30px rgba(255,85,0,.6); will-change: transform; }
.rx-card::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(255,255,255,.45); pointer-events: none; }
.rx-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.25) 45%, transparent 60%); background-size: 250% 100%; background-position: var(--shine, 100%) 0; mix-blend-mode: overlay; }
.rx-card__top { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.5); transform: translateZ(30px); }
.rx-card__rx { font-family: var(--f-serif); font-size: 72px; line-height: .8; }
.rx-card__clinic { font-size: 12px; font-weight: 700; line-height: 1.6; }
.rx-card__clinic span { font-weight: 400; font-size: 9px; opacity: .8; }
.rx-card__rows { margin: 0; padding: 8px 0; transform: translateZ(20px); }
.rx-card__rows div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,.35); }
.rx-card__rows dt { font-size: 9px; opacity: .75; }
.rx-card__rows dd { margin: 0; font-family: var(--f-sans); text-transform: none; letter-spacing: -0.01em; font-size: 15px; font-weight: 500; }
.rx-card__foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; transform: translateZ(40px); }
.barcode { display: flex; height: 44px; gap: 2px; align-items: stretch; }
.barcode i { background: #fff; display: block; }
.rx-card__sig { font-size: 9px; text-align: right; line-height: 1.4; }
.rx-card__sig .serif { font-size: 30px; text-transform: none; letter-spacing: 0; display: block; }
.rx-card .tick { color: #fff; }
@media (max-width: 900px) { .rx { grid-template-columns: 1fr; } }

/* =========================================================================
   CONSULT / FOOTER
   ========================================================================= */
.consult { padding: clamp(90px, 11vw, 150px) 0 0; overflow: hidden; }
.consult__top { position: relative; z-index: 3; padding: 0 var(--gutter); display: grid; grid-template-columns: 1.4fr 1fr; align-items: end; gap: 40px; }
.consult__top .section-label { grid-column: 1 / -1; margin-bottom: 0; }
.consult__title { margin: 0; font-size: clamp(48px, 8vw, 132px); line-height: .9; letter-spacing: -0.055em; font-weight: 700; }
.consult__title em { font-weight: 400; }
.consult__ctas { display: grid; gap: 18px; justify-items: start; }
.consult__note { font-size: 10px; opacity: .85; margin: 0; }
.consult__ascii { position: relative; z-index: 1; width: 100%; margin-top: clamp(40px, 6vw, 90px); }
.consult__bar { position: relative; z-index: 3; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px var(--gutter); border-top: 1px solid var(--w-line); font-size: 10px; }
.consult__beat { display: inline-flex; align-items: center; gap: 10px; }
.consult__beat i { width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: pulse 0.833s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@media (max-width: 820px) { .consult__top { grid-template-columns: 1fr; } }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox { position: fixed; inset: 0; z-index: 950; display: grid; grid-template-columns: 1fr minmax(260px, 380px); visibility: hidden; }
.lightbox.is-open { visibility: visible; }
.lightbox__bg { position: absolute; inset: 0; background: var(--orange); clip-path: inset(100% 0 0 0); }
.lightbox__stage { position: relative; z-index: 2; display: grid; place-items: center; padding: 70px 24px 24px; }
.lightbox__stage video { height: min(86vh, 900px); aspect-ratio: 9/16; width: auto; max-width: 100%; object-fit: contain; background: #000; box-shadow: 0 40px 120px -20px rgba(80,20,0,.6); }
.lightbox__info { position: relative; z-index: 2; color: #fff; padding: 110px 40px 40px 0; display: flex; flex-direction: column; gap: 18px; }
.lightbox__file { font-size: 10px; opacity: .85; }
.lightbox__title { margin: 0; font-size: clamp(36px, 4vw, 64px); line-height: .95; letter-spacing: -0.05em; font-weight: 700; }
.lightbox__desc { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.92); }
.lightbox__meta { margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid var(--w-line); }
.lightbox__meta div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--w-line); font-size: 10px; }
.lightbox__meta dd { margin: 0; font-weight: 700; }
.lightbox__nav { display: flex; gap: 22px; margin-top: auto; font-size: 11px; }
.lightbox__nav button:hover { text-decoration: underline; text-underline-offset: 6px; }
.lightbox__close { position: absolute; top: 22px; right: var(--gutter); z-index: 3; color: #fff; font-size: 11px; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--w-line); }
.lightbox__close:hover { background: #fff; color: var(--orange); }
.lightbox__stage, .lightbox__info, .lightbox__close { opacity: 0; }
@media (max-width: 860px) {
  .lightbox { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .lightbox__stage { padding: 64px 16px 0; }
  .lightbox__stage video { height: 68vh; }
  .lightbox__info { padding: 24px 16px 40px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* =========================================================================
   PERFORMANCE TIERS  (html[data-tier] set by main.js: 2 full · 1 lite · 0 potato)
   ========================================================================= */
[data-tier="1"] .reveal, [data-tier="0"] .reveal { filter: none; }
[data-tier="1"] .scanlines, [data-tier="0"] .scanlines { display: none; }
[data-tier="1"] .ecg__path, [data-tier="0"] .ecg__path { filter: none; }
[data-tier="1"] .nav.is-light-bg, [data-tier="0"] .nav.is-light-bg { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
[data-tier="1"] .reel-frame, [data-tier="0"] .reel-frame { box-shadow: 0 0 0 1px var(--orange); }
[data-tier="1"] .rx-card, [data-tier="0"] .rx-card { box-shadow: none; }
[data-tier="0"] body { background-image: radial-gradient(rgba(255,85,0,.22) 1px, transparent 1.5px); background-size: 44px 44px; background-position: center 0; }
[data-tier="0"] .hero__title, [data-tier="0"] .loader__count { text-shadow: none; }
[data-tier="0"] .hero__spark, [data-tier="0"] .loader__ascii, [data-tier="0"] .rx-card::after { display: none; }
[data-tier="0"] .hero::before { background: radial-gradient(ellipse 60% 60% at 70% 42%, rgba(255,200,150,0.3), transparent 70%); }
[data-tier="0"] .badge__sq, [data-tier="0"] .consult__beat i { animation: none; }
[data-tier="0"] .card__media { transition: none; }
[data-tier="0"] .card:hover .card__media { clip-path: none; }

/* =========================================================================
   RESPONSIVE PASS
   ========================================================================= */
@media (max-width: 1100px) { .hero__side { display: none; } .hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hero { grid-template-rows: auto minmax(30vh, 1fr) auto auto; }
  .hero__meta .badge { font-size: 9px; letter-spacing: .18em; }
  .hero__title { font-size: clamp(38px, 12.5vw, 72px); }
  .hero__ctas { width: 100%; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: space-between; }
  .ecg__bpm { top: -16px; }
  .showreel__bgword { font-size: 30vw; }
  .vital { padding-right: 12px; }
  .vital + .vital { padding-left: 12px; }
  .lightbox__close { top: 12px; }
}
@media (max-width: 420px) {
  .work__grid { gap: 12px; }
  .card__info { flex-direction: column; gap: 4px; }
  .rx-card { padding: 26px 20px 22px; }
  .rx-card__rows div { grid-template-columns: 1fr; gap: 4px; }
  .btn--xl { height: 54px; padding: 0 20px; font-size: 11px; }
  .barcode { height: 36px; }
}
/* short, wide windows (laptop split-screen, app side panes) */
@media (max-height: 640px) and (min-width: 761px) {
  .hero__meta { gap: 10px; }
  .showreel__pin { min-height: 0; padding-top: 80px; padding-bottom: 60px; }
  .reel-frame { height: min(82vh, 820px); }
  .lightbox__stage video { height: 80vh; }
  .lightbox__info { padding-top: 64px; }
}
/* keep the nav from crowding between breakpoints */
@media (max-width: 1180px) { .nav__links { gap: 20px; } .nav__tc { display: none; } }
