:root {
  --bg-top: #0D0E12;
  --bg-bottom: #07080B;
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1AA;
  --text-muted: #6B7280;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-bright: rgba(255, 255, 255, 0.22);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --max-w: 1180px;

  --dial-angle: 0deg;

  /* Showcase: the video takes what is left after the dial markers above it and the pills and caption below it.
     The dial is sized from the video so the neighbouring markers land just outside its sides. */
  --stage-h: max(220px, min(66vh, 100vh - 372px));
  --stage-w: min(80vw, 1560px, calc(var(--stage-h) * 16 / 9));
  --dial-w: calc(var(--stage-w) * 2.1 + 60px);
  --stage-scale: 1;
}

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

html {
  background-color: var(--bg-bottom);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Keep overflow-x: clip so position: sticky works on child tracks */
body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, #090A0E 45%, var(--bg-bottom) 100%);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: clip;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.studio-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.topbar-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 0 18px;
  pointer-events: none;
}

.topbar {
  pointer-events: auto;
  max-width: 980px;
  margin: 0 auto;
  height: 50px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  background: rgba(14, 15, 20, 0.72);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--hairline);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-ver {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.topbar-nav a {
  transition: color 0.2s ease;
  white-space: nowrap;
}

.topbar-nav a:hover {
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-topbar-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #DCDFE6 100%);
  color: #07080B;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease-apple), box-shadow 0.25s ease;
}

.btn-topbar-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.btn-topbar-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-topbar-github:hover {
  color: var(--text-primary);
  border-color: var(--hairline-bright);
  background: rgba(255, 255, 255, 0.1);
}

.hero-chapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 112px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-studio-glow {
  position: absolute;
  top: 22%;
  right: 8%;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(228, 228, 231, 0.10), transparent 62%),
    radial-gradient(circle at 64% 62%, rgba(255, 255, 255, 0.05), transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.01;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-title-chrome {
  display: block;
  background: linear-gradient(180deg, #FFFFFF 12%, #D1D5DB 58%, #838894 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-pitch {
  font-size: clamp(1.04rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.62;
  margin-bottom: 36px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.btn-apple-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #D9DCE3 100%);
  color: #07080B;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  box-shadow: 0 14px 34px -8px rgba(255, 255, 255, 0.28), inset 0 1px 0 #FFFFFF;
  transition: transform 0.28s var(--ease-apple), box-shadow 0.28s ease;
}

.btn-apple-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -8px rgba(255, 255, 255, 0.38), inset 0 1px 0 #FFFFFF;
}

.btn-apple-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--hairline-bright);
  backdrop-filter: blur(18px);
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.28s var(--ease-apple);
}

.btn-apple-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.hero-stat-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.stat-sep {
  color: rgba(255, 255, 255, 0.22);
}

.hero-sculpture-col {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

/* Opening animation. The wrapper carries all intro motion so nothing inside it is ever touched. */
.hero-intro-wrap {
  position: relative;
}

.intro-bloom,
.intro-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(280px, 32vw, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.intro-bloom {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34) 0%, rgba(212, 212, 216, 0.16) 44%, transparent 70%);
}

.intro-ring {
  border: 1px solid rgba(244, 244, 245, 0.75);
  box-shadow: 0 0 34px rgba(228, 228, 231, 0.45), inset 0 0 26px rgba(228, 228, 231, 0.28);
}

/* Waiting for power-up */
.intro-pending {
  overflow: hidden;
  scrollbar-gutter: stable; /* so unlocking the scrollbar shifts nothing */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #07080B;
  opacity: 0;
  pointer-events: none;
}

.intro-pending body::before {
  opacity: 1;
}

.intro-pending .topbar-wrap,
.intro-pending .hero-studio-glow,
.intro-pending .hero-copy,
.intro-pending main > section:not(.hero-chapter),
.intro-pending .site-footer {
  opacity: 0;
  visibility: hidden;
}

.intro-pending .hero-intro-wrap {
  opacity: 0;
}

.intro-ready .hero-intro-wrap {
  opacity: 1;
  transition: opacity 0.9s ease, transform 0.45s var(--ease-apple);
}

/* Powered up and on the move: stays lit while the rest of the page is still dark */
.intro-running .hero-intro-wrap {
  opacity: 1;
}

/* The page lights up through a circle that opens from the logo. app.js drives --light-r. */
.intro-dark,
.intro-wave {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.intro-dark {
  z-index: 130;
  background: #07080B;
  -webkit-mask-image: radial-gradient(circle at var(--light-x) var(--light-y), transparent calc(var(--light-r) - 140px), #000 var(--light-r));
  mask-image: radial-gradient(circle at var(--light-x) var(--light-y), transparent calc(var(--light-r) - 140px), #000 var(--light-r));
}

.intro-wave {
  z-index: 131;
  background: radial-gradient(circle at var(--light-x) var(--light-y),
    transparent calc(var(--light-r) - 220px),
    rgba(212, 212, 216, 0.07) calc(var(--light-r) - 120px),
    rgba(255, 255, 255, 0.26) calc(var(--light-r) - 62px),
    rgba(228, 228, 231, 0.10) calc(var(--light-r) - 36px),
    transparent calc(var(--light-r) + 10px));
}

.intro-ready #hero-sculpture {
  cursor: pointer;
}

.intro-ready .intro-bloom {
  animation: intro-breathe 4.4s ease-in-out infinite;
}

@keyframes intro-breathe {
  0%,
  100% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(1.34);
  }

  50% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.62);
  }
}

