/* ─── Aurora launch — design tokens ─── */
:root {
  --bg: #06060B;
  --ink: #F5F0E6;        /* cream — primary text */
  --warm: #9F8B6B;       /* muted warm — secondary text */
  --teal: #B5E8D8;       /* eyebrow accent */
  --teal-sat: #46C8DC;   /* saturated brand teal */
  --violet: #7C60FF;
  --magenta: #C58CFF;
  --gradient: linear-gradient(135deg, var(--teal-sat) 0%, var(--violet) 50%, var(--magenta) 100%);

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-ar: "IBM Plex Sans Arabic", "Geeza Pro", sans-serif;

  --section-pad-block: clamp(80px, 12vh, 140px);
  --section-pad-inline: clamp(20px, 6vw, 80px);
  --content-max: 1200px;
}

html[dir="rtl"] {
  --font-display: var(--font-ar);
  --font-body: var(--font-ar);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--teal);
}

em.aurora-em {
  font-style: italic;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Section frame */
.section {
  position: relative;
  min-height: 100vh;
  padding-block: var(--section-pad-block);
  padding-inline: var(--section-pad-inline);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.section-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin-inline: auto;
  width: 100%;
}

/* Visible-on-scroll baseline (JS adds .in-view) */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── iPhone mockup ─── */
.phone {
  --tilt: -8deg;
  --glow: var(--violet);
  position: relative;
  display: inline-block;
  width: min(320px, 70vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 14% / 6.5%;
  background: linear-gradient(135deg, #1A1A26, #0A0A14);
  padding: 10px;
  transform: rotate(var(--tilt));
  box-shadow:
    0 60px 100px rgba(0, 0, 0, 0.55),
    0 40px 80px color-mix(in oklab, var(--glow) 35%, transparent),
    inset 0 0 0 1.5px #2A2A3A;
  transition: transform 0.4s ease;
}

.phone--tilt-right { --tilt: 8deg; }
.phone--tilt-flat  { --tilt: 0deg; }
.phone--teal       { --glow: var(--teal-sat); }
.phone--magenta    { --glow: var(--magenta); }

.phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 11% / 5%;
  object-fit: cover;
  object-position: top;
  display: block;
  background: #000;
}

/* Dynamic Island notch */
.phone::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 26px;
  background: #000;
  border-radius: 99px;
  z-index: 2;
}

@media (max-width: 700px) {
  .phone { width: min(280px, 78vw); }
}

/* ─── Nebula gradient backdrops ─── */
.nebula {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.nebula__blob {
  position: absolute;
  width: 70vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
}
.nebula__blob--violet  { background: var(--violet);  }
.nebula__blob--teal    { background: var(--teal-sat);}
.nebula__blob--magenta { background: var(--magenta); }

/* Per-section blob placements */
.section--hero       .nebula__blob--violet  { top: 10%; left: 20%; }
.section--hero       .nebula__blob--teal    { bottom: 0%; right: 10%; }

.section--why        .nebula__blob--magenta { top: 30%; right: 0%; }

.section--catalog    .nebula__blob--teal    { top: 20%; left: -10%; }
.section--catalog    .nebula__blob--violet  { bottom: 10%; right: 20%; }

.section--top25      .nebula__blob--magenta { top: 0%; left: 30%; }

.section--upcoming   .nebula__blob--violet  { top: 20%; right: -20%; }
.section--upcoming   .nebula__blob--teal    { bottom: 5%; left: -20%; }

.section--continue   .nebula__blob--teal    { top: 0%; left: 40%; }

.section--library    .nebula__blob--magenta { top: 10%; left: -10%; }
.section--library    .nebula__blob--violet  { bottom: 10%; right: 0%; }

.section--profiles   .nebula__blob--violet  { top: 5%; left: 15%; }
.section--profiles   .nebula__blob--teal    { bottom: 10%; right: 15%; }

.section--kids       .nebula__blob--magenta { top: 0%; right: 0%; }

.section--themes     .nebula__blob--teal    { top: 15%; right: -10%; }
.section--themes     .nebula__blob--violet  { bottom: 0%; left: -10%; }
.section--themes     .nebula__blob--magenta { top: 40%; left: 40%; }

.section--notifications .nebula__blob--violet { top: 25%; right: 25%; }

.section--everyone   .nebula__blob--magenta { top: 0%; left: 25%; }

.section--close      .nebula__blob--violet  { top: 30%; left: 30%; }
.section--close      .nebula__blob--teal    { bottom: 0%; right: 30%; }

/* ─── Film grain overlay ─── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding: 18px clamp(20px, 5vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(6, 6, 11, 0.85), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.header__logo svg { width: 22px; height: 22px; }
.header__logo span {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  font-weight: 600;
  font-size: 0.88rem;
}

.lang-toggle {
  appearance: none;
  border: 1px solid #2A2A3A;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 8px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lang-toggle:hover {
  border-color: var(--violet);
  background: rgba(124, 96, 255, 0.12);
}

/* ─── Hero ─── */
.section--hero {
  min-height: 100vh;
  text-align: center;
}
.section--hero .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.section--hero .hero__logo svg {
  width: clamp(80px, 12vw, 140px);
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(124, 96, 255, 0.45));
}
.section--hero .hero__eyebrow {
  margin-bottom: 12px;
}
.section--hero .hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.03em;
}
.section--hero .hero__body {
  max-width: 640px;
  color: var(--warm);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* ─── Why Aurora ─── */
.section--why .section-inner {
  max-width: 900px;
}
.section--why .why__title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: -0.03em;
  margin-top: 18px;
}
.section--why .why__body {
  margin-top: 24px;
  color: var(--warm);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 720px;
}

