/* ==========================================================================
   BRO: CINEMATIC LAYER
   Loaded after core.css. Motion, depth and product presentation only — the
   content stays readable if this file or cinematic.js never loads.
   Palette: void #050505 · core green #39FF88 · ice #E9FFF4
   ========================================================================== */

:root {
  --cine-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --cine-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --rig-x: 0deg;
  --rig-y: 0deg;
}

/* Keep the BRO mark a rounded square, never a circle.
   core.css sets `.brand img { border-radius: 50% }`, so match its specificity. */
.brand .brand-logo,
.brand img.brand-logo {
  border-radius: 8px;
  background: rgba(57, 255, 136, 0.06);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

/* Page scroll progress ----------------------------------------------------- */
.cine-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, rgba(57, 255, 136, 0.15), var(--green));
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.5);
  opacity: 0.85;
}

/* Grain sits under the header but over the field. */
body.is-home .grain { z-index: 1; }

/* ==========================================================================
   HERO — device rig
   ========================================================================== */
.stage {
  --hero-exit: 0;
  perspective: none;
}

.stage__grid { perspective: 1800px; }

.device-rig {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  transform: rotateX(var(--rig-x, 0deg)) rotateY(var(--rig-y, 0deg));
  will-change: transform;
}

.rig-note {
  margin-top: 10px;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.rig-glow {
  position: absolute;
  inset: -18% -6% -22% -6%;
  background:
    radial-gradient(58% 46% at 54% 44%, rgba(57, 255, 136, 0.3), transparent 68%),
    radial-gradient(40% 30% at 30% 72%, rgba(57, 255, 136, 0.16), transparent 70%);
  filter: blur(14px);
  animation: rigBreathe 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rigBreathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* --- laptop --------------------------------------------------------------- */
.laptop {
  position: absolute;
  left: 1%;
  top: 17%;
  width: 84%;
  transform-style: preserve-3d;
  transform: rotateX(7deg) rotateY(-17deg) rotateZ(2deg);
  animation: laptopFloat 11s ease-in-out infinite;
}

@keyframes laptopFloat {
  0%, 100% { transform: rotateX(7deg) rotateY(-17deg) rotateZ(2deg) translateY(0); }
  50% { transform: rotateX(4deg) rotateY(-12deg) rotateZ(1deg) translateY(-16px); }
}

.laptop__lid {
  position: relative;
  aspect-ratio: 16 / 10.4;
  padding: 10px 10px 0;
  border: 1px solid rgba(233, 255, 244, 0.16);
  border-bottom: 0;
  border-radius: 12px 12px 3px 3px;
  background: linear-gradient(180deg, #1a2320, #0a0f0c 62%, #050806);
  box-shadow:
    0 60px 120px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(57, 255, 136, 0.08),
    inset 0 1px 0 rgba(233, 255, 244, 0.14);
}

.laptop__lid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.1), transparent 38%);
  pointer-events: none;
}

.laptop__base {
  position: relative;
  height: 15px;
  margin: 0 -5%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #1d2724, #0a100d 70%, #050806);
  border: 1px solid rgba(233, 255, 244, 0.12);
  border-top: 0;
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.6);
}

.laptop__base i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16%;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 -1px 0 rgba(57, 255, 136, 0.18);
}

.laptop__floor {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -13%;
  height: 16%;
  background: radial-gradient(closest-side, rgba(57, 255, 136, 0.22), transparent 72%);
  filter: blur(16px);
  transform: translateZ(-60px) rotateX(70deg);
}

/* --- BRO interface inside the laptop -------------------------------------- */
.bro-ui {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px 6px 2px 2px;
  background:
    radial-gradient(120% 80% at 78% 0%, rgba(57, 255, 136, 0.14), transparent 62%),
    linear-gradient(170deg, #0a1310, #050a07 70%);
  border: 1px solid rgba(57, 255, 136, 0.18);
  font-family: var(--font-body);
  color: var(--ice);
}

.bro-ui__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(233, 255, 244, 0.07);
  background: rgba(4, 8, 6, 0.7);
}

.bro-ui__logo {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(57, 255, 136, 0.1);
  border: 1px solid rgba(57, 255, 136, 0.28);
  overflow: hidden;
}

.bro-ui__logo img { width: 100%; height: 100%; object-fit: cover; }

.bro-ui__title {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute);
}

.bro-ui__title b { color: var(--green); font-weight: 400; }

.bro-ui__dots { display: flex; gap: 4px; margin-left: auto; }

.bro-ui__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(233, 255, 244, 0.2);
}

.bro-ui__dots i:first-child { background: var(--green); box-shadow: 0 0 6px var(--green); }

