/* =========================================================================
   aviram-tech v4: the business on top, the machine underneath.
   Midnight void, cobalt and porcelain objects, one lime "on" light.
   Mobile first. Desktop scroll scenes live in js/motion-desktop.js.
   ========================================================================= */

@font-face { font-family: "Karantina"; src: url("../fonts/karantina-700-hebrew.woff2?v=4") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Karantina"; src: url("../fonts/karantina-700-latin.woff2?v=4") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-400-hebrew.woff2?v=4") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-400-latin.woff2?v=4") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-600-hebrew.woff2?v=4") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-600-latin.woff2?v=4") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-800-hebrew.woff2?v=4") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Noto Sans Hebrew"; src: url("../fonts/nsh-800-latin.woff2?v=4") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Palette */
  --void: #02030B;        /* page ground, matches the 3D renders' background */
  --void-2: #0C0F2E;      /* raised ground: frames */
  --cobalt: #2E45FF;      /* the objects' lacquer; the "how" field */
  --cobalt-deep: #1F31D6; /* hover on cobalt */
  --porcelain: #EEF0FA;   /* main text */
  --mist: #A9B0D6;        /* secondary text on void */
  --on-cobalt-2: #DDE2FF; /* secondary text on cobalt */
  --lime: #C8FF2E;        /* the only "on" light: action, LEDs, focus */
  --lime-hover: #D8FF6A;
  --line: rgba(238, 240, 250, 0.14);

  --display: "Karantina", "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --font: "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;

  --t-small: 0.875rem;
  --t-body: 1rem;
  --t-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.3125rem);
  --t-name: clamp(2.25rem, 1.6rem + 2.6vw, 4.5rem);      /* Karantina service names */
  --t-h2: clamp(2.75rem, 1.9rem + 3.6vw, 5.75rem);       /* Karantina */
  --t-hero: clamp(3.4rem, 1.6rem + 7.4vw, 8.75rem);       /* Karantina, 61px @375 */
  --t-promise: clamp(3rem, 1rem + 7.9vw, 9rem);

  --s-1: 0.5rem; --s-2: 0.75rem; --s-3: 1rem; --s-4: 1.5rem; --s-5: 2rem; --s-6: 3rem;
  --section: clamp(4rem, 2.5rem + 6vw, 9rem);
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 3.5rem);
  --max: 90rem;
  --head: 3.5rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--void);
  scrollbar-color: #232a6b var(--void);
  scroll-padding-top: calc(var(--head) + 1rem);
}
body {
  margin: 0;
  background: var(--void);
  color: var(--porcelain);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  overflow-x: clip;
}
::selection { background: var(--lime); color: var(--void); }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-left));
}

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--lime); color: var(--void); padding: 0.75rem 1.1rem; border-radius: 999px; font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.top.is-scrolled { background: rgba(5, 6, 26, 0.92); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(1px)) {
  .top.is-scrolled { background: rgba(5, 6, 26, 0.72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
}
@media (prefers-reduced-transparency: reduce) { .top.is-scrolled { background: var(--void); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.top__bar {
  height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  max-width: var(--max); margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-left));
}
.mark { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; text-decoration: none; min-height: 44px; letter-spacing: 0.01em; }
.mark__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0.9rem rgba(200, 255, 46, 0.6); }
.nav { display: none; }
.nav__list { display: flex; gap: var(--s-5); }
.nav__list a { color: var(--mist); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; transition: color 0.2s; }
.top__tools { display: flex; align-items: center; gap: var(--s-2); }

.motion-toggle {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--mist); cursor: pointer; padding: 0;
}
.motion-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.motion-toggle__play { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__pause { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__play { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.85em 1.6em; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn__icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.btn--big { min-height: 56px; font-size: 1.0625rem; }
.btn--small { min-height: 44px; padding: 0.5em 1.1em; font-size: 0.9375rem; }
.btn--lime { background: var(--lime); color: var(--void); }
.btn--void { background: var(--void); color: var(--porcelain); }
.btn--void:focus-visible { outline-color: var(--void); }
.btn--line { background: transparent; color: var(--porcelain); box-shadow: inset 0 0 0 1.5px var(--lime); }
@media (hover: hover) and (pointer: fine) {
  .btn--lime:hover { background: var(--lime-hover); }
  .btn--void:hover { background: #151a4a; }
  .btn--line:hover { background: rgba(200, 255, 46, 0.12); }
  .nav__list a:hover { color: var(--porcelain); }
  .motion-toggle:hover { color: var(--porcelain); border-color: rgba(238, 240, 250, 0.4); }
}

/* ---------- stage (the 3D object) ---------- */
.stage {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--void);
}
.stage__poster, .stage__loop, .stage__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.stage__loop { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.stage__loop.is-playing { opacity: 1; }
.stage__canvas { opacity: 0; transition: opacity 0.5s var(--ease-out); }
.stage.has-seq .stage__canvas { opacity: 1; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: calc(var(--head) + env(safe-area-inset-top)); }
.stage--hero { aspect-ratio: 1 / 1; width: min(100%, 34rem); margin-inline: auto; }
.hero__copy {
  position: relative; z-index: 2;
  padding-inline: max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-left));
  margin-top: -2.25rem; padding-bottom: var(--s-6);
}
.hero__title { font-family: var(--display); font-size: var(--t-hero); line-height: 0.92; letter-spacing: 0; }
.hero__line { display: block; color: var(--mist); }
.hero__line--on { color: var(--porcelain); }
.hero__lead { color: var(--mist); font-size: var(--t-lead); line-height: 1.55; max-width: 30ch; margin: var(--s-3) 0 var(--s-4); }

/* ---------- services ---------- */
.services { position: relative; padding-top: var(--s-5); }
.services__title { font-family: var(--display); font-size: var(--t-h2); line-height: 1; margin-bottom: var(--s-4); }
.svc { position: relative; padding-bottom: var(--s-6); }
.svc .stage { width: 100%; }
.svc__copy {
  padding-inline: max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-left));
  margin-top: -0.5rem; position: relative; z-index: 2;
}
.svc__name { font-family: var(--display); font-size: var(--t-name); line-height: 1; }
.svc__line { color: var(--porcelain); font-size: 1.0625rem; font-weight: 600; margin-top: 0.35rem; }
.svc__more { color: var(--mist); font-size: 0.9375rem; line-height: 1.6; margin-top: 0.4rem; max-width: 36rem; }
.svc__more.is-collapsed { display: none; }
.svc__toggle {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; padding: 0; margin-top: 0.1rem;
  background: none; border: 0; cursor: pointer; color: var(--lime); font-size: 0.9375rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px;
}
.svc__toggle::after { content: ""; width: 0.45em; height: 0.45em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-0.15em); transition: transform 0.25s var(--ease-out); }
.svc__toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.rail { display: none; }