/* ─── Catalog / two-column phone section ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.two-col__copy h2 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.03em;
  margin-top: 16px;
}
.two-col__copy p {
  margin-top: 24px;
  color: var(--warm);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  max-width: 540px;
}
.two-col__visual { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ─── Top 25 ─── */
.section--top25 { padding-inline: 0; }
.section--top25 .section-inner {
  max-width: none;
  padding-inline: var(--section-pad-inline);
}
.section--top25 .top25__head { max-width: 720px; }
.section--top25 .top25__head h2 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  margin-top: 16px;
}
.section--top25 .top25__head p {
  margin-top: 20px;
  color: var(--warm);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 600px;
}
.section--top25 .top25__bleed {
  margin-top: 60px;
  width: 100%;
  display: block;
  max-height: 80vh;
  object-fit: contain;
}

/* ─── Profiles multi-phone composition ─── */
.section--profiles .phone-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 540px;
}
.section--profiles .phone-stack .phone {
  position: absolute;
  width: min(220px, 50vw);
}
.section--profiles .phone-stack .phone:nth-child(1) {
  transform: rotate(-12deg) translate(-110px, -10px);
  z-index: 1;
}
.section--profiles .phone-stack .phone:nth-child(2) {
  transform: rotate(0deg) translate(0, 30px);
  z-index: 3;
}
.section--profiles .phone-stack .phone:nth-child(3) {
  transform: rotate(10deg) translate(110px, -10px);
  z-index: 2;
}
@media (max-width: 900px) {
  .section--profiles .phone-stack { min-height: 460px; }
  .section--profiles .phone-stack .phone { width: min(180px, 42vw); }
  .section--profiles .phone-stack .phone:nth-child(1) { transform: rotate(-10deg) translate(-80px, -10px); }
  .section--profiles .phone-stack .phone:nth-child(3) { transform: rotate(8deg) translate(80px, -10px); }
}