.bro-ui__body {
  flex: 1;
  display: grid;
  grid-template-columns: 21% 1fr;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.bro-ui__side {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 10px 7px;
  border-right: 1px solid rgba(233, 255, 244, 0.06);
  font-family: var(--mono);
  font-size: 5.6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.bro-ui__side span {
  padding: 4px 6px;
  border-radius: 3px;
  border: 1px solid transparent;
}

.bro-ui__side .is-on {
  color: var(--green);
  background: rgba(57, 255, 136, 0.07);
  border-color: rgba(57, 255, 136, 0.2);
}

.bro-ui__chat {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.bubble {
  max-width: 86%;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 7px;
  line-height: 1.5;
  color: var(--ice);
  overflow-wrap: anywhere;
}

.bubble--user {
  align-self: flex-end;
  background: rgba(233, 255, 244, 0.06);
  border: 1px solid rgba(233, 255, 244, 0.1);
  border-bottom-right-radius: 2px;
}

.bubble--bro {
  align-self: flex-start;
  background: rgba(57, 255, 136, 0.09);
  border: 1px solid rgba(57, 255, 136, 0.24);
  border-bottom-left-radius: 2px;
  color: #dcffee;
}

.bubble--typing {
  display: flex;
  gap: 3px;
  padding: 6px 9px;
  background: rgba(57, 255, 136, 0.06);
  border: 1px solid rgba(57, 255, 136, 0.16);
}

.bubble--typing i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green);
  animation: typingDot 1.4s ease-in-out infinite;
}

.bubble--typing i:nth-child(2) { animation-delay: 0.18s; }
.bubble--typing i:nth-child(3) { animation-delay: 0.36s; }

@keyframes typingDot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.bro-ui__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid rgba(233, 255, 244, 0.07);
  font-family: var(--mono);
  font-size: 5.4px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.bro-ui__foot .grow { flex: 1; }

.bro-ui__foot .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}

/* --- phone ---------------------------------------------------------------- */
.phone {
  position: absolute;
  right: 0;
  bottom: 4%;
  width: 25%;
  transform-style: preserve-3d;
  transform: rotateY(16deg) rotateX(4deg) rotateZ(-3deg);
  animation: phoneFloat 9s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: rotateY(16deg) rotateX(4deg) rotateZ(-3deg) translateY(0); }
  50% { transform: rotateY(10deg) rotateX(1deg) rotateZ(-1deg) translateY(-18px); }
}

.phone::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(233, 255, 244, 0.28), rgba(233, 255, 244, 0.04) 45%, rgba(57, 255, 136, 0.16));
  z-index: -1;
}

.phone__screen {
  position: relative;
  aspect-ratio: 9 / 19;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(233, 255, 244, 0.1);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(57, 255, 136, 0.22), transparent 60%),
    linear-gradient(180deg, #08120d, #040806);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(57, 255, 136, 0.06);
  padding: 9% 8% 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7%;
}

.phone__notch {
  width: 34%;
  height: 3px;
  border-radius: 999px;
  background: rgba(233, 255, 244, 0.16);
}

.mini {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9%;
  text-align: center;
}

.mini__logo {
  width: 22%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(57, 255, 136, 0.3);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.25);
}

.mini__logo img { width: 100%; height: 100%; object-fit: cover; }

.mini__label {
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}

.mini__wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
}

