/* Butler — standalone landing (Apache / static only) */
:root {
  --mx: 0.5;
  --my: 0.5;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #0c0c12 0%, #030303 45%, #050508 100%);
  color: #fafafa;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: rgba(255, 255, 255, 0.2);
}

/* —— Liquid glass atmosphere —— */
.liquid-stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.liquid-mesh {
  position: absolute;
  inset: -10%;
  opacity: 0.55;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(140, 160, 255, 0.13), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 70%, rgba(255, 255, 255, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(180, 200, 255, 0.06), transparent 45%);
  animation: liquid-mesh-shift 22s ease-in-out infinite;
}

@keyframes liquid-mesh-shift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    filter: hue-rotate(0deg);
  }
  33% {
    transform: translate(2%, -1%) scale(1.03);
    filter: hue-rotate(12deg);
  }
  66% {
    transform: translate(-1%, 2%) scale(0.98);
    filter: hue-rotate(-8deg);
  }
}

.liquid-blob {
  position: absolute;
  filter: blur(72px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: liquid-morph 20s ease-in-out infinite;
}

.liquid-blob--1 {
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  left: -15%;
  top: 15%;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.14),
    rgba(120, 140, 220, 0.18),
    rgba(255, 255, 255, 0.04)
  );
  border-radius: 58% 42% 62% 38% / 48% 55% 45% 52%;
  animation-duration: 23s;
}

.liquid-blob--2 {
  width: min(70vw, 400px);
  height: min(70vw, 400px);
  right: -10%;
  top: 40%;
  background: linear-gradient(
    210deg,
    rgba(200, 220, 255, 0.12),
    rgba(255, 255, 255, 0.08),
    rgba(100, 110, 180, 0.1)
  );
  border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
  animation-duration: 19s;
  animation-delay: -4s;
}

/* Subtle “alive” layer — pulse + opacity (blobs keep their own transform animation) */
.liquid-stage--alive .liquid-mesh {
  animation: liquid-mesh-shift 22s ease-in-out infinite, alive-mesh-glow 5s ease-in-out infinite;
}

@keyframes alive-mesh-glow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.68;
  }
}

.alive-pulse {
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 48% 42%,
    rgba(160, 190, 255, 0.09) 0%,
    transparent 48%
  );
  animation: alive-breathe 6.5s ease-in-out infinite;
}

@keyframes alive-breathe {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.62;
    transform: scale(1.035);
  }
}

.liquid-blob--3 {
  width: min(100vw, 600px);
  height: min(80vw, 480px);
  left: 20%;
  bottom: -20%;
  background: linear-gradient(
    300deg,
    rgba(255, 255, 255, 0.06),
    rgba(160, 180, 255, 0.1),
    rgba(255, 255, 255, 0.03)
  );
  border-radius: 45% 55% 48% 52% / 52% 48% 55% 45%;
  animation-duration: 26s;
  animation-delay: -9s;
}

@keyframes liquid-morph {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    border-radius: 58% 42% 62% 38% / 48% 55% 45% 52%;
  }
  25% {
    transform: translate(4%, -3%) rotate(90deg) scale(1.06);
    border-radius: 42% 58% 52% 48% / 44% 52% 48% 56%;
  }
  50% {
    transform: translate(-3%, 4%) rotate(180deg) scale(0.94);
    border-radius: 52% 48% 44% 56% / 58% 42% 54% 46%;
  }
  75% {
    transform: translate(2%, 2%) rotate(270deg) scale(1.02);
    border-radius: 48% 52% 58% 42% / 50% 48% 50% 50%;
  }
}

.glass-slab {
  position: absolute;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.03) 42%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  animation: glass-drift 28s ease-in-out infinite;
}

.glass-slab--a {
  width: min(55vw, 340px);
  height: min(45vw, 280px);
  left: 8%;
  top: 55%;
  transform: rotate(-8deg);
  opacity: 0.35;
  animation-delay: -2s;
}

@keyframes glass-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(-8deg);
  }
  50% {
    transform: translate(4vw, -6vh) rotate(-4deg);
  }
}

.glass-slab--b {
  width: min(48vw, 300px);
  height: min(38vw, 220px);
  right: 5%;
  top: 18%;
  opacity: 0.28;
  animation: glass-drift-b 32s ease-in-out infinite;
  animation-delay: -12s;
}

@keyframes glass-drift-b {
  0%,
  100% {
    transform: translate(0, 0) rotate(12deg);
  }
  50% {
    transform: translate(-5vw, 8vh) rotate(8deg);
  }
}

.glass-orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.04) 45%,
    rgba(120, 130, 200, 0.08) 100%
  );
  box-shadow:
    inset 0 0 40px rgba(255, 255, 255, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  animation: glass-orb-float 18s ease-in-out infinite;
}