.intro-ready .intro-ring {
  transition: opacity 0.4s ease;
}

.intro-ready.intro-hover .intro-ring {
  opacity: 0.8;
}

.intro-ready.intro-hover .intro-bloom {
  animation-duration: 2.2s;
  filter: brightness(1.5);
}

.power-pill {
  position: fixed;
  left: 50%;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 24px 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(14, 16, 22, 0.9), rgba(14, 16, 22, 0.9)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(161, 161, 170, 0.22) 45%, rgba(255, 255, 255, 0.08)) border-box,
    #07080B;
  background-clip: padding-box, border-box, padding-box;
  box-shadow: 0 0 34px rgba(228, 228, 231, 0.16), 0 14px 34px -10px rgba(0, 0, 0, 0.8);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  white-space: nowrap;
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s ease;
  animation: power-pill-in 0.9s var(--ease-apple) 0.35s backwards;
}

.power-pill-label {
  margin-right: -0.3em; /* trailing tracking would push the text off centre */
  background: linear-gradient(100deg, #FFFFFF 0%, #A1A1AA 46%, #F4F4F5 78%, #A1A1AA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.power-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #A1A1AA);
  animation: power-dot 2.2s ease-in-out infinite;
}

.power-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 4px;
}

.intro-hover .power-pill {
  transform: translateX(-50%) scale(1.04);
  box-shadow: 0 0 52px rgba(244, 244, 245, 0.34), 0 14px 34px -10px rgba(0, 0, 0, 0.8);
}

@keyframes power-pill-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes power-dot {
  0%,
  100% {
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
    opacity: 0.6;
  }

  50% {
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
    opacity: 1;
  }
}

/* Only exists while the title blooms in; app.js restores the plain title afterwards */
.hero-word {
  display: inline-block;
}