.mini__wave i {
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--green), rgba(57, 255, 136, 0.25));
  height: var(--h, 30%);
  animation: miniWave 1.3s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes miniWave {
  0%, 100% { transform: scaleY(0.35); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.mini__say {
  font-size: 5.6px;
  line-height: 1.6;
  color: var(--mute);
}

.mini__say b { color: var(--ice); font-weight: 500; }

/* --- floating panels ------------------------------------------------------ */
.float-card {
  position: absolute;
  padding: 10px 12px;
  border: 1px solid rgba(57, 255, 136, 0.24);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(10, 22, 15, 0.92), rgba(5, 10, 7, 0.94));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(233, 255, 244, 0.06);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  transform-style: preserve-3d;
  animation: floatCard 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float-card__k {
  display: block;
  font-size: 0.44rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.float-card strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.01em;
}

.float-card p {
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 0.56rem;
  line-height: 1.5;
  color: var(--mute);
}

.float-card--state {
  left: -3%;
  top: 12%;
  min-width: 96px;
  animation-delay: -2.4s;
  transform: translateZ(70px);
}

.float-card--mem {
  right: 0;
  top: 0;
  width: 132px;
  animation-delay: -4.1s;
  transform: translateZ(90px);
}

.float-card--mem .tag {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 6px;
  border: 1px solid rgba(57, 255, 136, 0.24);
  border-radius: 999px;
  font-size: 0.42rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.float-card__meter {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
  margin-top: 6px;
}

.float-card__meter i {
  width: 2px;
  height: calc(100% * var(--v, 0.5));
  border-radius: 2px;
  background: linear-gradient(180deg, var(--green), rgba(57, 255, 136, 0.2));
  animation: meterPulse 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes meterPulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Atmospheric motes drawn on a canvas behind the rig. */
.stage__motes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

/* Hero copy entrance ------------------------------------------------------- */
.cine-on .stage__copy > * {
  opacity: 0;
  transform: translateY(26px);
}

.cine-on.cine-hero-in .stage__copy > * {
  opacity: 1;
  transform: none;
  transition: opacity 1.1s var(--cine-ease), transform 1.1s var(--cine-ease);
  transition-delay: calc(var(--i, 0) * 90ms + 120ms);
}

.stage__copy > *:nth-child(1) { --i: 0; }
.stage__copy > *:nth-child(2) { --i: 1; }
.stage__copy > *:nth-child(3) { --i: 2; }
.stage__copy > *:nth-child(4) { --i: 3; }
.stage__copy > *:nth-child(5) { --i: 4; }
.stage__copy > *:nth-child(6) { --i: 5; }

/* Letterbox lines in the headline slide up from the clip. */
.cine-on .display .line > * {
  display: inline-block;
  transform: translateY(112%);
}

.cine-on.cine-hero-in .display .line > * {
  transform: none;
  transition: transform 1.25s var(--cine-ease) 0.15s;
}

.cine-on.cine-hero-in .display .line:nth-child(2) > * { transition-delay: 0.28s; }

/* Devices swing in from depth. */
.cine-on .device-rig {
  opacity: 0;
  transform: translateY(46px) scale(0.94) rotateX(var(--rig-x, 0deg)) rotateY(var(--rig-y, 0deg));
}

.cine-on.cine-hero-in .device-rig {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(var(--rig-x, 0deg)) rotateY(var(--rig-y, 0deg));
  transition: opacity 1.4s var(--cine-ease) 0.2s, transform 1.6s var(--cine-ease) 0.2s;
}

.cine-on .float-card {
  opacity: 0;
}

.cine-on.cine-hero-in .float-card {
  opacity: 1;
  transition: opacity 1s var(--cine-ease) 0.9s;
}

/* Leaving the hero: depth + fall away. The devices sit beside the copy on
   desktop, so only there do they leave with it — on phones they are below the
   fold and must stay fully visible when scrolled to. */
@media (min-width: 861px) {
  .stage__copy { transform: translate3d(0, calc(var(--hero-exit) * -50px), 0); }

  .stage__rig-wrap {
    transform: translate3d(0, calc(var(--hero-exit) * 40px), 0);
    opacity: calc(1 - var(--hero-exit) * 0.9);
  }
}

/* ==========================================================================
   Progressive text
   ========================================================================== */
.cine-text .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.cine-text .word > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1s var(--cine-ease), opacity 0.9s var(--cine-ease);
  transition-delay: calc(var(--w, 0) * 46ms);
}

.cine-text.is-lit .word > span {
  transform: none;
  opacity: 1;
}

/* ==========================================================================
   Sections — depth in, parallax helpers
   ========================================================================== */
[data-cine-lift] { will-change: transform; }

.cine-rule {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 136, 0.4), transparent);
  transform: scaleX(var(--p, 0));
  transform-origin: 50% 50%;
}

/* ==========================================================================
   SHOWCASE — pinned feature demonstrations
   ========================================================================== */
.showcase {
  position: relative;
  padding: 0;
  height: calc(100svh * 5);
}

.showcase__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 12px) 0 24px;
  overflow: hidden;
}

.showcase__sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 72% 46%, rgba(57, 255, 136, 0.1), transparent 70%),
    radial-gradient(40% 40% at 12% 80%, rgba(57, 255, 136, 0.05), transparent 70%);
}

.showcase__shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(18px, 3vw, 40px) clamp(28px, 5vw, 72px);
  align-items: center;
  max-height: 100%;
}

.showcase__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 20px;
}

.showcase__head .lead { margin-top: 12px; max-width: 46ch; }

.showcase__disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.showcase__disclaimer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(57, 255, 136, 0.6);
  box-shadow: 0 0 10px rgba(57, 255, 136, 0.35);
}

.showcase__head h2 { margin-top: 12px; }

.showcase__counter {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mute-dim);
  white-space: nowrap;
}

.showcase__counter b { color: var(--green); font-weight: 400; }

.showcase__tabs {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.showcase__tab {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-left: 2px solid var(--hair);
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--mute);
  transition: color 0.4s var(--cine-ease), border-color 0.4s var(--cine-ease), background 0.4s var(--cine-ease);
}

