/* Dr. Benjamín Rivera: landing page
   Structure borrowed from cinematic full-screen panels; warmth from clinical teal,
   the navy ink and copper of his logo. */

:root {
  --ink: #0e1b2c;
  --ink-2: #15283f;
  --paper: #f6f1e7;
  --paper-2: #ece4d4;
  --teal: #1f6f74;
  --teal-deep: #0f4a50;
  --teal-glow: #6fc3bd;
  --copper: #c7784f;
  --copper-deep: #a95d37;

  --on-dark: #eef3f2;
  --on-dark-muted: #a7b9bb;
  --on-light: #14202c;
  --on-light-muted: #56646c;
  --rule-dark: rgba(238, 243, 242, 0.16);
  --rule-light: rgba(20, 32, 44, 0.14);

  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --text-display: clamp(3rem, 1.2rem + 6.4vw, 7.6rem);
  --text-statement: clamp(2rem, 1.1rem + 3.4vw, 4.4rem);
  --text-headline: clamp(2.1rem, 1.3rem + 2.8vw, 4rem);
  --text-lede: clamp(1rem, 0.94rem + 0.3vw, 1.18rem);
  --text-small: 0.8rem;

  --gutter: clamp(1rem, 0.3rem + 3.4vw, 3.5rem);
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-light);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--paper); color: var(--ink); border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ---------- Progress line and section markers ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress__bar {
  display: block; height: 100%; background: var(--copper);
  transform-origin: 0 50%; transform: scaleX(0);
}

.dots {
  position: fixed; right: calc(var(--gutter) * 0.5); top: 50%; z-index: 55;
  display: grid; gap: 12px; transform: translateY(-50%);
}
.dots a {
  width: 9px; height: 9px; border: 1px solid currentColor; opacity: 0.55;
  color: var(--on-dark); transition: background-color 300ms, opacity 300ms, transform 300ms var(--ease);
}
.dots a:hover { opacity: 1; transform: scale(1.25); }
.dots a.is-active { background: var(--copper); border-color: var(--copper); opacity: 1; }
body.tone-light .dots a { color: var(--on-light); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 var(--gutter); color: var(--on-dark);
  transition: color 400ms, background-color 400ms, box-shadow 400ms;
}
body.tone-light .site-header {
  color: var(--on-light);
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rule-light);
}
body.is-scrolled:not(.tone-light) .site-header {
  background: rgba(14, 27, 44, 0.55);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand__mark { width: 30px; height: 44px; color: currentColor; stroke: var(--copper); flex: none; }
.brand__text { display: grid; line-height: 1.15; }
.brand__name { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand__role { font-size: 0.74rem; opacity: 0.7; letter-spacing: 0.04em; }

.site-nav { display: flex; gap: clamp(1rem, 2vw, 2rem); font-size: 0.9rem; }
.site-nav a { text-decoration: none; opacity: 0.85; position: relative; padding: 0.3rem 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 350ms var(--ease);
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-header__cta { justify-self: end; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.3rem; font: 500 0.95rem/1 var(--font-sans);
  text-decoration: none; border: 1px solid transparent; border-radius: 2px;
  transition: background-color 250ms, color 250ms, border-color 250ms, transform 250ms var(--ease);
}
.btn span { transition: transform 250ms var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--copper { background: var(--copper); color: #fff; }
.btn--copper:hover { background: var(--copper-deep); }
.btn--ghost { border-color: currentColor; padding: 0.7rem 1.1rem; font-size: 0.88rem; }
.btn--ghost:hover { color: var(--ink); background: var(--on-dark); border-color: var(--on-dark); }
body.tone-light .btn--ghost:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--teal-deep); }

.link-arrow {
  display: inline-flex; gap: 0.5rem; align-items: center; font-weight: 500;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link-arrow:hover { text-decoration-color: var(--copper); }

/* ---------- Panels ---------- */
.panel {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 3rem) var(--gutter) 4rem;
  scroll-snap-align: start; overflow: hidden;
}

.eyebrow {
  margin: 0 0 1.2rem; font-size: var(--text-small); font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper);
}
.eyebrow--teal { color: var(--teal); }

.display, .statement, .headline {
  margin: 0; font-weight: 300; letter-spacing: -0.035em; line-height: 0.98;
  text-wrap: balance;
}
.display { font-size: var(--text-display); }
.statement { font-size: var(--text-statement); line-height: 1.04; }
.headline { font-size: var(--text-headline); line-height: 1.02; }
.display em, .statement em, .headline em { letter-spacing: -0.01em; }

.body { max-width: 34rem; font-size: var(--text-lede); }
.body--muted { color: var(--on-dark-muted); }

/* 1. Hero */
.hero { display: flex; align-items: flex-end; color: var(--on-dark); background: var(--ink); }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 50% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 27, 44, 0.62) 0%, rgba(14, 27, 44, 0) 55%),
    linear-gradient(180deg, rgba(14, 27, 44, 0.55) 0%, rgba(14, 27, 44, 0) 28%),
    linear-gradient(0deg, rgba(14, 27, 44, 0.96) 6%, rgba(14, 27, 44, 0.55) 42%, rgba(14, 27, 44, 0) 70%);
}
.hero__orbit {
  position: absolute; z-index: 1; width: min(62vw, 760px); right: -6vw; top: 8vh;
  fill: none; pointer-events: none;
}
.orbit__ring { stroke: rgba(238, 243, 242, 0.28); stroke-width: 0.8; }
.orbit__arc {
  stroke: var(--copper); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 14 86; stroke-dashoffset: 40;
  transform-origin: 50% 50%; animation: orbit 24s linear infinite;
}
@keyframes orbit { to { transform: rotate(360deg); } }