.glass-orb--sm {
  width: min(28vw, 160px);
  height: min(28vw, 160px);
  right: 18%;
  bottom: 28%;
  opacity: 0.4;
  animation-delay: -5s;
}

.glass-orb--lg {
  width: min(42vw, 240px);
  height: min(42vw, 240px);
  left: 12%;
  top: 22%;
  opacity: 0.22;
  animation-duration: 24s;
  animation-delay: -8s;
}

@keyframes glass-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(3vw, -4vh) scale(1.05);
  }
}

.landing-scanline {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.4;
  background: linear-gradient(
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  animation: landing-scan 14s linear infinite;
}

@keyframes landing-scan {
  to {
    background-position: 0 200px;
  }
}

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  transform: translate(
    calc((var(--mx) - 0.5) * 40px),
    calc((var(--my) - 0.5) * 30px)
  );
}

.bg-blob--a {
  left: -25%;
  top: 0;
  width: 80vw;
  height: 80vh;
  background: radial-gradient(
    ellipse,
    rgba(80, 90, 140, 0.35) 0%,
    transparent 70%
  );
}

.bg-blob--b {
  right: -25%;
  bottom: 0;
  width: 70vw;
  height: 70vh;
  opacity: 0.25;
  filter: blur(100px);
  background: radial-gradient(
    ellipse,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 65%
  );
  transform: translate(
    calc((var(--mx) - 0.5) * -30px),
    calc((var(--my) - 0.5) * -20px)
  );
}

.glass-header {
  border-radius: 1.25rem;
  margin: 0.75rem auto 0;
  width: calc(100% - 2rem);
  max-width: 42rem;
  padding: 1rem 1.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 14, 0.55);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
  .glass-header {
    margin-top: 1rem;
    width: min(calc(100% - 3rem), 40rem);
    padding: 1.1rem 1.85rem !important;
  }
}

.glass-header--minimal .header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .glass-header--minimal .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
  }
}

.header-divider {
  display: none;
  width: 1px;
  height: 0.75rem;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

@media (min-width: 520px) {
  .header-divider {
    display: block;
  }
}

.header-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #52525b;
}

.site-header {
  position: relative;
  z-index: 20;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem 0.5rem;
}

@media (min-width: 640px) {
  .site-header {
    padding: 1.5rem 2.5rem 0.5rem;
  }
}

.brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .nav-actions {
    gap: 1rem;
  }
}

.nav-actions a {
  font-size: 13px;
  text-decoration: none;
  color: #a1a1aa;
  transition: color 0.2s;
}

.nav-actions a:hover {
  color: #fff;
}

.btn-primary {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: #fff;
  color: #09090b;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #e4e4e7;
}

main {
  position: relative;
  z-index: 20;
}

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .section {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.hero {
  min-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 3rem;
  padding-top: 1rem;
}

@media (min-width: 640px) {
  .hero {
    padding-bottom: 3.5rem;
  }
}

.kicker {
  margin-bottom: 1rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #6e6e73;
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.98);
  animation: hero-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.hero-title {
  margin: 0;
  max-width: 56rem;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-title-line {
  display: block;
  font-size: clamp(2.75rem, 12vw, 7.5rem);
  color: #f4f4f5;
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.98);
  animation: hero-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title-line:nth-of-type(1) {
  animation-delay: 0.45s;
}

.hero-title-line--shimmer {
  animation-delay: 0.75s;
  background: linear-gradient(
    105deg,
    #fafafa 0%,
    #fafafa 40%,
    rgba(255, 255, 255, 0.5) 50%,
    #fafafa 60%,
    #fafafa 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    hero-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards,
    shimmer-move 8s ease-in-out infinite;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes shimmer-move {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0% 0;
  }
}

.hero-sub {
  margin-top: 1.35rem;
  max-width: 12rem;
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: #86868b;
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.98);
  animation: hero-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.95s forwards;
}

.block {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.25rem, 6vh, 3.25rem) 0;
}

.block--ad {
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0) scale(0.94);
  filter: blur(6px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.62s cubic-bezier(0.34, 1.2, 0.64, 1),
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  will-change: auto;
}

.reveal-delay-1 {
  transition-delay: 0.05s;
}

.reveal-delay-2 {
  transition-delay: 0.12s;
}

.reveal-delay-3 {
  transition-delay: 0.2s;
}

.reveal-delay-4 {
  transition-delay: 0.28s;
}

.line-big {
  margin: 0;
  font-size: clamp(1.65rem, 5.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #f5f5f7;
}

/* Second headline line in same beat (product-film rhythm) */
.line-big--tight {
  margin-top: 0.06rem;
}

.line-big--muted {
  margin-top: 0.45rem;
  max-width: 18rem;
  font-size: clamp(0.6875rem, 1.65vw, 0.8125rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6e6e73;
}

.line-big--muted strong {
  font-weight: 500;
  color: #86868b;
}

.line-big--muted em {
  font-style: normal;
  color: #86868b;
}

.orb-section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vh, 3rem) 0;
}

.orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.orb {
  position: relative;
  width: min(58vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.22),
      transparent 55%
    ),
    radial-gradient(
      circle at 70% 60%,
      rgba(120, 140, 255, 0.15),
      transparent 50%
    ),
    conic-gradient(
      from 180deg at 50% 50%,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02),
      rgba(200, 210, 255, 0.08),
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.06)
    );
  filter: blur(0.5px);
  box-shadow:
    0 0 120px rgba(255, 255, 255, 0.06),
    inset 0 0 80px rgba(255, 255, 255, 0.04);
  animation: orb-breathe 10s ease-in-out infinite;
}