.showcase__tab:hover { color: var(--ice); border-left-color: var(--green-line-strong); }

.showcase__tab.is-active {
  color: #fff;
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(57, 255, 136, 0.1), transparent 88%);
}

.showcase__tab span {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  color: var(--mute-dim);
}

.showcase__tab.is-active span { color: var(--green); }

.showcase__tab strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.showcase__tab em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--mute-dim);
  max-width: 34ch;
}

.showcase__tab.is-active em { color: var(--mute); }

.showcase__stage {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3.05;
  max-height: min(52svh, 500px);
  border: 1px solid var(--green-line);
  border-radius: 3px;
  background:
    radial-gradient(120% 90% at 76% 4%, rgba(57, 255, 136, 0.12), transparent 62%),
    linear-gradient(170deg, rgba(9, 17, 12, 0.96), rgba(4, 8, 6, 0.99));
  box-shadow: 0 50px 130px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(233, 255, 244, 0.05);
  overflow: hidden;
  perspective: 1200px;
}

.showcase__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 255, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 136, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  pointer-events: none;
}

.demo {
  position: absolute;
  inset: 0;
  padding: clamp(18px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.65s var(--cine-ease), transform 0.8s var(--cine-ease), visibility 0.65s;
}

.demo.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.demo__caption { display: none; }

.demo__visual {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.demo__num {
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
}

.demo h3 { font-size: 1.06rem; margin-top: 6px; }
.demo p { margin-top: 6px; font-size: 0.82rem; color: var(--mute); line-height: 1.6; }

/* --- 01 conversation ------------------------------------------------------ */
.conv {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  flex: 1;
  padding: 4px 2px;
}

.conv__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(14px);
}

.demo.is-active .conv__row {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--cine-ease), transform 0.7s var(--cine-ease);
  transition-delay: calc(var(--i, 0) * 220ms + 150ms);
}

.conv__avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  border: 1px solid var(--hair-strong);
  color: var(--mute);
  background: rgba(233, 255, 244, 0.04);
}

.conv__row.is-bro .conv__avatar {
  border-color: var(--green-line-strong);
  color: var(--green);
  background: rgba(57, 255, 136, 0.08);
  box-shadow: 0 0 16px rgba(57, 255, 136, 0.18);
}

.conv__bubble {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ice);
}

.conv__row.is-user { flex-direction: row-reverse; }

.conv__row.is-user .conv__bubble {
  background: rgba(233, 255, 244, 0.05);
  border: 1px solid var(--hair-strong);
  border-bottom-right-radius: 2px;
}

.conv__row.is-bro .conv__bubble {
  background: rgba(57, 255, 136, 0.07);
  border: 1px solid var(--green-line);
  border-bottom-left-radius: 2px;
}

.conv__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.46rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

/* --- 02 voice ------------------------------------------------------------- */
.voice {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 16px;
  align-items: center;
  justify-items: center;
}

.voice__ring {
  position: relative;
  width: min(46%, 172px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--green-line);
  background: radial-gradient(circle at 42% 36%, rgba(57, 255, 136, 0.25), rgba(5, 12, 8, 0.9) 68%);
  box-shadow: 0 0 60px rgba(57, 255, 136, 0.2), inset 0 0 40px rgba(57, 255, 136, 0.12);
}

.voice__ring::before,
.voice__ring::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  border: 1px solid rgba(57, 255, 136, 0.18);
  animation: voicePing 3.4s ease-out infinite;
}

.voice__ring::after { animation-delay: 1.7s; }

@keyframes voicePing {
  0% { transform: scale(0.86); opacity: 0.9; }
  100% { transform: scale(1.14); opacity: 0; }
}

.voice__icon {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(57, 255, 136, 0.12);
  border: 1px solid rgba(57, 255, 136, 0.4);
  color: var(--green);
}

.voice__icon svg { width: 50%; height: 50%; }

.voice__bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 54px;
}

.voice__bars i {
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--green), rgba(57, 255, 136, 0.18));
  transform: scaleY(0.16);
}

.demo.is-active .voice__bars i {
  animation: voiceBar 1.1s ease-in-out infinite alternate;
  animation-delay: calc(var(--d, 0) * -0.09s);
}

@keyframes voiceBar {
  from { transform: scaleY(0.14); opacity: 0.4; }
  to { transform: scaleY(var(--h, 0.8)); opacity: 1; }
}