/* ─── Themes — 6-phone array ─── */
.themes-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 60px;
}
.theme-tile {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 18%/8%;
  overflow: hidden;
  background: #0A0A14;
  border: 1.5px solid #2A2A3A;
  box-shadow: 0 30px 60px var(--theme-glow, rgba(124, 96, 255, 0.3));
}
.theme-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--theme-tint);
  mix-blend-mode: hue;
  opacity: 0.65;
  pointer-events: none;
}
.theme-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.theme-tile__label {
  position: absolute;
  bottom: 8px;
  inset-inline: 8px;
  text-align: center;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 0;
  border-radius: 4px;
  z-index: 3;
}
.theme-tile--aurora  { --theme-tint: #7C60FF; --theme-glow: rgba(124, 96, 255, 0.4); }
.theme-tile--crimson { --theme-tint: #E14B6A; --theme-glow: rgba(225, 75, 106, 0.4); }
.theme-tile--ocean   { --theme-tint: #4AA8E6; --theme-glow: rgba(74, 168, 230, 0.4); }
.theme-tile--emerald { --theme-tint: #2AB87A; --theme-glow: rgba(42, 184, 122, 0.4); }
.theme-tile--amber   { --theme-tint: #E0A030; --theme-glow: rgba(224, 160, 48, 0.4); }
.theme-tile--rose    { --theme-tint: #E07AB0; --theme-glow: rgba(224, 122, 176, 0.4); }
@media (max-width: 800px) {
  .themes-row { grid-template-columns: repeat(3, 1fr); }
}

/* ─── For everyone — Arabic typography showcase ─── */
.everyone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.everyone-grid .everyone-ar {
  font-family: var(--font-ar);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: right;
  direction: rtl;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 900px) {
  .everyone-grid { grid-template-columns: 1fr; }
  .everyone-grid .everyone-ar { text-align: center; }
}

/* ─── Close + footer ─── */
.section--close {
  text-align: center;
}
.section--close .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.section--close .close__title {
  font-size: clamp(3.5rem, 9vw, 7rem);
  letter-spacing: -0.04em;
}
.section--close .close__body {
  max-width: 600px;
  color: var(--warm);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}
.share-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 99px;
  background: var(--gradient);
  color: #0A0A14;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(124, 96, 255, 0.4);
}
.share-btn svg { width: 18px; height: 18px; }

.footer {
  padding: 40px 20px 60px;
  text-align: center;
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── TestFlight signup form ─── */
.signup {
  margin-top: 16px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.signup__prompt {
  color: var(--warm);
  font-size: 0.95rem;
  text-align: center;
}
.signup__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.signup__input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2A2A3A;
  border-radius: 99px;
  padding: 14px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.signup__input::placeholder {
  color: rgba(245, 240, 230, 0.35);
}
.signup__input:focus {
  border-color: var(--violet);
  background: rgba(124, 96, 255, 0.08);
}
.signup__btn {
  appearance: none;
  border: none;
  background: var(--gradient);
  color: #0A0A14;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 24px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.signup__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(124, 96, 255, 0.32);
}
.signup__btn:disabled {
  opacity: 0.5;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.signup__msg {
  text-align: center;
  font-size: 0.85rem;
  font-family: var(--font-body);
}
.signup__msg--success { color: var(--teal); }
.signup__msg--error   { color: #FF8B7A; }

.signup.is-done .signup__row { display: none; }
.signup.is-done .signup__prompt { display: none; }

@media (max-width: 600px) {
  .signup__row { flex-direction: column; }
  .signup__btn { padding: 14px 24px; }
}

/* ─── Language toggle: flags ─── */
.lang-toggle {
  padding: 5px 9px;
  line-height: 0;
}
.lang-toggle__flag {
  display: none;
  width: 20px;
  height: 14px;
  border-radius: 3px;
}
/* When English is active, show the Saudi flag (tap = switch to AR). */
html[lang="en"] .lang-toggle__flag--to-ar { display: inline-block; }
/* When Arabic is active, show the US flag (tap = switch to EN). */
html[lang="ar"] .lang-toggle__flag--to-en { display: inline-block; }

/* ─── Polish: hero spotlight ─── */
.section--hero-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    400px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    rgba(124, 96, 255, 0.18) 0%,
    rgba(70, 200, 220, 0.08) 35%,
    transparent 70%
  );
  transition: opacity 0.4s ease;
}
@media (hover: none) {
  .section--hero-spotlight::after { display: none; }
}

/* ─── Polish: word-by-word headline reveals ─── */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.55s cubic-bezier(.18,.71,.39,1), transform 0.55s cubic-bezier(.18,.71,.39,1);
  will-change: opacity, transform;
}
.word.word-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .word { opacity: 1; transform: none; transition: none; }
}

/* ─── Polish: phone hover tilt ─── */
.phone {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ─── Polish: slow nebula drift ─── */
@media (prefers-reduced-motion: no-preference) {
  .nebula__blob {
    animation: nebula-drift 26s ease-in-out infinite alternate;
    will-change: transform;
  }
  .nebula__blob--teal    { animation-duration: 22s; animation-delay: -3s; }
  .nebula__blob--violet  { animation-duration: 28s; animation-delay: -11s; }
  .nebula__blob--magenta { animation-duration: 32s; animation-delay: -7s;  }
}
@keyframes nebula-drift {
  0%   { transform: translate3d(  0%,   0%, 0) scale(1); }
  33%  { transform: translate3d(  4%,  -3%, 0) scale(1.04); }
  66%  { transform: translate3d( -3%,   4%, 0) scale(0.97); }
  100% { transform: translate3d(  3%,   2%, 0) scale(1.02); }
}

/* ─── Polish: share button magnet smoothness ─── */
.share-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, translate 0.25s cubic-bezier(.18,.71,.39,1);
}

/* ─── Hero signup variant ─── */
.signup--hero {
  max-width: 480px;
  align-items: center;
  margin-inline: auto;
  margin-top: 8px;
}
.signup--hero .signup__prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}
.signup--hero .signup__row { width: 100%; }
.signup--hero .signup__input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}
.testflight-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  filter: drop-shadow(0 6px 16px rgba(0, 122, 255, 0.45));
  flex-shrink: 0;
  vertical-align: middle;
}

/* ─── Polish bundle #2 ─── */

/* #3 — Scroll progress bar (top of viewport) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: var(--gradient);
  transition: transform 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
}

/* #1 — Hero chevron stroke-in on first load */
.hero-chevron-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  /* Fill is delayed so the outline draws first */
  fill-opacity: 0;
  animation:
    chev-stroke 1.2s cubic-bezier(.6,.05,.2,1) 0.15s forwards,
    chev-fill   0.6s ease 1.1s forwards;
}
@keyframes chev-stroke {
  to { stroke-dashoffset: 0; }
}
@keyframes chev-fill {
  to { fill-opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-chevron-path {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    animation: none;
  }
}

/* #5 — Hero logo pulse (after stroke-in completes) */
.section--hero .hero__logo svg {
  animation: hero-logo-pulse 4.8s ease-in-out 1.8s infinite;
}
@keyframes hero-logo-pulse {
  0%, 100% { filter: drop-shadow(0 20px 60px rgba(124, 96, 255, 0.45)); }
  50%      { filter: drop-shadow(0 20px 80px rgba(124, 96, 255, 0.70)); }
}
@media (prefers-reduced-motion: reduce) {
  .section--hero .hero__logo svg { animation: none; }
}

/* #2 — Eyebrow type-on with blinking cursor */
.eyebrow.is-typing { position: relative; }
.eyebrow .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.05s linear, transform 0.05s linear;
}
.eyebrow .char.char-in {
  opacity: 1;
  transform: none;
}
.eyebrow.is-typing::after {
  content: "";
  display: inline-block;
  width: 1ch;
  height: 1em;
  margin-inline-start: 2px;
  background: currentColor;
  vertical-align: -0.12em;
  animation: caret-blink 0.6s steps(2, start) infinite;
}
.eyebrow.typed::after { display: none; }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .eyebrow .char { opacity: 1; transform: none; transition: none; }
  .eyebrow.is-typing::after, .eyebrow.typed::after { display: none; }
}