.hero__content { position: relative; z-index: 2; width: 100%; padding-bottom: 1.5rem; }
.hero__content .display { max-width: 12ch; }
.hero__foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem 3rem; margin-top: clamp(1.5rem, 4vh, 3rem);
}
.lede { margin: 0; max-width: 34rem; font-size: var(--text-lede); color: var(--on-dark-muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }

.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 1.1rem; display: grid; gap: 2px;
  transform: translateX(-50%); opacity: 0.7;
}
.scroll-cue span {
  width: 10px; height: 10px; border-right: 1.5px solid var(--on-dark); border-bottom: 1.5px solid var(--on-dark);
  transform: rotate(45deg); animation: cue 2.2s var(--ease) infinite;
}
.scroll-cue span + span { animation-delay: 0.15s; }
@keyframes cue { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* Circular photo frames with a tracing arc */
.orb { position: relative; margin: 0; aspect-ratio: 1; width: min(100%, 520px); justify-self: end; }
.orb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  box-shadow: 0 40px 80px -40px rgba(14, 27, 44, 0.55);
}
.orb__arc {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  fill: none; stroke-width: 0.55; stroke-linecap: round;
  stroke-dasharray: 26 74; transform: rotate(-60deg);
  transition: transform 1600ms var(--ease);
}
.orb.is-in .orb__arc { transform: rotate(-20deg); }
.orb--copper .orb__arc { stroke: var(--copper); }
.orb--light .orb__arc { stroke: var(--teal-glow); }

/* 2. Approach */
.intro {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); align-items: center;
  gap: clamp(2rem, 6vw, 7rem); background: var(--paper); color: var(--on-light);
}
.intro__text { display: grid; gap: 1.8rem; justify-items: start; }
.intro .statement em { color: var(--teal); }
.intro .body { color: var(--on-light-muted); }
.intro .orb img { object-position: 30% 50%; }

/* 3. Areas: the dial */
.areas {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: end;
  gap: 2rem clamp(2rem, 5vw, 5rem); color: var(--on-dark);
  background:
    radial-gradient(60% 70% at 85% 40%, rgba(31, 111, 116, 0.28), transparent 70%),
    var(--ink);
}
.areas__intro { display: grid; gap: 1.2rem; padding-bottom: 1rem; }
.areas .headline em { color: var(--teal-glow); }