.voice__read {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.voice__read b { color: var(--green); font-weight: 400; }

/* --- 03 desktop control --------------------------------------------------- */
.apps {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.app {
  position: relative;
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: rgba(8, 14, 10, 0.9);
  overflow: hidden;
  opacity: 0.55;
  transform: translateY(10px);
}

.demo.is-active .app {
  animation: appWake 5.4s var(--cine-ease) infinite;
  animation-delay: calc(var(--i, 0) * 0.5s);
}

@keyframes appWake {
  0%, 12% { opacity: 0.4; transform: translateY(10px); border-color: var(--hair); }
  22%, 74% { opacity: 1; transform: translateY(0); border-color: var(--green-line); }
  86%, 100% { opacity: 0.4; transform: translateY(10px); border-color: var(--hair); }
}

.app b {
  display: block;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}

.app span {
  display: block;
  margin-top: 5px;
  font-size: 0.68rem;
  color: var(--mute);
}

.app__bars { display: grid; gap: 4px; margin-top: 9px; }

.app__bars i {
  height: 4px;
  border-radius: 2px;
  background: rgba(233, 255, 244, 0.08);
}

.app__bars i:first-child { width: 76%; background: rgba(57, 255, 136, 0.3); }
.app__bars i:nth-child(2) { width: 54%; }
.app__bars i:nth-child(3) { width: 64%; }

.app__cursor {
  position: absolute;
  width: 9px;
  height: 13px;
  background: var(--green);
  clip-path: polygon(0 0, 100% 62%, 56% 68%, 78% 100%, 62% 100%, 42% 70%, 14% 100%);
  filter: drop-shadow(0 0 6px rgba(57, 255, 136, 0.7));
  top: 22%;
  left: 18%;
  opacity: 0;
}

.demo.is-active .app__cursor {
  animation: cursorTravel 5.4s var(--cine-ease) infinite;
}

@keyframes cursorTravel {
  0%, 8% { opacity: 0; transform: translate(0, 0); }
  16% { opacity: 1; }
  34% { transform: translate(84px, 42px); }
  52% { transform: translate(26px, 96px); }
  70% { transform: translate(120px, 74px); }
  88%, 100% { opacity: 0; transform: translate(120px, 74px); }
}

/* --- 04 memory ------------------------------------------------------------ */
.memory {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
}

.memory__web {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.memory { min-height: 0; }

.memory__web line {
  stroke: rgba(57, 255, 136, 0.32);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.demo.is-active .memory__web line {
  animation: dashFlow 2.6s linear infinite;
}

@keyframes dashFlow { to { stroke-dashoffset: -28; } }

.memory__core {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green-line-strong);
  background: radial-gradient(circle at 40% 34%, rgba(57, 255, 136, 0.3), rgba(4, 10, 7, 0.96) 70%);
  box-shadow: 0 0 46px rgba(57, 255, 136, 0.25);
}

.memory__node {
  position: absolute;
  width: min(40%, 168px);
  padding: 10px 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 5px;
  background: rgba(7, 13, 9, 0.94);
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--mute);
  opacity: 0;
  transform: scale(0.9);
}

.demo.is-active .memory__node {
  animation: nodeIn 5.6s var(--cine-ease) infinite;
  animation-delay: var(--d, 0s);
}

@keyframes nodeIn {
  0%, 8% { opacity: 0; transform: scale(0.9); border-color: var(--hair-strong); }
  20%, 78% { opacity: 1; transform: scale(1); border-color: var(--green-line); }
  90%, 100% { opacity: 0; transform: scale(0.94); }
}

.memory__node b {
  display: block;
  font-family: var(--mono);
  font-size: 0.46rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}

.memory__node--a { top: 2%; left: 0; }
.memory__node--b { top: 14%; right: 0; }
.memory__node--c { bottom: 4%; left: 4%; }
.memory__node--d { bottom: 12%; right: 2%; }

/* --- 05 files & reach ----------------------------------------------------- */
.files {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  align-items: center;
}

.doc {
  border: 1px solid var(--hair-strong);
  border-radius: 4px;
  background: rgba(8, 14, 10, 0.92);
  padding: 12px;
  font-size: 0.7rem;
  color: var(--mute);
}

.doc__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute-dim);
}

.doc__bar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(233, 255, 244, 0.2);
}

.doc__bar span { margin-left: auto; }

.doc__bar i:first-child { background: var(--green); box-shadow: 0 0 8px var(--green); }

.doc__line {
  height: 5px;
  border-radius: 2px;
  background: rgba(233, 255, 244, 0.08);
  margin-bottom: 7px;
}

.doc__line--head { width: 62%; background: rgba(57, 255, 136, 0.3); margin-bottom: 12px; }

.doc__line:nth-child(3) { width: 92%; }
.doc__line:nth-child(4) { width: 78%; }
.doc__line:nth-child(5) { width: 86%; }
.doc__line:nth-child(6) { width: 54%; }

.doc__mark {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(57, 255, 136, 0.14), transparent 70%);
  transform: translateY(-100%);
}