.orb--glass {
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background:
    radial-gradient(
      circle at 28% 26%,
      rgba(255, 255, 255, 0.35),
      transparent 42%
    ),
    radial-gradient(
      circle at 72% 64%,
      rgba(160, 175, 255, 0.2),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(100, 110, 180, 0.08) 100%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 40px rgba(255, 255, 255, 0.12),
    0 0 100px rgba(140, 160, 255, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.45);
  filter: none;
}

@keyframes orb-breathe {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.04) rotate(4deg);
    opacity: 1;
  }
}

.orb-caption {
  margin-top: 1.35rem;
  max-width: 14rem;
  text-align: center;
  font-size: clamp(0.6875rem, 1.65vw, 0.8125rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6e6e73;
}

.wait-section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 7vh, 4rem) 0;
}

.wait-line {
  margin: 0;
  font-size: clamp(1.85rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.05;
  color: #f5f5f7;
}

.wait-line--dim {
  margin-top: 0.15rem;
  font-size: clamp(1.85rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.05;
  color: #424245;
}

.footer-epilogue {
  padding: 2.5rem 1.5rem 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.epilogue-inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.epilogue-mark {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #fafafa;
}

.epilogue-line {
  margin: 0 0 0.85rem;
  font-size: clamp(0.8125rem, 1.9vw, 0.9375rem);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6e6e73;
}

.epilogue-dot {
  margin: 0 0.35rem;
  color: #3f3f46;
}

.epilogue-quiet {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #48484a;
}

/* Legacy utility classes (admin / future) */
.btn-wide {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.btn-wide--solid {
  background: #fff;
  color: #09090b;
  border: none;
}

.btn-wide--outline {
  background: transparent;
  color: #d4d4d8;
  border: 1px solid #3f3f46;
}

.block-kicker {
  margin: 0 0 0.5rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6e6e73;
}

.pulse-section {
  padding: 2.25rem 1.5rem 2.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pulse-section .pulse-shell {
  margin-left: auto;
  margin-right: auto;
}

.pulse-shell {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.65rem 1.5rem 1.85rem;
  border-radius: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.025) 50%,
    rgba(80, 90, 120, 0.07) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.pulse-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.4rem, 3.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  color: #f5f5f7;
}

.pulse-lead {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: #a1a1aa;
}

.pulse-stat {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.pulse-stat-num {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fafafa;
}

.pulse-stat-label {
  font-size: 0.9375rem;
  color: #86868b;
  max-width: 13rem;
  line-height: 1.35;
}

.btn-interest {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.95rem 1.35rem;
  border: none;
  border-radius: 9999px;
  background: #fff;
  color: #09090b;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-interest:hover:not(:disabled) {
  background: #e4e4e7;
}

.btn-interest:disabled {
  opacity: 0.65;
  cursor: default;
}

.pulse-micro {
  margin: 0 0 1.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #636366;
}

.pulse-divider {
  height: 1px;
  margin: 0 0 1.5rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

.pulse-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86868b;
}

.pulse-label__hint {
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #a1a1aa;
}

.pulse-feedback-note {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #a1a1aa;
}

.pulse-textarea,
.pulse-input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fafafa;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
}

.pulse-textarea:focus,
.pulse-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-feedback {
  width: 100%;
  padding: 0.9rem 1.3rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.btn-feedback:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-feedback:disabled {
  opacity: 0.5;
  cursor: default;
}

.pulse-status {
  margin: 1rem 0 0;
  min-height: 1.25rem;
  font-size: 0.9375rem;
  color: #86efac;
}

.pulse-link {
  color: #7dd3fc;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 252, 0.35);
}

.pulse-link:hover {
  color: #bae6fd;
}

.pulse-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}

/* —— Apple-style product layout (inspired by apple.com product pages) —— */
.liquid-stage--subtle .liquid-mesh {
  opacity: 0.35;
}

.liquid-stage--subtle .liquid-blob {
  opacity: 0.28;
}

.apple-nav {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1068px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.apple-nav__brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #f5f5f7;
}

.apple-nav__meta {
  font-size: 13px;
  color: #86868b;
  letter-spacing: -0.01em;
}

.apple-nav__end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
}

.theme-switch {
  display: inline-flex;
  position: relative;
  isolation: isolate;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1px;
}

.theme-switch::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  animation: theme-switch-glow 2.35s ease-in-out infinite;
}

@keyframes theme-switch-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(130, 200, 255, 0.45),
      0 0 18px rgba(120, 185, 255, 0.35);
    opacity: 0.88;
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(130, 200, 255, 0.2),
      0 0 32px rgba(110, 175, 255, 0.55);
    opacity: 1;
  }
}