.hero-title-chrome .hero-word {
  padding-right: 0.08em;
  margin-right: -0.08em;
  background-image: linear-gradient(180deg, #FFFFFF 12%, #D1D5DB 58%, #838894 100%);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

.hardware-sculpture {
  position: relative;
  width: clamp(280px, 32vw, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.22s var(--ease-apple);
  will-change: transform;
}

.sculpture-housing {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.10), transparent 55%),
    linear-gradient(145deg, #161820 0%, #090A0E 55%, #11131A 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 42px 96px -18px rgba(0, 0, 0, 0.92),
    0 0 60px rgba(255, 255, 255, 0.05),
    inset 0 2px 4px rgba(255, 255, 255, 0.14),
    inset 0 -8px 24px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.sculpture-groove-ring {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.012);
}

.sculpture-groove-inner {
  position: absolute;
  inset: 44px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.sculpture-glare-sweep {
  position: absolute;
  top: -30%;
  left: -90%;
  width: 60%;
  height: 160%;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.16) 50%, transparent 75%);
  transform: skewX(-20deg);
  animation: sculpture-sweep 7.5s var(--ease-apple) infinite;
  pointer-events: none;
}

@keyframes sculpture-sweep {

  0%,
  55% {
    left: -90%;
    opacity: 0;
  }

  65% {
    opacity: 1;
  }

  90% {
    left: 140%;
    opacity: 0;
  }

  100% {
    left: 140%;
    opacity: 0;
  }
}

.sculpture-logo-core {
  position: relative;
  width: 66%;
  height: 66%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #15171F 0%, #07080B 80%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(26px);
}

.sculpture-svg {
  width: 82%;
  height: 82%;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}

.manifesto-track {
  min-height: 145vh;
  position: relative;
  border-top: 1px solid var(--hairline);
}

.manifesto-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

.manifesto-stack {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.manifesto-line {
  font-size: clamp(1.75rem, 3.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.m-word {
  color: rgba(255, 255, 255, 0.16);
  transition: color 0.22s ease;
}

.m-word.is-lit {
  color: #FFFFFF;
}

.showcase-track {
  height: 360vh;
  position: relative;
  border-top: 1px solid var(--hairline);
}

.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 76px 0 30px;
}

.showcase-ambient {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1100px, 120vw);
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.85s var(--ease-apple);
}

body[data-channel="0"] .showcase-ambient {
  background: radial-gradient(ellipse at center, rgba(244, 244, 245, 0.13), rgba(161, 161, 170, 0.08) 55%, transparent 74%);
}

body[data-channel="1"] .showcase-ambient {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.15), rgba(212, 212, 216, 0.07) 55%, transparent 74%);
}

body[data-channel="2"] .showcase-ambient {
  background: radial-gradient(ellipse at center, rgba(212, 212, 216, 0.14), rgba(113, 113, 122, 0.10) 55%, transparent 74%);
}

/* Chapter markers across the track: boundaries sit where the pinned stage is 1/3 and 2/3 of the way through */
.showcase-step {
  display: none;
  position: absolute;
  left: 0;
  width: 1px;
  pointer-events: none;
}

.showcase-step[data-step="0"] {
  top: 0;
  height: 39.3%;
}

.showcase-step[data-step="1"] {
  top: 39.3%;
  height: 21.4%;
}

.showcase-step[data-step="2"] {
  top: 60.7%;
  height: 39.3%;
}

.giant-dial-wrap {
  position: absolute;
  top: calc(92px - var(--dial-w) * 0.0208);
  left: 50%;
  width: var(--dial-w);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.dial-labels {
  font-size: 10px;
}

.giant-dial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(var(--dial-angle));
  will-change: transform;
}

.dial-fixed-pointer {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 4;
  pointer-events: none;
}

.pointer-needle {
  width: 2px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
}

.showcase-stage-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.showcase-top-tabs {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 15, 20, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--hairline);
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.showcase-top-tabs::-webkit-scrollbar {
  display: none;
}

.chapter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.25s ease;
}

.chapter-pill-btn:hover {
  color: var(--text-primary);
}

.chapter-pill-btn[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pill-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.65;
}

.cinema-video-shell {
  position: relative;
  width: var(--stage-w);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #040507;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 42px 100px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: scale(var(--stage-scale));
  transition: transform 0.15s linear;
  will-change: transform;
  touch-action: pan-y;
}

.stage-video-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-apple);
}

.stage-video-layer.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cinema-hud {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(9, 10, 14, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 4;
}

.mute-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.mute-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cinema-progress-track {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.cinema-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), #FFFFFF);
}

.cinema-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.showcase-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(90vw, max(var(--stage-w), 1140px));
  flex-wrap: wrap;
}

.showcase-caption {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.showcase-caption strong {
  color: var(--text-primary);
  font-weight: 600;
}

.showcase-hotkey-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
}

.themes-section {
  position: relative;
  padding: 112px 0;
  border-top: 1px solid var(--hairline);
}

.themes-head {
  text-align: center;
  margin-bottom: 30px;
}

.themes-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-primary);
}