.demo.is-active .doc__mark { animation: docScan 3.6s var(--cine-ease) infinite; }

@keyframes docScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.doc { position: relative; overflow: hidden; }

.phone-link {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 14px 10px;
  border: 1px dashed var(--green-line);
  border-radius: 4px;
  color: var(--mute);
  font-size: 0.68rem;
}

.phone-link__screen {
  width: 58px;
  aspect-ratio: 9 / 17;
  border: 1px solid var(--green-line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(57, 255, 136, 0.12), rgba(4, 9, 6, 0.9));
  display: grid;
  place-items: center;
  box-shadow: 0 0 22px rgba(57, 255, 136, 0.18);
}

.phone-link__screen i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

/* Showcase navigation dots for touch */
.showcase__dots { display: none; }

/* ==========================================================================
   Inner pages — page hero entrance
   ========================================================================== */
.page-hero .container > * {
  animation: pageHeroIn 0.9s var(--cine-ease) both;
}

.page-hero .container > h1 { animation-delay: 0.06s; }
.page-hero .container > p { animation-delay: 0.14s; }
.page-hero .container > div { animation-delay: 0.22s; }

@keyframes pageHeroIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Inner pages — cinematic hero scene
   Rings, a breathing glow, a drifting grid, motes and a slow scan line sit
   behind the copy. --hero-scroll is written by cinematic.js as the hero
   leaves the viewport, so the layers part at different speeds.
   ========================================================================== */
.page-hero[data-cine-hero] {
  --hero-scroll: 0;
  isolation: isolate;
}

.page-hero[data-cine-hero] > .container {
  position: relative;
  z-index: 2;
  transform: translate3d(0, calc(var(--hero-scroll) * -22px), 0);
  opacity: calc(1 - var(--hero-scroll) * 0.45);
}

.cine-hero__scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.cine-hero__grid {
  position: absolute;
  inset: -25% -12% -15%;
  background-image:
    linear-gradient(90deg, rgba(57, 255, 136, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(57, 255, 136, 0.05) 1px, transparent 1px);
  background-size: 92px 92px;
  -webkit-mask-image: radial-gradient(64% 74% at 76% 26%, #000, transparent 76%);
  mask-image: radial-gradient(64% 74% at 76% 26%, #000, transparent 76%);
  transform: translate3d(0, calc(var(--hero-scroll) * -40px), 0);
}

.cine-hero__orb {
  position: absolute;
  top: -26%;
  right: -8%;
  width: min(760px, 84vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(57, 255, 136, 0.2), rgba(57, 255, 136, 0.06) 46%, transparent 70%);
  filter: blur(8px);
  transform: translate3d(calc(var(--hero-scroll) * 54px), calc(var(--hero-scroll) * 44px), 0);
  opacity: calc(0.9 - var(--hero-scroll) * 0.6);
  animation: heroOrbBreathe 13s ease-in-out infinite;
}

@keyframes heroOrbBreathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.07; }
}

.cine-hero__ring {
  position: absolute;
  top: 44%;
  left: 78%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(57, 255, 136, 0.14);
  border-radius: 50%;
  translate: -50% calc(-50% + var(--hero-scroll) * 34px);
  opacity: calc(1 - var(--hero-scroll) * 0.55);
  animation: heroRingSpin var(--spin, 44s) linear infinite;
}

.cine-hero__ring--a { width: min(640px, 78vw); }
.cine-hero__ring--b { width: min(450px, 56vw); border-color: rgba(57, 255, 136, 0.11); }
.cine-hero__ring--c { width: min(280px, 34vw); border-color: rgba(57, 255, 136, 0.18); }

.cine-hero__ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57, 255, 136, 0.9);
}

.cine-hero__ring--b::after { width: 4px; height: 4px; margin-left: -2px; opacity: 0.7; }
.cine-hero__ring--c::after { width: 5px; height: 5px; margin-left: -2.5px; opacity: 0.85; }

@keyframes heroRingSpin {
  to { rotate: 360deg; }
}

.cine-hero__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(57, 255, 136, 0.075), transparent);
  animation: heroScan 11s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes heroScan {
  0% { transform: translateY(-130%); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(540%); opacity: 0; }
}

.cine-hero__motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

/* The scene dies into the page colour so the hero has no hard lower edge. */
.cine-hero__scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--void) 88%);
}