.theme-switch__btn {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #a1a1aa;
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.theme-switch__btn:hover {
  color: #e4e4e7;
}

.theme-switch__btn[aria-pressed="true"] {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.apple-hero {
  position: relative;
  z-index: 20;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 4.75rem) 1.5rem clamp(2rem, 6vw, 5.25rem);
  text-align: center;
}

/* Hero: readable reveal without blur (avoids jitter on mobile / composite layers) */
.apple-hero .reveal {
  filter: none;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.apple-hero .reveal.is-visible {
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.apple-hero__eyebrow {
  margin: 0 0 1.1rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6e6e73;
}

.apple-hero__title {
  margin: 0 0 1.75rem;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.apple-hero__line {
  display: block;
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  color: #f5f5f7;
}

.apple-hero__line--grad {
  background: linear-gradient(
    105deg,
    #f5f5f7 0%,
    #f5f5f7 42%,
    rgba(200, 210, 255, 0.92) 50%,
    #f5f5f7 58%,
    #f5f5f7 100%
  );
  background-size: 100% 100%;
  background-position: 50% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .apple-hero__line--grad {
    background-size: 160% 100%;
    animation: apple-grad-shift 18s ease-in-out infinite;
  }
}

@keyframes apple-grad-shift {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0% 0;
  }
}

.apple-hero__hook {
  margin: 0 auto;
  max-width: 34rem;
  text-align: left;
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.52;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #a1a1aa;
}

.apple-hero__hook strong {
  font-weight: 600;
  color: #d4d4d8;
}

@media (min-width: 640px) {
  .apple-hero__hook {
    text-align: center;
  }
}

.apple-scrolly {
  /* Scale phone from viewport height; mobile override below for small phones */
  --phone-zoom: min(
    1.62,
    max(0.78, calc((min(100dvh, 100vh) - 8.5rem) / 520))
  );
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 540px);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 4rem;
}

/* DOM order: copy then device — lock columns so desktop layout never inverts */
.apple-scrolly__copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.apple-scrolly__device-wrap {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: max(5.5rem, 10vh);
  justify-self: end;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  max-width: min(520px, 100%);
  min-height: 0;
  z-index: 0;
  /* Room for filter drop-shadow so it isn’t clipped at the column edge */
  padding-inline: clamp(0.5rem, 2vw, 1.25rem);
  margin-inline: clamp(0, 1vw, 0.5rem);
  overflow: visible;
}

.apple-scrolly__device-hint {
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(161, 161, 170, 0.42);
}

@media (min-width: 901px) {
  .apple-scrolly__device-wrap {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    max-width: min(580px, 100%);
  }

  .apple-scrolly__device-hint {
    flex: 0 0 5.5rem;
    text-align: right;
    line-height: 1.45;
    letter-spacing: 0.09em;
    color: rgba(161, 161, 170, 0.36);
  }
}

.apple-scrolly__device {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

/* Scaled phone (~1.6×) so tab bar stays easier to reach while scrolling — no outer glow/box */
.apple-scrolly .device-shell {
  width: 280px;
  max-width: min(280px, calc((100vw - 4rem) / var(--phone-zoom)));
  zoom: var(--phone-zoom);
  filter: none;
  box-shadow: none;
}

.apple-scrolly .device-shell.is-tilt {
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg) translateY(-4px);
}

@supports not (zoom: 1) {
  .apple-scrolly .device-shell {
    zoom: normal;
    transform: scale(var(--phone-zoom));
    transform-origin: top center;
  }

  .apple-scrolly .device-shell.is-tilt {
    transform: perspective(900px) rotateY(-4deg) rotateX(2deg) translateY(-4px)
      scale(var(--phone-zoom));
  }

  .apple-scrolly__device {
    padding-bottom: min(500px, 100%);
  }
}

/* Flat chassis for the scrolly mockup (no outer “card” rim) */
.apple-scrolly .device-bezel {
  border: none;
  box-shadow: none;
}

.story-panel {
  min-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vh, 3.5rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.story-panel:first-child {
  border-top: none;
  padding-top: 0;
}

/* Softer scroll reveal for long story copy (stays readable vs. background ring) */
.story-panel.reveal {
  filter: blur(4px);
  transform: translate3d(0, 18px, 0) scale(0.97);
}

.story-panel.reveal.is-visible {
  filter: blur(0);
}

main {
  position: relative;
  z-index: 10;
}

.story-panel__eyebrow {
  margin: 0 0 0.55rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6e6e73;
}

.story-panel__headline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 3.9vw, 2.4rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.038em;
  color: #f5f5f7;
}

.story-panel__body {
  margin: 0;
  max-width: 30em;
  font-size: clamp(15px, 1.85vw, 17px);
  line-height: 1.55;
  color: #a1a1aa;
}

.device-shell {
  filter:
    drop-shadow(0 8px 20px rgba(0, 0, 0, 0.22))
    drop-shadow(0 28px 56px rgba(0, 0, 0, 0.18))
    drop-shadow(0 0 0 1px rgba(0, 0, 0, 0.12));
  transition: transform 0.65s cubic-bezier(0.34, 1.15, 0.64, 1);
}

.device-shell.is-tilt {
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg) translateY(-4px);
}

/* White chassis on dark page theme; gunmetal restored under html[data-theme="light"] */
.device-bezel {
  position: relative;
  isolation: isolate;
  border-radius: 44px;
  padding: 10px;
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.55) 18%,
      transparent 40%
    ),
    linear-gradient(
      148deg,
      #fafafa 0%,
      #f0f0f3 22%,
      #e6e6ea 48%,
      #dcdce2 72%,
      #d0d0d8 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.98),
    inset 0 -2px 5px rgba(0, 0, 0, 0.07),
    inset 2px 0 2px rgba(255, 255, 255, 0.55),
    inset -1px 0 1px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.1);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.device-bezel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  z-index: 0;
  transition: box-shadow 0.35s ease;
}