/* ---------- how (cobalt field) ---------- */
.how { background: var(--cobalt); color: var(--porcelain); padding-block: var(--section); margin-top: var(--s-5); overflow: hidden; }
.how__promises { margin-bottom: var(--s-6); }
.promise {
  font-family: var(--display); font-weight: 700; font-size: var(--t-promise); line-height: 0.95;
  padding-inline: var(--gutter);
}
.promise--alt { color: var(--lime); text-align: end; }
.h2 { font-family: var(--display); font-size: var(--t-h2); line-height: 1; margin-bottom: var(--s-5); }
.steps { counter-reset: step; display: grid; gap: var(--s-4); }
.step { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; column-gap: var(--s-3); align-items: baseline; border-top: 1px solid rgba(238, 240, 250, 0.28); padding-top: var(--s-3); }
.step::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--lime);
}
.step__title { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.step__line { color: var(--on-cobalt-2); }

/* ---------- work ---------- */
.work { padding-block: var(--section); }
.work__list { display: grid; gap: var(--s-5); }
.work__link { display: grid; gap: 0.35rem; text-decoration: none; }
.work__frame { display: block; overflow: hidden; border-radius: 14px; background: var(--void-2); box-shadow: inset 0 0 0 1px var(--line); aspect-ratio: 16 / 10; }
.work__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.work__name { font-family: var(--display); font-size: 2.25rem; line-height: 1; margin-top: var(--s-2); }
.work__tag { color: var(--mist); font-size: var(--t-small); }
@media (hover: hover) and (pointer: fine) { .work__link:hover .work__img { transform: scale(1.03); } }
.work__intro { color: var(--mist); font-size: var(--t-lead); max-width: 40ch; margin: calc(var(--s-5) * -0.5) 0 var(--s-5); }
.work__link:active .work__frame { transform: scale(0.985); }
.work__frame { position: relative; transition: transform 0.12s var(--ease-out); }
/* bot card: the sleeping-owner loop over its poster (morning frame), plus an HTML line that lights up at dawn */
.work__frame--video { aspect-ratio: 16 / 9; }
.work__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.work__loop.is-playing { opacity: 1; }
.motion-off .work__loop { display: none; }
.work__badge {
  position: absolute; inset-inline-start: var(--s-3); bottom: var(--s-3);
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  background: rgba(2, 3, 11, 0.82); color: var(--porcelain); font-weight: 600; font-size: 0.9375rem;
  box-shadow: inset 0 0 0 1px rgba(200, 255, 46, 0.45);
  opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.work__dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(200, 255, 46, 0.8); }
.work__badge.is-on, .motion-off .work__badge, .no-loop .work__badge { opacity: 1; transform: none; }

/* ---------- contact (lime field) ---------- */
.contact { background: var(--lime); color: var(--void); padding-block: var(--section); }
.contact__inner { display: grid; gap: var(--s-4); justify-items: start; }
.contact__title { font-family: var(--display); font-size: var(--t-promise); line-height: 0.9; }
.contact__text { font-size: var(--t-lead); line-height: 1.55; max-width: 32ch; color: #1A1F45; }
.contact :focus-visible { outline-color: var(--void); }

/* ---------- footer ---------- */
.foot { padding-block: var(--s-6) calc(var(--s-6) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot__inner { display: grid; gap: var(--s-3); color: var(--mist); font-size: var(--t-small); }
.mark--foot { color: var(--porcelain); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.foot__links a { display: inline-flex; min-height: 44px; align-items: center; }
.foot__motion { justify-self: start; background: none; border: 0; padding: 0; min-height: 44px; color: var(--mist); text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; }

.foot__links a[aria-current="page"] { color: var(--porcelain); }

/* ---------- legal pages ---------- */
.page-top { position: sticky; background: var(--void); border-bottom-color: var(--line); }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--mist); font-size: 0.9375rem; }
.legal { padding-block: var(--s-5) var(--section); }
.legal__body { max-width: 44rem; margin-inline: 0; }
.legal h1 { font-family: var(--display); font-size: var(--t-h2); line-height: 1; margin-bottom: var(--s-2); }
.legal h2 { font-size: 1.1875rem; font-weight: 600; margin: var(--s-5) 0 var(--s-1); }
.legal p, .legal li { color: #D3D7EC; line-height: 1.7; }
.legal p + p { margin-top: var(--s-2); }
.legal ul { display: grid; gap: var(--s-1); margin-top: var(--s-1); padding-inline-start: 1.1rem; list-style: disc; }
.legal li::marker { color: var(--lime); }
.legal a:not(.btn) { color: var(--porcelain); }
.legal .updated { color: var(--mist); font-size: var(--t-small); }
.legal strong { color: var(--porcelain); font-weight: 600; }

/* ---------- entrance (all devices, CSS only, once) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(0.45em); } to { opacity: 1; transform: none; } }
@keyframes bloom { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.js:not(.motion-off) .stage--hero { animation: bloom 1.4s var(--ease-out) both; }
.js:not(.motion-off) .hero__line { animation: rise 0.9s var(--ease-out) both; }
.js:not(.motion-off) .hero__line:nth-child(1) { animation-delay: 0.25s; }
.js:not(.motion-off) .hero__line:nth-child(2) { animation-delay: 0.45s; }
.js:not(.motion-off) .hero__lead, .js:not(.motion-off) .hero__copy .btn { animation: fade 0.8s var(--ease-out) 0.75s both; }

/* scroll reveal on phones (IntersectionObserver adds .is-in) */
.js:not(.motion-off) .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.js:not(.motion-off) .reveal.is-in { opacity: 1; transform: none; }

/* ---------- wide screens ---------- */
@media (min-width: 48rem) {
  :root { --head: 4.25rem; }
  .nav { display: block; }
  .work__list { grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); }
  .work__item--wide { grid-column: 1 / -1; }
  .work__item--wide .work__frame--video { aspect-ratio: 21 / 9; }
  .work__badge { inset-inline-start: var(--s-4); bottom: var(--s-4); font-size: 1.0625rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
  .step { grid-template-columns: 1fr; row-gap: 0.4rem; }
  .step::before { grid-row: auto; font-size: 3rem; }
  .contact__inner { grid-template-columns: 1fr auto; align-items: end; column-gap: var(--s-6); }
  .contact__title { grid-column: 1 / -1; }
}

@media (min-width: 64rem) {
  /* Chapters: copy on the reading side (right), the object owns the rest */
  .chapter__pin {
    min-height: 100svh; display: grid; align-items: center;
    grid-template-columns: minmax(20rem, 34fr) 66fr;
    padding-inline: max(var(--gutter), env(safe-area-inset-right)) 0;
    max-width: 120rem; margin-inline: auto;
  }
  .chapter__pin > .stage { grid-column: 2; grid-row: 1; width: 100%; }
  .chapter__pin > .hero__copy, .chapter__pin > .svc__copy { grid-column: 1; grid-row: 1; margin: 0; padding: 0; }
  .hero { padding-top: 0; }
  .hero .chapter__pin { grid-template-columns: minmax(26rem, 40fr) 60fr; }
  .stage--hero { aspect-ratio: 16 / 9; width: 100%; max-width: none; }
  .hero__copy { padding-bottom: 0; }
  .hero__lead { max-width: 26ch; }
  .services { padding-top: var(--section); }
  .how { margin-top: var(--section); }
  .services__title { margin-bottom: 0; }
  .svc { padding-bottom: 0; }
  .svc__more { font-size: 1rem; max-width: 30rem; }
  .svc__line { font-size: 1.1875rem; margin-top: var(--s-2); }
  .svc__more { margin-top: var(--s-3); }
  .promise { padding-inline: max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-left)); white-space: nowrap; }
  .hero__title { white-space: nowrap; }
  .stage:not(.stage--hero) .stage__poster { transform: scale(1.18); }
  .stage--hero .stage__poster { transform: scale(1.25); }
  .stage[data-seq="sites"] .stage__poster { transform: scale(1.02); }
  .work__name { font-size: 3rem; }
}

/* ---------- desktop scenes: each chapter has its own staging (only while scenes run) ---------- */
@media (min-width: 64rem) {
  .has-scenes .chapter__pin { position: relative; overflow: hidden; max-width: none; }
  .has-scenes .hero .chapter__pin { height: 100svh; }
  .has-scenes .stage__poster { transform: none !important; }

  /* full: the object owns the whole screen, copy floats on the reading side */
  .has-scenes .chapter--full .chapter__pin { grid-template-columns: minmax(24rem, 36rem) 1fr; padding-inline: max(var(--gutter), env(safe-area-inset-right)) var(--gutter); }
  .has-scenes .chapter--full .chapter__pin > .stage { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; z-index: 0; grid-area: auto; }
  .has-scenes .chapter--full .chapter__pin > .hero__copy,
  .has-scenes .chapter--full .chapter__pin > .svc__copy { position: relative; z-index: 2; grid-column: 1; }
  .has-scenes .hero .chapter__pin { grid-template-columns: minmax(30rem, 46rem) 1fr; }
  .has-scenes .chapter--late .chapter__pin::after,
  .has-scenes .chapter--scrim .chapter__pin::after,
  .has-scenes .chapter--scan .chapter__pin::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to left, rgba(2, 3, 11, 0.94) 0%, rgba(2, 3, 11, 0.8) 30%, rgba(2, 3, 11, 0) 58%);
    opacity: var(--scrim, 1);
  }

  /* blend: the fragments fly over the headline (screen blend keeps the type readable) */
  .has-scenes .chapter--blend .chapter__pin { grid-template-columns: minmax(20rem, 34fr) 66fr; }
  .has-scenes .chapter--blend .chapter__pin > .stage { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; z-index: 2; mix-blend-mode: screen; pointer-events: none; grid-area: auto; }
  .has-scenes .chapter--blend .svc__name { font-size: clamp(5rem, 2rem + 7vw, 10rem); line-height: 0.9; }
  .has-scenes .chapter--blend .svc__line, .has-scenes .chapter--blend .svc__more { position: relative; z-index: 3; }

  /* scan: a lime line sweeps the whole screen, copy included */
  .scanline { display: none; }
  .has-scenes .scanline {
    display: block; position: absolute; inset-inline: 0; top: 0; height: 2px; z-index: 3; pointer-events: none;
    background: var(--lime); opacity: 0; will-change: transform, opacity;
  }
}
@media (prefers-reduced-transparency: reduce) { .has-scenes .chapter__pin::after { background: rgba(2, 3, 11, 0.94); } }

/* Rail: only when the desktop scroll scenes run */
.has-scenes .rail {
  display: grid; gap: 0.6rem; position: fixed; inset-inline-start: max(var(--gutter), env(safe-area-inset-right)); bottom: 2rem; z-index: 20;
  font-size: var(--t-small); color: var(--mist); opacity: 0; transition: opacity 0.4s;
}
.has-scenes .rail.is-on { opacity: 1; }
.has-scenes .rail li { display: flex; align-items: center; gap: 0.6rem; transition: color 0.3s; }
.has-scenes .rail li::before { content: ""; width: 1.75rem; height: 2px; background: var(--line); transition: background-color 0.3s, width 0.3s var(--ease-out); }
.has-scenes .rail li.is-current { color: var(--porcelain); }
.has-scenes .rail li.is-current::before { background: var(--lime); width: 3rem; }

/* ---------- reduced motion / paused ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) * { animation: none !important; transition-duration: 0.01ms !important; }
}
.motion-off * { animation: none !important; }
.motion-off .stage__loop { display: none; }

@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  .mark__dot { background: CanvasText; }
}