/* Text has to stay the loudest thing on the page on a phone. */
@media (max-width: 620px) {
  .cine-hero__orb { width: 130vw; right: -30%; top: -18%; opacity: 0.65; }
  .cine-hero__ring { left: 84%; top: 40%; }
  .cine-hero__ring--a { width: 88vw; }
  .cine-hero__ring--b { width: 62vw; }
  .cine-hero__ring--c { width: 38vw; }
  .cine-hero__grid { background-size: 64px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero[data-cine-hero] > .container { transform: none; opacity: 1; }

  .cine-hero__orb,
  .cine-hero__ring { animation: none; }

  .cine-hero__scan { display: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .float-card--mem { width: 118px; }
}

@media (max-width: 980px) {
  .device-rig {
    max-width: 520px;
    margin-top: 8px;
  }

  .stage__grid { perspective: 1400px; }

  .showcase { height: auto; padding: clamp(64px, 10vw, 100px) 0; }

  .showcase__sticky {
    position: static;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .showcase__shell {
    display: block;
    max-height: none;
  }

  .showcase__head { margin-bottom: 26px; }

  .showcase__tabs { display: none; }

  .showcase__counter { display: none; }

  .showcase__stage {
    position: static;
    aspect-ratio: auto;
    max-height: none;
    border: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    perspective: none;
    display: grid;
    gap: 18px;
  }

  .showcase__stage::before { display: none; }

  .demo {
    position: static;
    inset: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 18px;
    border: 1px solid var(--hair);
    background: linear-gradient(170deg, rgba(9, 17, 12, 0.96), rgba(4, 8, 6, 0.99));
    border-radius: 3px;
    min-height: 300px;
  }

  .demo__caption { display: block; }

  .demo__visual { margin-top: 4px; flex: 1; display: flex; flex-direction: column; }

  .demo h3 { font-size: 1.1rem; }

  /* Replay demo animations when the panel scrolls in. */
  .demo.is-active .voice__bars i,
  .demo.is-active .conv__row { animation-delay: 0.15s; }
}

@media (max-width: 860px) {
  .stage { padding-top: calc(var(--header-h) + 24px); }

  .stage__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .stage__copy { max-width: 620px; }

  .device-rig {
    width: min(100%, 420px);
    margin: 0 auto;
    aspect-ratio: 1 / 0.92;
  }

  .laptop { left: 3%; width: 82%; top: 12%; }
  .phone { width: 27%; bottom: 2%; }

  .float-card--state { left: 0; top: 4%; }
  .float-card--mem { right: 0; top: 50%; width: 104px; }

  .stage::after { right: -30vw; width: 100vw; opacity: 0.7; }
}

@media (max-width: 620px) {
  .float-card--mem,
  .float-card--state { display: none; }

  .device-rig { aspect-ratio: 1 / 0.86; }

  .showcase__head .lead { font-size: 0.95rem; }

  .files { grid-template-columns: 1fr; }
  .phone-link { display: none; }
}

/* ==========================================================================
   Reduced motion — keep the composition, drop the movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .laptop,
  .phone,
  .float-card,
  .rig-glow,
  .voice__ring::before,
  .voice__ring::after,
  .mini__wave i,
  .bubble--typing i,
  .bro-ui__foot .dot,
  .float-card__meter i { animation: none !important; }

  .cine-on .stage__copy > *,
  .cine-on .display .line > *,
  .cine-on .device-rig,
  .cine-on .float-card {
    opacity: 1 !important;
    transform: none !important;
  }

  .cine-text .word > span {
    transform: none !important;
    opacity: 1 !important;
  }

  .demo {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .demo.is-active .conv__row,
  .demo.is-active .memory__node { opacity: 1; transform: none; }
}

/* ==========================================================================
   Section rail — fixed landmark navigation for the landing page
   A narrow glass rail of numbered ticks on the right edge. The tick for the
   section in view lifts, turns green and names itself; the fill behind the
   ticks follows the same position. Hidden on narrower viewports where it
   would crowd the content and the header nav is faster.
   ========================================================================== */
.section-rail {
  --rail-fill: 0%;
  position: fixed;
  top: 50%;
  right: 12px;
  z-index: 80;
  display: none;
  translate: 0 -50%;
  padding: 13px 7px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(9, 16, 12, 0.96), rgba(4, 8, 6, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(233, 255, 244, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  animation: railIn 0.8s var(--cine-ease) 0.5s forwards;
}

@keyframes railIn {
  to { opacity: 1; }
}

.section-rail ul {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.section-rail__track {
  position: absolute;
  top: 15px;
  bottom: 15px;
  right: 6px;
  width: 1px;
  background: var(--hair);
  pointer-events: none;
}

.section-rail__track i {
  position: absolute;
  inset: 0 0 auto;
  height: var(--rail-fill);
  background: linear-gradient(180deg, rgba(57, 255, 136, 0.12), var(--green));
  box-shadow: 0 0 10px rgba(57, 255, 136, 0.45);
  transition: height 0.5s var(--cine-ease);
}

.section-rail a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 2px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--mute-dim);
  transition: color 0.28s ease;
}

.section-rail a:hover,
.section-rail a:focus-visible { color: var(--ice); }

.section-rail__idx {
  min-width: 12px;
  opacity: 0.75;
  transition: color 0.28s ease, opacity 0.28s ease;
}

.section-rail__dot {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(233, 255, 244, 0.3);
  border-radius: 1px;
  background: var(--void);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, scale 0.28s var(--cine-ease);
}

.section-rail a:hover .section-rail__dot { border-color: var(--green-line-strong); }

.section-rail a.is-current .section-rail__dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(57, 255, 136, 0.85);
  scale: 1.4;
}

.section-rail a.is-current .section-rail__idx {
  color: var(--green);
  opacity: 1;
}

.section-rail__label {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  translate: 0 -50%;
  padding: 4px 9px;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: rgba(6, 11, 8, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s var(--cine-ease);
}

.section-rail a:hover .section-rail__label,
.section-rail a:focus-visible .section-rail__label,
.section-rail a.is-current .section-rail__label {
  opacity: 1;
  transform: none;
}

@media (min-width: 1280px) {
  .section-rail { display: block; }
}

/* Between 1280 and 1360 the shell comes close to the edge, so the rail drops
   its numbers and keeps only the ticks — enough to read position, no crowding. */
@media (min-width: 1280px) and (max-width: 1360px) {
  .section-rail { right: 8px; padding: 13px 6px; }
  .section-rail__idx { display: none; }
  .section-rail a { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .section-rail { animation: none; opacity: 1; }
  .section-rail__track i { transition: none; }
  .section-rail__label { transition: none; }
  .section-rail a.is-current .section-rail__dot { scale: 1; }
}

/* ==========================================================================
   Inner pages — section scroll scene
   cinematic.js marks the document cine-inner and writes --scene (0 → 1) to
   every top-level section as it crosses the viewport. That one value moves an
   ambient aura, draws the section's top rule and drifts the content a few
   pixels, so Features / Download / About / Support keep moving after the hero
   has gone. Everything is decoration: no value here is needed to read a page.
   ========================================================================== */
html.cine-inner {
  --scene: 0;
}

html.cine-inner .section {
  --scene: 0;
  position: relative;
  isolation: isolate;
}

html.cine-inner .section > .container {
  position: relative;
  z-index: 2;
}

/* A soft green aura drifting against the scroll direction. */
html.cine-inner .section::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -8%;
  right: 0;
  width: min(720px, 74vw);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(57, 255, 136, 0.085), rgba(57, 255, 136, 0.02) 44%, transparent 68%);
  transform-origin: 100% 50%;
  transform: translate3d(0, calc((var(--scene) - 0.5) * -110px), 0) scale(calc(0.9 + var(--scene) * 0.2));
  opacity: calc(0.32 + var(--scene) * 0.68);
  animation: innerAura 15s ease-in-out infinite;
}

html.cine-inner .section:nth-of-type(even)::before {
  right: auto;
  left: 0;
  transform-origin: 0 50%;
}

@keyframes innerAura {
  0%, 100% { filter: blur(0px); }
  50% { filter: blur(6px); }
}

/* The section's top edge lights up as you cross it. */
html.cine-inner .section::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: calc(var(--scene) * 100%);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(57, 255, 136, 0.55), rgba(57, 255, 136, 0.06) 70%, transparent);
  box-shadow: 0 0 16px rgba(57, 255, 136, 0.25);
  opacity: 0.7;
}

/* Reveals on inner pages resolve out of a soft blur rather than a flat fade. */
html.cine-inner [data-reveal] {
  filter: blur(6px);
  transition:
    opacity 1s var(--cine-ease),
    transform 1.1s var(--cine-ease),
    filter 1s var(--cine-ease);
}

html.cine-inner [data-reveal].is-visible {
  filter: blur(0px);
}

/* Headlines split into words once they arrive. */
html.cine-inner .section-head .h2.cine-text .word > span,
html.cine-inner .section-head h2.cine-text .word > span {
  transition-duration: 1.15s;
}

/* A shallow drift on the whole column; the aura above travels further, which
   reads as depth without moving the text far enough to be noticed. */
@media (min-width: 981px) and (prefers-reduced-motion: no-preference) {
  html.cine-inner .section > .container {
    transform: translate3d(0, calc((var(--scene) - 0.5) * 12px), 0);
  }

  html.cine-inner .depth-scene {
    transform: translate3d(0, calc((var(--scene) - 0.5) * -40px), 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.cine-inner .section::before { animation: none; }
  html.cine-inner [data-reveal] { filter: none; }
  html.cine-inner .section > .container { transform: none; }
}