.device-notch {
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 20;
  width: 104px;
  height: 30px;
  margin-left: -52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1e1e22 0%, #121214 42%, #080809 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -2px 3px rgba(0, 0, 0, 0.65),
    0 6px 16px rgba(0, 0, 0, 0.45);
}

.device-notch::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 30%,
    #3a3a42 0%,
    #1a1a1e 55%,
    #0a0a0d 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -1px 2px rgba(0, 0, 0, 0.6);
}

.device-notch::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #2a2a2e, #101012);
  opacity: 0.85;
}

.device-screen {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 34px;
  background: #000;
  aspect-ratio: 9 / 19.5;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -24px 48px rgba(0, 0, 0, 0.35);
}

.device-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 8;
  background: linear-gradient(
    128deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.015) 30%,
    transparent 46%,
    transparent 64%,
    rgba(255, 255, 255, 0.025) 100%
  );
  opacity: 0.9;
}

.device-screen::after {
  content: "";
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 28;
}

.device-screen__inner {
  position: absolute;
  inset: 0;
}

.ui-screen {
  position: absolute;
  inset: 0;
  padding: 48px 14px 44px;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.55s cubic-bezier(0.34, 1.1, 0.64, 1);
  pointer-events: none;
}

.ui-screen.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  pointer-events: auto;
}

.ui-status {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  padding: 0 18px 0 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.ui-home {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
}

.ui-home__logo {
  margin: 0 0 0.65rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #86868b;
}

.ui-home__sub {
  margin: 0 0 1.5rem;
  max-width: 11rem;
  text-align: center;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: #636366;
}

.ui-home__hint {
  margin-top: 0.5rem;
  width: 72%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

.ui-tab-dock {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding: 6px 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 22, 24, 0.94);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  pointer-events: auto;
}

.ui-tab-dock__btn {
  flex: 1;
  margin: 0;
  padding: 6px 4px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #636366;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
}

.ui-tab-dock__btn:hover {
  color: #a1a1aa;
}

.ui-tab-dock__btn.is-active {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.08);
}

.ui-chatbar {
  margin-bottom: 12px;
  padding-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
  color: #f5f5f7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ui-bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.35;
}

.ui-bubble--user {
  align-self: flex-end;
  background: #f5f5f7;
  color: #1d1d1f;
}

.ui-bubble--bot {
  align-self: flex-start;
  background: #2c2c2e;
  color: #d1d1d6;
}

.ui-card {
  margin-top: 0.5rem;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.ui-card--confirm .ui-card__label {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6ee7b7;
}

.ui-card__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f7;
}

.ui-card__meta {
  margin: 0 0 12px;
  font-size: 11px;
  color: #a1a1aa;
}

.ui-card__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ui-btn {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
}

.ui-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #a1a1aa;
}