.theme-switcher {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.theme-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #0E1016;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.theme-group-label {
  padding: 0 8px 0 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.theme-pill {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.25s ease;
}

.theme-pill:hover {
  color: var(--text-primary);
}

.theme-pill[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.theme-stage {
  position: relative;
  max-width: min(980px, max(540px, calc((100vh - 390px) * 1.5))); /* Switcher, preview and caption fit one screen */
  margin: 0 auto;
}

/* Silver backlight behind the panel */
.theme-stage::before {
  content: "";
  position: absolute;
  inset: -8% 0;
  background: radial-gradient(closest-side, rgba(228, 228, 231, 0.20), rgba(212, 212, 216, 0.07) 55%, transparent);
  pointer-events: none;
}

.theme-open {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  background: #0E1016;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 42px 100px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: zoom-in;
  overflow: hidden;
}

.theme-open:focus-visible,
.theme-pill:focus-visible,
.theme-lightbox-close:focus-visible {
  outline: 2px solid #E4E4E7;
  outline-offset: 2px;
}

.theme-shot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: calc(100% - 40px); /* Width follows from the img size attributes, so it never collapses before loading */
  border-radius: 12px;
  opacity: 0;
  transform: scale(0.965);
  transition: opacity 0.5s var(--ease-apple), transform 0.6s var(--ease-apple);
}

.theme-shot.is-active {
  opacity: 1;
  transform: none;
}

.theme-caption {
  margin: 24px auto 0;
  max-width: 620px;
  min-height: 3.2em;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.theme-caption strong {
  color: var(--text-primary);
  font-weight: 600;
}

.theme-lightbox {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgba(7, 8, 11, 0.92);
  cursor: zoom-out;
}

.theme-lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 0.3s var(--ease-apple);
}

.theme-lightbox::backdrop {
  background: transparent;
}

.theme-lightbox img {
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 0 120px rgba(228, 228, 231, 0.10);
}

.theme-lightbox[open] img {
  animation: lightbox-shot 0.4s var(--ease-apple);
}

.theme-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-primary);
  background: #0E1016;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* The page must not scroll behind the preview, or shift when its scrollbar goes */
html:has(.theme-lightbox[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

@keyframes lightbox-in {
  from { opacity: 0; }
}

@keyframes lightbox-shot {
  from { transform: scale(0.96); }
}

.architecture-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 112px 0;
  border-top: 1px solid var(--hairline);
}

.arch-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: start;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.arch-narrative h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 22px;
  color: var(--text-primary);
}

.arch-narrative p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.68;
  margin-bottom: 16px;
  max-width: 490px;
}

.ledger-table {
  border-top: 1px solid var(--hairline);
}

.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}

.ledger-key {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ledger-val {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  letter-spacing: -0.01em;
}

.download-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 112px 0;
  border-top: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.download-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.download-emblem {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  box-shadow: 0 0 48px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.download-emblem-disc {
  position: relative;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: #0B0C10;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.download-emblem-svg {
  width: 68px;
  height: 68px;
  position: relative;
  z-index: 1;
}

.download-sweep {
  position: absolute;
  top: -20%;
  left: -135%;
  width: 85%;
  height: 140%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.62) 50%, transparent 80%);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2;
}

.download-emblem.is-flashing .download-sweep {
  animation: dl-sweep 1.1s var(--ease-apple) forwards;
}

.download-emblem.is-flashing .download-ring {
  animation: dl-ring-pulse 1.2s var(--ease-apple) forwards;
}

@keyframes dl-sweep {
  0% {
    left: -135%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    left: 165%;
    opacity: 0;
  }
}

@keyframes dl-ring-pulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }

  45% {
    transform: scale(1.09);
    box-shadow: 0 0 72px rgba(255, 255, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 48px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }
}

.download-heading {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 36px;
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--hairline);
  margin-bottom: 44px;
  text-align: left;
}

.explainer-cell {
  padding: 22px 24px;
  border-bottom: 1px solid var(--hairline);
}

.explainer-cell:nth-child(odd) {
  border-right: 1px solid var(--hairline);
}

.explainer-cell h3 {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.explainer-cell p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.download-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.smartscreen-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.smartscreen-note strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.legal-section {
  padding: 96px 0;
  border-top: 1px solid var(--hairline);
}

.legal-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 36px;
}