.dial {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  gap: clamp(1rem, 2vw, 2rem); align-self: center;
}
.dial__list { display: grid; gap: 1.15rem; justify-items: end; }
.dial__item {
  all: unset; cursor: pointer; font-size: clamp(1rem, 0.8rem + 0.7vw, 1.45rem); font-weight: 300;
  color: var(--on-dark-muted); text-align: right; white-space: nowrap;
  transition: color 300ms, transform 400ms var(--ease);
}
/* Stagger the labels so they hug the circle like points on an arc. */
.dial__item:nth-child(1), .dial__item:nth-child(6) { transform: translateX(2.4rem); }
.dial__item:nth-child(2), .dial__item:nth-child(5) { transform: translateX(0.9rem); }
.dial__item:hover { color: var(--on-dark); }
.dial__item[aria-selected="true"] { color: var(--on-dark); }
.dial__item[aria-selected="true"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.7rem;
  vertical-align: middle; background: var(--copper);
}
.dial__item:focus-visible { outline: 2px solid var(--copper); outline-offset: 6px; }

.dial__circle {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 620px;
  border-radius: 50%; border: 1px solid var(--rule-dark); overflow: hidden;
  display: grid; place-items: end center;
}
.dial__image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.38; filter: saturate(0.7);
}
.dial__circle::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, transparent 20%, rgba(14, 27, 44, 0.9) 72%);
}
.dial__arc {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; fill: none;
  stroke: var(--copper); stroke-width: 0.7; stroke-linecap: round; stroke-dasharray: 9 91;
  transform: rotate(var(--dial-angle, 150deg)); transition: transform 700ms var(--ease);
}
.dial__panels { position: relative; z-index: 3; width: 72%; padding-bottom: 16%; text-align: center; }
.dial__panel h3 {
  margin: 0 0 0.6rem; font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); line-height: 1.05; color: var(--on-dark);
}
.dial__panel p { margin: 0 auto; max-width: 26rem; color: var(--on-dark-muted); font-size: 1rem; }
.dial__panel:not([hidden]) { animation: panel-in 600ms var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }

/* 4. Training */
.training {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); align-items: center;
  gap: clamp(2rem, 6vw, 7rem); color: var(--on-dark);
  background:
    radial-gradient(70% 90% at 0% 100%, rgba(111, 195, 189, 0.18), transparent 60%),
    linear-gradient(135deg, var(--teal-deep), var(--teal));
}
.training .headline em { color: #f3d3be; }
.training .eyebrow { color: #f3d3be; }
.timeline { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; gap: 0; max-width: 40rem; }
.timeline li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.15rem 1.2rem;
  padding: 1.05rem 0; border-top: 1px solid rgba(238, 243, 242, 0.22);
}
.timeline li:last-child { border-bottom: 1px solid rgba(238, 243, 242, 0.22); }
.timeline__label {
  grid-row: span 2; font-size: var(--text-small); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(238, 243, 242, 0.68); padding-top: 0.25rem;
}
.timeline strong { font-weight: 500; font-size: 1.12rem; letter-spacing: -0.01em; }
.timeline li > span:last-child { color: rgba(238, 243, 242, 0.75); }
.training .orb img { object-position: 35% 40%; }

/* 5. Office */
.office {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center;
  gap: clamp(2rem, 6vw, 7rem); background: var(--paper); color: var(--on-light);
}
.office__place { display: grid; gap: 1.5rem; justify-items: start; }
.office .headline em { color: var(--teal); }
.office__address { font-style: normal; font-size: var(--text-lede); color: var(--on-light-muted); line-height: 1.7; }
.office__address strong { color: var(--on-light); font-weight: 600; }

.hours {
  position: relative; overflow: hidden; padding: clamp(1.8rem, 3vw, 2.8rem);
  background: #fff; border-radius: 22px;
  box-shadow: 0 1px 0 var(--rule-light), 0 40px 70px -40px rgba(14, 27, 44, 0.35);
}
.hours__title { margin: 0; font-size: var(--text-small); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.hours__days { margin: 0.9rem 0 1.2rem; font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; line-height: 1; }
.hours__slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; position: relative; z-index: 1; }
.hours__slots li {
  display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0;
  border-top: 1px solid var(--rule-light);
}
.hours__slots span { color: var(--on-light-muted); }
.hours__slots strong { font-weight: 500; }
.hours__note { position: relative; z-index: 1; margin: 1.2rem 0 0; color: var(--on-light-muted); }
.hours__note a { color: var(--copper-deep); font-weight: 600; text-decoration: none; }
.hours__note a:hover { text-decoration: underline; }
.hours__suite {
  position: absolute; right: -0.6rem; bottom: -2.6rem; font-size: 9rem; font-weight: 300;
  letter-spacing: -0.06em; color: rgba(31, 111, 116, 0.07); line-height: 1; pointer-events: none;
}

/* 6. Contact */
.contact {
  display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 6vh, 4rem);
  color: var(--on-dark);
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(199, 120, 79, 0.16), transparent 70%),
    var(--ink);
}
.display--contact em { color: var(--copper); }
.contact__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--rule-dark);
}
.contact__grid li { display: grid; gap: 0.5rem; padding: 1.6rem 1.2rem 1.6rem 0; }
.contact__grid li + li { padding-left: 1.4rem; border-left: 1px solid var(--rule-dark); }
.contact__label { font-size: var(--text-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); }
.contact__value {
  font-size: clamp(1.5rem, 1rem + 1.4vw, 2.3rem); font-weight: 300; letter-spacing: -0.02em;
  text-decoration: none; overflow-wrap: anywhere; transition: color 250ms;
}
.contact__value--small { font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem); }
.contact__value:hover { color: var(--copper); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--rule-dark);
  font-size: 0.85rem; color: var(--on-dark-muted);
}
.site-footer a { text-decoration: none; color: var(--on-dark); }
.site-footer a:hover { color: var(--copper); }
.site-footer__brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.site-footer .brand__mark { width: 20px; height: 30px; color: var(--on-dark); }