.ui-btn--go {
  background: #34d399;
  color: #052e16;
}

.ui-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ui-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
}

.ui-row__t {
  font-weight: 500;
  color: #f5f5f7;
}

.ui-row__d {
  color: #86868b;
  font-size: 10px;
}

.ui-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ui-setrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: #d1d1d6;
}

.ui-pill {
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

.ui-host {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 1rem;
}

.ui-host__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b3b3d, #1c1c1e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ui-host__t {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f7;
}

.ui-host__s {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6e6e73;
}

/* Pulsing ring on page background — larger; only while #story is in view (see script.js) */
.alive-ring-bg {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(118vmin, 960px);
  height: min(118vmin, 960px);
  margin-left: calc(min(118vmin, 960px) / -2);
  margin-top: calc(min(118vmin, 960px) / -2);
  border-radius: 50%;
  border: 1px solid rgba(140, 180, 255, 0.1);
  box-shadow: 0 0 0 0 rgba(120, 200, 255, 0.08);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
  animation: alive-ring-bg-pulse 2.8s ease-out infinite;
  animation-play-state: paused;
}

.liquid-stage--show-ring .alive-ring-bg {
  opacity: 0.38;
  visibility: visible;
  animation-play-state: running;
}

@keyframes alive-ring-bg-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(120, 200, 255, 0.12);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 28px rgba(120, 200, 255, 0);
    transform: scale(1.008);
  }
}

@media (max-width: 900px) {
  .alive-ring-bg {
    top: 36%;
    width: min(125vmin, 720px);
    height: min(125vmin, 720px);
    margin-left: calc(min(125vmin, 720px) / -2);
    margin-top: calc(min(125vmin, 720px) / -2);
  }
}

/* Apple Calendar–style segmented control + day list */
.ui-cal-segments {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6e6e73;
}

.ui-cal-seg {
  flex: 1;
  text-align: center;
  padding: 5px 2px;
  border-radius: 6px;
}

.ui-cal-seg--on {
  background: #3a3a3c;
  color: #f5f5f7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ui-cal-today {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.ui-cal-hours {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ui-cal-slot {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  align-items: stretch;
  font-size: 9px;
}

.ui-cal-time {
  color: #6e6e73;
  padding-top: 2px;
}

.ui-cal-bar {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d1d6;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.ui-cal-bar--accent {
  border-left-color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

.ui-rem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ui-rem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
}

.ui-rem__icon {
  font-size: 16px;
  line-height: 1;
}

.ui-rem__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ui-rem__t {
  font-weight: 600;
  color: #f5f5f7;
}

.ui-rem__s {
  font-size: 9px;
  color: #86868b;
}

.ui-rem-foot {
  margin: 10px 0 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #48484a;
}

.ui-integ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ui-integ-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  color: #d1d1d6;
}

.ui-integ-row .ui-pill {
  margin-left: auto;
}