/* #4 — Signup success celebration shimmer */
.signup.is-celebrating .signup__msg--success {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(124, 96, 255, 0.20) 35%,
    rgba(70, 200, 220, 0.30) 50%,
    rgba(197, 140, 255, 0.20) 65%,
    transparent 100%
  );
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0;
  animation: signup-shimmer 1.8s cubic-bezier(.4,0,.2,1) forwards;
  border-radius: 8px;
  padding: 8px 12px;
}
@keyframes signup-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .signup.is-celebrating .signup__msg--success { animation: none; background: none; }
}

/* ─── Interactive demo — base shell ─── */
.demo-root {
  --demo-accent: #7C60FF;
  margin-top: 56px;
  display: flex;
  justify-content: center;
}
.demo-shell {
  position: relative;
  display: inline-block;
}
.demo-frame {
  position: relative;
  width: clamp(280px, 32vw, 360px);
  aspect-ratio: 9 / 19.5;
  border-radius: 14% / 6.5%;
  background: #06060B;
  padding: 10px;
  box-shadow:
    0 60px 100px rgba(0, 0, 0, 0.6),
    0 40px 80px color-mix(in oklab, var(--demo-accent) 35%, transparent),
    inset 0 0 0 1.5px #2A2A3A;
  overflow: hidden;
}
.demo-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 24px;
  background: #000;
  border-radius: 99px;
  z-index: 20;
}
.demo-viewport {
  position: absolute;
  inset: 10px 10px 64px 10px;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: #08080F;
}
.demo-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  transform: translateX(24px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.demo-screen::-webkit-scrollbar { display: none; }
.demo-screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.demo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.demo-sr {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Demo tab bar ─── */
.demo-tabbar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 44px;
  background: rgba(20, 20, 28, 0.92);
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 15;
}
.demo-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(245, 240, 230, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.demo-tab__icon svg { display: block; width: 18px; height: 18px; }
.demo-tab__label {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.demo-tab[aria-current="page"] { color: var(--demo-accent); }

/* ─── Demo toast ─── */
.demo-toast {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 20, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px 16px;
  border-radius: 99px;
  z-index: 16;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.demo-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Demo: Home ─── */
.demo-home {
  color: var(--ink);
  padding-bottom: 80px;
  font-family: var(--font-body);
}
.demo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 14px 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  font-size: 0.6rem;
}
.demo-wordmark { color: var(--ink); font-weight: 600; }
.demo-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C58CFF, #46C8DC);
  border: 1.5px solid var(--demo-accent);
}
.demo-hero-pager {
  position: relative;
  height: 200px;
  margin: 8px 14px 0;
  border-radius: 14px;
  overflow: hidden;
}
.demo-hero-card {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}
.demo-hero-card.is-active { opacity: 1; }
.demo-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--teal);
  text-transform: uppercase;
}
.demo-hero-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.demo-hero-body {
  font-size: 0.6rem;
  color: rgba(245, 240, 230, 0.75);
  margin-top: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.demo-hero-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.demo-play-btn, .demo-lib-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.92);
  color: #0A0A14;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  text-transform: uppercase;
}
.demo-lib-btn { background: transparent; color: var(--ink); }