/* ---------- Scroll film ----------
   Default = static four-step panel (no JS, or reduced motion).
   .film--live (added by site.js) = pinned stage driven by scroll variables:
   --pain, --scan, --beam, --zoom, --lock, --heal, --grid, --healglow (all 0..1, zoom >= 1). */
.film { position: relative; background: #050b12; color: var(--on-dark); }
.film__stage {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end; padding: calc(var(--header-h) + 4rem) var(--gutter) 6.5rem;
}
.film__layers { position: absolute; inset: 0; transform-origin: 58% 56%; }
.film__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 58% 56%;
}
.film__img--scan, .film__grid, .film__beam, .film__reticle, .film__glow--pain { display: none; }
.film__glow { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.film__glow--heal {
  background: radial-gradient(circle at 58% 56%, rgba(111, 195, 189, 0.45), rgba(111, 195, 189, 0) min(30vw, 360px));
  opacity: 0.6;
}
.film__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 75% at 58% 52%, rgba(5, 11, 18, 0) 30%, rgba(5, 11, 18, 0.88) 100%),
    linear-gradient(0deg, rgba(5, 11, 18, 0.92) 0%, rgba(5, 11, 18, 0) 45%);
}
.film__badge {
  position: absolute; z-index: 3; top: calc(var(--header-h) + 0.6rem); left: var(--gutter); margin: 0;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.9rem; font-size: 0.82rem; border: 1px solid var(--rule-dark); border-radius: 999px;
  background: rgba(5, 11, 18, 0.5); backdrop-filter: blur(8px);
}
.film__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }

.film__chapters {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem;
}
.chapter, .hero__content { text-shadow: 0 2px 28px rgba(5, 11, 18, 0.65), 0 1px 3px rgba(5, 11, 18, 0.5); }
.chapter__tag {
  margin: 0 0 0.9rem; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--on-dark-muted);
}
.chapter__title {
  margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.92;
  font-size: clamp(1.8rem, 1rem + 2.6vw, 3.2rem);
}
.chapter__title span { display: block; }
.chapter__title .outline { color: transparent; -webkit-text-stroke: 1.5px var(--on-dark); }
.chapter__text { margin: 1rem 0 0; max-width: 30rem; font-size: var(--text-lede); color: rgba(238, 243, 242, 0.86); }