.ui-integ-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ui-integ-dot--a {
  background: linear-gradient(180deg, #ff3b30 0%, #ff3b30 32%, #ffffff 32%, #e8e8ed 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.ui-integ-dot--g {
  background: linear-gradient(145deg, #4285f4, #ea4335, #fbbc04, #34a853);
}

.ui-integ-dot--z {
  background: #e4252a;
}

.ui-integ-dot--o {
  background: #0078d4;
}

.apple-closer {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: clamp(3rem, 12vw, 5rem) 1.5rem;
}

.apple-closer__line {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #f5f5f7;
}

.apple-closer__line--dim {
  color: #3a3a3c;
}

@media (max-width: 900px) {
  /*
   * Story text + sticky phone side by side (like desktop) so the UI updates stay
   * visible next to the copy while you scroll.
   */
  .apple-scrolly {
    grid-template-columns: minmax(0, 1fr) minmax(108px, min(42vw, 210px));
    grid-template-rows: auto;
    column-gap: 0.75rem;
    row-gap: 0;
    overflow: visible;
    align-items: start;
    padding-left: max(0.65rem, env(safe-area-inset-left));
    padding-right: max(0.65rem, env(safe-area-inset-right));
    --phone-w: min(200px, calc(42vw - 10px));
    --phone-stack-h: calc(var(--phone-w) * 19.5 / 9 + 3.25rem);
  }

  .apple-scrolly__copy {
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    padding-top: 0;
    padding-right: 0;
    min-width: 0;
  }

  .apple-scrolly__device-wrap {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: max(3.75rem, 7vh);
    justify-self: end;
    align-self: start;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin-bottom: 0;
    padding-inline: 0;
    margin-inline: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .apple-scrolly__device {
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: min(var(--phone-w), 100%);
    min-height: var(--phone-stack-h);
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
  }

  .apple-scrolly .device-shell {
    width: var(--phone-w);
    max-width: 100%;
    flex-shrink: 0;
    zoom: normal;
    transform: none;
    filter: none;
    box-shadow: none;
  }

  .apple-scrolly .device-shell.is-tilt {
    transform: none;
  }

  .apple-scrolly .device-screen {
    min-height: calc((var(--phone-w) - 24px) * 19.5 / 9);
    width: 100%;
    box-sizing: border-box;
  }

  .apple-scrolly__device-hint {
    font-size: 6px;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-align: center;
    color: rgba(110, 110, 115, 0.55);
    flex-shrink: 0;
    max-width: 100%;
  }

  .apple-scrolly .story-panel {
    min-height: auto;
    padding: 1.35rem 0;
  }

  .apple-scrolly .story-panel__headline {
    font-size: clamp(1.3rem, 4vw, 1.65rem);
  }

  .apple-scrolly .story-panel__body {
    font-size: 0.875rem;
    line-height: 1.5;
  }
}

/* —— Light theme (toggle in header) —— */
html[data-theme="light"] body {
  background: radial-gradient(
    ellipse 120% 85% at 50% -18%,
    #e8ecff 0%,
    #f5f5f7 45%,
    #e8e8ed 100%
  );
  color: #1d1d1f;
}

html[data-theme="light"] .film-grain {
  opacity: 0.02;
  mix-blend-mode: multiply;
}

html[data-theme="light"] ::selection {
  background: rgba(0, 80, 180, 0.18);
}

html[data-theme="light"] .liquid-mesh {
  opacity: 0.26;
}

html[data-theme="light"] .liquid-blob {
  opacity: 0.14;
}

html[data-theme="light"] .liquid-stage--subtle .liquid-mesh {
  opacity: 0.2;
}

html[data-theme="light"] .liquid-stage--subtle .liquid-blob {
  opacity: 0.12;
}

html[data-theme="light"] .alive-pulse {
  opacity: 0.22;
}

html[data-theme="light"] .liquid-stage--alive .liquid-mesh {
  opacity: 0.38;
}

html[data-theme="light"] .apple-nav {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .apple-nav__brand {
  color: #1d1d1f;
}

html[data-theme="light"] .apple-nav__meta {
  color: #6e6e73;
}

html[data-theme="light"] .theme-switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .theme-switch::before {
  animation-name: theme-switch-glow-light;
}

@keyframes theme-switch-glow-light {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(0, 95, 200, 0.35),
      0 0 16px rgba(0, 85, 190, 0.3);
    opacity: 0.9;
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(0, 95, 200, 0.14),
      0 0 30px rgba(0, 75, 180, 0.45);
    opacity: 1;
  }
}

html[data-theme="light"] .theme-switch__btn {
  color: #6e6e73;
}

html[data-theme="light"] .theme-switch__btn:hover {
  color: #3a3a3c;
}

html[data-theme="light"] .theme-switch__btn[aria-pressed="true"] {
  color: #1d1d1f;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .apple-hero__eyebrow {
  color: #6e6e73;
}

html[data-theme="light"] .apple-hero__line {
  color: #1d1d1f;
}

html[data-theme="light"] .apple-hero__line--grad {
  background: linear-gradient(
    105deg,
    #1d1d1f 0%,
    #1d1d1f 34%,
    #3d4db8 50%,
    #1d1d1f 66%,
    #1d1d1f 100%
  );
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .apple-hero__hook {
  color: #424245;
}

html[data-theme="light"] .apple-hero__hook {
  color: #6e6e73;
}

html[data-theme="light"] .apple-hero__hook strong {
  color: #3a3a3c;
}

html[data-theme="light"] .story-panel {
  border-top-color: rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .story-panel__eyebrow {
  color: #6e6e73;
}

html[data-theme="light"] .story-panel__headline {
  color: #1d1d1f;
}

html[data-theme="light"] .story-panel__body {
  color: #424245;
}

html[data-theme="light"] .apple-scrolly__device-hint {
  color: rgba(80, 80, 90, 0.45);
}

@media (min-width: 901px) {
  html[data-theme="light"] .apple-scrolly__device-hint {
    color: rgba(80, 80, 90, 0.38);
  }
}

html[data-theme="light"] .apple-closer__line {
  color: #1d1d1f;
}

html[data-theme="light"] .apple-closer__line--dim {
  color: #a1a1a6;
}

html[data-theme="light"] .pulse-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .pulse-shell {
  border-color: rgba(0, 0, 0, 0.1);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(248, 248, 250, 0.96) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 18px 48px rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .pulse-title {
  color: #1d1d1f;
}

html[data-theme="light"] .pulse-lead {
  color: #6e6e73;
}

html[data-theme="light"] .pulse-stat-num {
  color: #1d1d1f;
}

html[data-theme="light"] .pulse-stat-label {
  color: #6e6e73;
}

html[data-theme="light"] .btn-interest {
  background: #1d1d1f;
  color: #f5f5f7;
}

html[data-theme="light"] .btn-interest:hover:not(:disabled) {
  background: #3a3a3c;
}

html[data-theme="light"] .pulse-micro {
  color: #86868b;
}

html[data-theme="light"] .pulse-divider {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
}

html[data-theme="light"] .pulse-label {
  color: #6e6e73;
}

html[data-theme="light"] .pulse-label__hint {
  color: #86868b;
}

html[data-theme="light"] .pulse-feedback-note {
  color: #6e6e73;
}

html[data-theme="light"] .pulse-textarea,
html[data-theme="light"] .pulse-input {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #1d1d1f;
}

html[data-theme="light"] .pulse-textarea::placeholder,
html[data-theme="light"] .pulse-input::placeholder {
  color: #a1a1a6;
}

html[data-theme="light"] .pulse-textarea:focus,
html[data-theme="light"] .pulse-input:focus {
  border-color: rgba(0, 100, 200, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 100, 200, 0.12);
}

html[data-theme="light"] .btn-feedback {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.04);
  color: #1d1d1f;
}

html[data-theme="light"] .btn-feedback:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .pulse-status {
  color: #15803d;
}

html[data-theme="light"] .pulse-link {
  color: #0369a1;
  border-bottom-color: rgba(3, 105, 161, 0.35);
}

html[data-theme="light"] .pulse-link:hover {
  color: #075985;
}

html[data-theme="light"] .pulse-code {
  background: rgba(0, 0, 0, 0.06);
  color: #3a3a3c;
}

html[data-theme="light"] .footer-epilogue {
  border-top-color: rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .epilogue-mark {
  color: #1d1d1f;
}

html[data-theme="light"] .epilogue-line {
  color: #6e6e73;
}

html[data-theme="light"] .epilogue-dot {
  color: #a1a1a6;
}

html[data-theme="light"] .epilogue-quiet {
  color: #86868b;
}

html[data-theme="light"] .alive-ring-bg {
  border-color: rgba(80, 120, 200, 0.14);
}

html[data-theme="light"] .liquid-stage--show-ring .alive-ring-bg {
  opacity: 0.22;
}

html[data-theme="light"] .device-shell {
  filter:
    drop-shadow(0 6px 18px rgba(0, 0, 0, 0.14))
    drop-shadow(0 22px 48px rgba(0, 0, 0, 0.12))
    drop-shadow(0 0 0 1px rgba(0, 0, 0, 0.06));
}

html[data-theme="light"] .apple-scrolly .device-shell {
  filter: none;
  box-shadow: none;
}

html[data-theme="light"] .device-bezel {
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.09) 0%, transparent 38%),
    linear-gradient(
      148deg,
      #3d3d40 0%,
      #2a2a2d 14%,
      #1c1c1f 38%,
      #121214 65%,
      #0a0a0c 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -3px 6px rgba(0, 0, 0, 0.5),
    inset 2px 0 1px rgba(255, 255, 255, 0.05),
    inset -1px 0 0 rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .device-bezel::before {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .apple-scrolly .device-bezel {
  border: none;
  box-shadow: none;
}

html[data-theme="light"] .apple-scrolly .device-bezel::before {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .landing-scanline,
  .orb,
  .orb--glass,
  .hero-title-line--shimmer,
  .liquid-mesh,
  .liquid-blob,
  .liquid-stage--alive .liquid-mesh,
  .alive-pulse,
  .alive-ring-bg,
  .glass-slab,
  .glass-orb,
  .theme-switch::before {
    animation: none !important;
  }

  .theme-switch::before {
    box-shadow:
      0 0 14px rgba(130, 200, 255, 0.4),
      0 0 26px rgba(120, 185, 255, 0.22);
    opacity: 1;
  }

  html[data-theme="light"] .theme-switch::before {
    box-shadow:
      0 0 14px rgba(0, 90, 190, 0.35),
      0 0 24px rgba(0, 80, 175, 0.2);
  }

  .liquid-stage--alive .liquid-mesh {
    opacity: 0.55 !important;
  }

  .alive-pulse {
    opacity: 0.4 !important;
    transform: none !important;
  }

  .alive-ring-bg {
    opacity: 0.35 !important;
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
  }

  .liquid-stage--show-ring .alive-ring-bg {
    opacity: 0.22 !important;
  }

  .kicker,
  .hero-title-line,
  .hero-sub {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-title-line--shimmer {
    color: #fafafa;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .apple-hero__line--grad {
    animation: none !important;
    color: #f5f5f7 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
  }

  .ui-screen {
    transition: none !important;
    transform: none !important;
  }

  .device-shell {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