.demo-hero-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 8px 0;
}
.demo-hero-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s, width 0.2s;
}
.demo-hero-dot.is-active {
  background: var(--demo-accent);
  width: 12px;
  border-radius: 99px;
}

.demo-row { padding: 12px 14px 0; }
.demo-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.18em;
  color: var(--warm);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.demo-cw-card {
  position: relative;
  height: 90px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2a2230, #1a1623);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-body);
}
.demo-cw-card--landscape { background: linear-gradient(135deg, #28282f, #18181f); cursor: pointer; }
.demo-cw-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.demo-cw-badge span { color: var(--warm); font-size: 0.4rem; }
.demo-cw-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  align-self: flex-start;
  margin-top: auto;
}
.demo-cw-meta {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  background: rgba(0,0,0,0.55);
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}
.demo-cw-progress {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 2px;
  background: rgba(255,255,255,0.1);
}
.demo-cw-progress span {
  display: block;
  height: 100%;
  background: var(--demo-accent);
  transition: background 0.3s;
}

.demo-poster-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.demo-poster {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: linear-gradient(135deg, #2a2230, #131820);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  font-family: var(--font-display);
  font-size: 0.55rem;
  line-height: 1.1;
}
.demo-poster-label { color: rgba(245, 240, 230, 0.85); }

/* ─── Demo: Library ─── */
.demo-library { padding-bottom: 80px; }
.demo-page-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 50px 14px 4px;
  letter-spacing: -0.02em;
}
.demo-eyebrow--gradient {
  position: relative;
  display: inline-block;
}
.demo-eyebrow--gradient::after {
  content: "";
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--gradient);
  margin-top: 3px;
}
.demo-lib-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.demo-poster--large {
  width: 95px;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #2a2230, #131820);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  align-items: flex-end;
  font-family: var(--font-display);
  font-size: 0.7rem;
  cursor: pointer;
}
.demo-lib-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  margin-top: 8px;
}
.demo-lib-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--warm);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ─── Demo: Detail ─── */
.demo-detail { padding-bottom: 80px; }
.demo-detail-banner {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
  padding: 50px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.demo-back {
  position: absolute;
  top: 50px;
  left: 14px;
  background: rgba(0,0,0,0.5);
  color: var(--ink);
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}
.demo-detail-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.demo-trailer-row, .demo-season-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.demo-trailer {
  width: 80px;
  height: 50px;
  background: linear-gradient(135deg, #2a2230, #131820);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--ink);
}
.demo-trailer span {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  margin-top: 2px;
  color: var(--warm);
  letter-spacing: 0.08em;
}
.demo-season {
  width: 60px;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #2a2230, #131820);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--ink);
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}
.demo-season.is-active { border-color: var(--demo-accent); }

.demo-ep {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.demo-ep-thumb {
  width: 64px;
  height: 36px;
  background: linear-gradient(135deg, #2a2230, #131820);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.demo-ep-body { flex: 1; min-width: 0; }
.demo-ep-title { font-size: 0.78rem; color: var(--ink); }
.demo-ep-meta { font-family: var(--font-mono); font-size: 0.5rem; color: var(--warm); letter-spacing: 0.08em; margin-top: 2px; }

/* ─── Demo: Settings ─── */
.demo-settings { padding-bottom: 80px; }
.demo-settings-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.demo-avatar--lg {
  width: 36px;
  height: 36px;
  border: 2px solid var(--demo-accent);
}
.demo-settings-profile-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}
.demo-settings-profile-meta {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  color: var(--warm);
  letter-spacing: 0.18em;
  margin-top: 2px;
}

.demo-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.demo-tile {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1c1c24, #14141c);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
}

.demo-settings-sub {
  font-family: var(--font-display);
  font-size: 0.8rem;
  margin-top: 6px;
}
.demo-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.demo-palette-tile {
  appearance: none;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, #1c1c24, #14141c);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.demo-palette-tile__chip {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tile-color);
}
.demo-palette-tile__name {
  font-family: var(--font-mono);
  font-size: 0.44rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
}
.demo-palette-tile.is-active { border-color: var(--tile-color); }
.demo-palette-tile.is-active .demo-palette-tile__name { color: var(--ink); }

/* ─── Demo: Profiles ─── */
.demo-profiles {
  padding-bottom: 80px;
  text-align: center;
  font-family: var(--font-body);
}
.demo-profiles-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--teal);
  text-transform: uppercase;
  margin-top: 12px;
}
.demo-profiles-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.demo-profiles-hero {
  margin-top: 24px;
}
.demo-avatar--xl {
  display: inline-block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--avatar-gradient, linear-gradient(135deg, #C58CFF, #46C8DC));
  border: 2.5px solid var(--demo-accent);
}
.demo-profiles-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  margin-top: 10px;
}
.demo-profiles-tags {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  color: var(--warm);
  letter-spacing: 0.18em;
  margin-top: 2px;
}

.demo-profile-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}
.demo-profile-avatar {
  appearance: none;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--avatar-gradient, linear-gradient(135deg, #2a2230, #131820));
  cursor: pointer;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s, transform 0.2s;
}
.demo-profile-avatar.is-active {
  outline-color: var(--demo-accent);
  transform: scale(1.08);
}
.demo-kids-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--demo-accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.demo-profiles-cta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 76px;
  display: flex;
  gap: 8px;
}
.demo-cta-pill {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 10px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  cursor: pointer;
}

/* ─── Demo: reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .demo-screen { transition: none; }
  .demo-hero-card { transition: none; }
  .demo-palette-tile { transition: none; }
  .demo-profile-avatar { transition: none; }
  .demo-toast { transition: none; }
}

/* ─── Demo: mobile + small viewport ─── */
@media (max-width: 700px) {
  .demo-frame { width: min(78vw, 320px); }
}
@media (max-width: 380px) {
  .demo-frame { width: 88vw; }
  .demo-tabbar { left: 14px; right: 14px; }
  .demo-tab__label { font-size: 0.42rem; }
}