.film__steps {
  position: absolute; z-index: 4; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 5px;
  background: rgba(14, 27, 44, 0.62); border: 1px solid var(--rule-dark); border-radius: 999px;
  backdrop-filter: blur(12px);
}
.film__steps a {
  display: grid; padding: 0.45rem 1rem; border-radius: 999px; text-decoration: none;
  font-size: 0.9rem; font-weight: 500; line-height: 1.15; color: var(--on-dark-muted);
  transition: background-color 300ms, color 300ms;
}
.film__steps small { font-size: 0.68rem; font-weight: 400; opacity: 0.75; }
.film__steps a[aria-current="step"] { background: rgba(238, 243, 242, 0.12); color: var(--on-dark); }
.film__steps a:hover { color: var(--on-dark); }
.film__steps .film__cta {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-left: 4px; padding: 0.75rem 1.1rem;
  background: var(--paper); color: var(--ink); font-weight: 600;
}
.film__steps .film__cta:hover { background: #fff; color: var(--ink); }

/* Live, scroll-driven version */
.film--live { height: 520vh; }
.film--live .film__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; padding: 0; display: block;
}
.film--live .film__layers { transform: scale(var(--zoom, 1)); will-change: transform; }
.film--live .film__img--scan, .film--live .film__grid, .film--live .film__beam,
.film--live .film__reticle, .film--live .film__glow--pain { display: block; }

.film--live .film__glow--pain {
  opacity: var(--pain, 1);
  background: radial-gradient(circle at 58% 56%, rgba(255, 72, 38, 0.6), rgba(255, 72, 38, 0) min(16vw, 200px));
  animation: throb 1.8s ease-in-out infinite;
}
@keyframes throb { 50% { filter: brightness(1.6); } }