.legal-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.legal-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  gap: 4px;
}

.legal-tab-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease, background 0.2s ease;
}

.legal-tab-btn[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-primary);
}

.legal-panel {
  display: none;
}

.legal-panel.is-active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.legal-col h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.legal-col p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

.legal-col p + p {
  margin-top: 12px;
}

.license-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.license-list strong {
  color: var(--text-primary);
  font-weight: 500;
}

.license-list a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.32);
}

.license-list a:hover {
  text-decoration-color: #ffffff;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-apple), transform 0.8s var(--ease-apple);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 42px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-credit:hover {
  color: var(--text-primary);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-quote {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #6B7280;
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .sculpture-glare-sweep,
  .download-emblem.is-flashing .download-sweep,
  .download-emblem.is-flashing .download-ring {
    animation: none !important;
  }

  .giant-dial-svg {
    transition: none !important;
  }

  .theme-shot {
    transform: none;
    transition: none;
  }

  .theme-lightbox[open],
  .theme-lightbox[open] img {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: left;
  }

  .hero-intro-wrap {
    order: -1;
  }

  .hardware-sculpture,
  .intro-bloom,
  .intro-ring {
    width: clamp(210px, 54vw, 270px);
  }

  .manifesto-track {
    min-height: auto;
    padding: 88px 0;
  }

  .manifesto-sticky {
    position: static;
    height: auto;
    padding: 0;
  }

  .m-word {
    color: #FFFFFF;
  }

  /* Native sticky stage with a shorter track. Chapters follow the .showcase-step markers, not scroll math. */
  .showcase-track {
    height: 280vh;
    height: 280svh;
  }

  .showcase-sticky {
    height: 100vh;
    height: 100svh;
    justify-content: center;
    padding: 84px 0 24px;
  }

  .showcase-step {
    display: block;
  }

  .giant-dial-wrap {
    top: 72px;
    width: 140vw;
  }

  .dial-labels {
    font-size: 18px;
  }

  .showcase-stage-inner {
    padding: 0 20px;
  }

  .cinema-video-shell {
    width: min(100%, calc(52vh * 16 / 9));
    width: min(100%, calc(52svh * 16 / 9));
    max-height: none;
    transform: none;
    border-radius: 14px;
  }

  .showcase-caption-row {
    width: 100%;
  }

  .arch-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .explainer-grid {
    grid-template-columns: 1fr;
  }

  .explainer-cell:nth-child(odd) {
    border-right: none;
  }

  .legal-panel.is-active {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 20px;
  }

  .topbar-nav {
    display: none;
  }

  .hero-chapter {
    min-height: auto;
    padding: 96px 0 64px;
  }

  .theme-open {
    border-radius: 16px;
  }

  .theme-shot {
    height: calc(100% - 16px);
    border-radius: 10px;
  }

  .themes-section,
  .architecture-section,
  .download-section,
  .legal-section {
    min-height: auto;
    padding: 72px 0;
  }
}

@media (max-width: 420px) {
  .topbar-wrap {
    padding: 0 10px;
  }

  .topbar {
    padding: 0 6px 0 12px;
    height: 46px;
    gap: 8px;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .brand-ver {
    display: none;
  }

  .btn-topbar-download {
    height: 32px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .btn-topbar-github {
    width: 32px;
    height: 32px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .chapter-pill-btn {
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .theme-group {
    gap: 0;
  }

  .theme-group-label {
    padding: 0 4px 0 10px;
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }

  .theme-pill {
    padding: 0 9px;
    font-size: 0.74rem;
  }

  .cinema-hud {
    inset: auto 8px 8px 8px;
    padding: 4px 8px;
    gap: 8px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Phones held sideways: keep the whole stage inside the short screen */
@media (max-width: 900px) and (max-height: 520px) {
  .showcase-sticky {
    padding: 70px 0 10px;
  }

  .showcase-stage-inner {
    gap: 8px;
  }

  .cinema-video-shell {
    width: min(100%, calc(44vh * 16 / 9));
    width: min(100%, calc(44svh * 16 / 9));
  }

  .showcase-caption {
    font-size: 0.8rem;
  }

  .showcase-hotkey-tag {
    display: none;
  }
}