.film--live .film__img--scan { clip-path: inset(0 calc((1 - var(--scan, 0)) * 100%) 0 0); }
.film--live .film__grid {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  opacity: var(--grid, 0);
  clip-path: inset(0 calc((1 - var(--scan, 0)) * 100%) 0 0);
  background-image:
    linear-gradient(rgba(111, 195, 189, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 195, 189, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
}
.film--live .film__beam {
  position: absolute; top: 0; bottom: 0; left: 0; width: 180px; pointer-events: none;
  opacity: var(--beam, 0);
  transform: translateX(calc(var(--scan, 0) * 100vw - 50%));
  background: linear-gradient(90deg,
    rgba(111, 195, 189, 0) 0%, rgba(111, 195, 189, 0.22) 38%,
    rgba(232, 255, 251, 0.95) 50%, rgba(111, 195, 189, 0.22) 62%, rgba(111, 195, 189, 0) 100%);
  mix-blend-mode: screen;
}
.film--live .film__img--heal { clip-path: circle(calc(var(--heal, 0) * 125%) at 58% 56%); }
.film--live .film__glow--heal { opacity: var(--healglow, 0); }

.film--live .film__reticle {
  position: absolute; left: 58%; top: 56%; width: min(36vw, 360px); height: auto; pointer-events: none;
  opacity: var(--lock, 0); fill: none;
  transform: translate(-50%, -50%) scale(calc((1.7 - var(--lock, 0) * 0.7) / var(--zoom, 1))) rotate(calc((1 - var(--lock, 0)) * 90deg));
}
.reticle__ring { stroke: var(--copper); stroke-width: 1.4; }
.reticle__dash {
  stroke: var(--teal-glow); stroke-width: 1; stroke-dasharray: 3 7;
  transform-origin: 100px 100px; animation: spin 14s linear infinite;
}
.reticle__ticks { stroke: var(--on-dark); stroke-width: 1.2; }
.reticle__dot { fill: var(--copper); }
@keyframes spin { to { transform: rotate(360deg); } }

.film--live .film__chapters { position: absolute; inset: 0; display: block; padding: 0 var(--gutter); }
.film--live .chapter {
  position: absolute; bottom: 17vh; max-width: min(46rem, 52vw);
  opacity: 0; transform: translateY(30px); pointer-events: none;
  transition: opacity 600ms var(--ease), transform 900ms var(--ease);
}
.film--live .chapter.is-active { opacity: 1; transform: none; pointer-events: auto; }
.film--live .chapter--left { left: var(--gutter); }
.film--live .chapter--right { right: var(--gutter); text-align: right; }
.film--live .chapter--right .chapter__text { margin-left: auto; }
.film--live .chapter__title { font-size: clamp(2.6rem, 1rem + 5.4vw, 6.8rem); }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .panel [data-reveal]:nth-child(2) { transition-delay: 90ms; }
.js .panel [data-reveal]:nth-child(3) { transition-delay: 180ms; }
.js .panel [data-reveal]:nth-child(4) { transition-delay: 270ms; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .areas { grid-template-columns: 1fr; align-items: start; }
  .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__grid li:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact__grid li:nth-child(n + 3) { border-top: 1px solid var(--rule-dark); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  html { scroll-snap-type: none; }
  .panel { min-height: auto; padding-top: calc(var(--header-h) + 2.5rem); padding-bottom: 3.5rem; }
  .hero { min-height: 100svh; }
  .hero__media img { object-position: 50% 30%; }
  .hero__orbit { width: 130vw; right: -55vw; top: 10vh; }
  .dots { display: none; }
  .brand__mark { width: 26px; height: 38px; }
  .site-header__cta { padding: 0.6rem 0.9rem; font-size: 0.82rem; }

  .intro, .training, .office { grid-template-columns: 1fr; }
  .orb { justify-self: center; width: min(82vw, 420px); margin-top: 1rem; }
  .intro .orb { order: -1; }

  .dial { grid-template-columns: 1fr; }
  .dial__list {
    justify-items: start; grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; gap: 0.6rem; padding-bottom: 0.4rem; scrollbar-width: none;
  }
  .dial__item, .dial__item:nth-child(n) {
    transform: none; font-size: 0.95rem; padding: 0.55rem 0.9rem;
    border: 1px solid var(--rule-dark); border-radius: 999px;
  }
  .dial__item[aria-selected="true"] { border-color: var(--copper); }
  .dial__item[aria-selected="true"]::before { display: none; }
  .dial__circle { max-width: 100%; }
  .dial__panels { width: 82%; padding-bottom: 14%; }

  .timeline li { grid-template-columns: 1fr; }
  .timeline__label { grid-row: auto; }

  .film__chapters { grid-template-columns: 1fr; gap: 1.6rem; }
  .film--live .chapter, .film--live .chapter--right {
    left: var(--gutter); right: var(--gutter); bottom: 6.5rem; max-width: none; text-align: left;
  }
  .film--live .chapter--right .chapter__text { margin-left: 0; }
  .film--live .chapter__title { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .chapter__text { font-size: 0.98rem; }
  .film__badge { font-size: 0.75rem; }
  .film--live .film__reticle { width: 62vw; }
  .film__steps { padding: 5px 5px 5px 14px; gap: 6px; }
  .film__steps a[data-step] {
    width: 30px; height: 4px; padding: 0; border-radius: 2px; font-size: 0;
    background: rgba(238, 243, 242, 0.25);
  }
  .film__steps a[data-step] small { display: none; }
  .film__steps a[data-step][aria-current="step"] { background: var(--copper); }
  .film__steps .film__cta { margin-left: 8px; padding: 0.65rem 0.95rem; font-size: 0.85rem; }

  .contact__grid { grid-template-columns: 1fr; }
  .contact__grid li, .contact__grid li + li { padding: 1.2rem 0; border-left: 0; }
  .contact__grid li + li { border-top: 1px solid var(--rule-dark); }
  .hours__suite { font-size: 7rem; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .film--live .chapter__title { font-size: 2rem; }
  .film--live .chapter { bottom: 5.5rem; }
  .film--live .chapter__text { font-size: 0.88rem; margin-top: 0.6rem; }
  .chapter__tag { margin-bottom: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit__arc, .scroll-cue span, .reticle__dash, .film__glow--pain { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .orb__arc, .dial__arc, .dial__item, .btn, .btn span { transition: none; }
  .dial__panel:not([hidden]) { animation: none; }
}
