:root,
html[data-theme="light"] {
  --ink: #1a1a2e;
  --ink-soft: #2d2d44;
  --edge: #1a1a2e;
  --paper: #fff6eb;
  --foam: #fffdf9;
  --coral: #ff5a5f;
  --coral-deep: #e8453c;
  --sky: #3d9cf0;
  --sky-deep: #2b7fd4;
  --sun: #ffc93c;
  --mint: #3ecf8e;
  --grape: #7b5cff;
  --line: rgba(26, 26, 46, 0.12);
  --muted: rgba(26, 26, 46, 0.72);
  --quiet: rgba(26, 26, 46, 0.5);
  --radius: 16px;
  --font-brand: "Lilita One", system-ui, sans-serif;
  --font-display: "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1120px;
  --brand-outline: #ff5a5f;
  --nav-bg: color-mix(in srgb, var(--foam) 72%, transparent);
  --chip-bg: #fff;
  --meta-pill: #eef5ff;
  --bar-empty: #eee;
  --panel-text: #fff;
  --panel-muted: rgba(255, 255, 255, 0.9);
  --atmos:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 90, 95, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(61, 156, 240, 0.4), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 90%, rgba(255, 201, 60, 0.45), transparent 55%),
    radial-gradient(ellipse 40% 35% at 5% 80%, rgba(62, 207, 142, 0.3), transparent 50%),
    linear-gradient(160deg, #fff8f0 0%, #ffe8d6 35%, #e8f4ff 70%, #fff3c4 100%);
  --reason-coral: linear-gradient(180deg, #ffe3e4 0%, var(--foam) 42%);
  --reason-sky: linear-gradient(180deg, #dcefff 0%, var(--foam) 42%);
  --reason-sun: linear-gradient(180deg, #fff3c2 0%, var(--foam) 42%);
  --chip-1: #ffe0e2;
  --chip-2: #d9efff;
  --chip-3: #fff0b8;
  --chip-4: #d8f8e8;
  --stage: linear-gradient(135deg, rgba(255, 90, 95, 0.2), rgba(61, 156, 240, 0.25) 50%, rgba(255, 201, 60, 0.3));
  --waitlist-bg: linear-gradient(135deg, var(--coral) 0%, #ff7a5c 40%, var(--grape) 100%);
  --backdrop: rgba(26, 26, 46, 0.4);
  --stripe: rgba(26, 26, 46, 0.05);
  --shine: rgba(255, 255, 255, 0.5);
}

html[data-theme="dark"] {
  /* Text stays light; borders/shadows stay dark so nothing looks “inverted.” */
  --ink: #efeafc;
  --ink-soft: #d5ceef;
  --edge: #07060d;
  --paper: #16141f;
  --foam: #221f33;
  --coral: #ff6b70;
  --sky: #5eb0ff;
  --sun: #ffd56a;
  --mint: #4fe0a0;
  --grape: #9b82ff;
  --line: rgba(7, 6, 13, 0.55);
  --muted: rgba(239, 234, 252, 0.72);
  --quiet: rgba(239, 234, 252, 0.52);
  --brand-outline: #ff5a5f;
  --nav-bg: color-mix(in srgb, #1c1930 88%, transparent);
  --chip-bg: #2c2840;
  --meta-pill: #322e48;
  --bar-empty: #2c2840;
  --panel-text: #fff;
  --panel-muted: rgba(255, 255, 255, 0.9);
  --atmos:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255, 90, 95, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(94, 176, 255, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 90%, rgba(255, 213, 106, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 35% at 5% 80%, rgba(79, 224, 160, 0.14), transparent 50%),
    linear-gradient(160deg, #181526 0%, #1a1730 45%, #16141f 100%);
  --reason-coral: linear-gradient(180deg, #3a2a36 0%, var(--foam) 55%);
  --reason-sky: linear-gradient(180deg, #2a3348 0%, var(--foam) 55%);
  --reason-sun: linear-gradient(180deg, #3a3428 0%, var(--foam) 55%);
  --chip-1: #3a2a34;
  --chip-2: #2a3448;
  --chip-3: #3a3628;
  --chip-4: #2a3834;
  --stage: linear-gradient(135deg, rgba(255, 107, 112, 0.22), rgba(94, 176, 255, 0.18) 50%, rgba(255, 213, 106, 0.16));
  --waitlist-bg: linear-gradient(135deg, #d94d52 0%, #8b5cf0 55%, #4f7cff 100%);
  --backdrop: rgba(7, 6, 13, 0.65);
  --stripe: rgba(255, 255, 255, 0.04);
  --shine: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

/* Brand: Lilita One, white fill, colored outline */
.wordmark,
.brand-mark,
.card-brand,
.waitlist-brand,
.footer-brand {
  font-family: var(--font-brand);
  font-weight: 400;
  color: #fff;
  -webkit-text-stroke: 0.16em var(--brand-outline);
  paint-order: stroke fill;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--atmos);
  transition: background 0.35s ease;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: bob 12s ease-in-out infinite;
}

.blob-a {
  width: 280px;
  height: 280px;
  left: -40px;
  top: 20%;
  background: var(--coral);
  animation-delay: 0s;
}

.blob-b {
  width: 220px;
  height: 220px;
  right: 5%;
  top: 8%;
  background: var(--sky);
  animation-delay: -3s;
}

.blob-c {
  width: 300px;
  height: 300px;
  right: -60px;
  bottom: 15%;
  background: var(--sun);
  animation-delay: -6s;
}

.blob-d {
  width: 180px;
  height: 180px;
  left: 30%;
  bottom: 5%;
  background: var(--mint);
  animation-delay: -9s;
}

@keyframes bob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(18px, -22px) scale(1.06);
  }
  66% {
    transform: translate(-14px, 12px) scale(0.96);
  }
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 2px solid var(--edge);
}

.wordmark {
  font-size: 1.65rem;
  line-height: 1;
  -webkit-text-stroke-width: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-cta {
  padding: 0.5rem 1rem;
  background: var(--edge);
  color: #fff !important;
  border-radius: 12px;
  border: 2px solid var(--edge);
  box-shadow: 3px 3px 0 var(--sun);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--sun);
  color: #fff !important;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: var(--foam);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--sky);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--sky);
}

.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle {
  /* light border so chrome reads on dark foam; keep sky offset like light mode */
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--sky);
}

html[data-theme="dark"] .theme-toggle:hover {
  box-shadow: 4px 4px 0 var(--sky);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.35rem;
  border-radius: 12px;
  border: 2px solid var(--edge);
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 4px 4px 0 var(--edge);
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--edge);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) clamp(2.5rem, 7vh, 4.5rem);
  min-height: calc(100svh - 4.25rem);
}

.brand-mark {
  margin: 0 0 0.35rem;
  font-size: clamp(3.2rem, 8vw, 5rem);
  line-height: 0.95;
  -webkit-text-stroke-width: 0.2em;
  animation: pop-in 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero-support {
  margin: 1rem 0 1.5rem;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 600;
}

.hero-copy {
  animation: pop-in 0.75s 0.08s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-visual {
  position: relative;
  min-height: 320px;
}

.float-chip {
  position: absolute;
  z-index: 2;
  padding: 0.4rem 0.75rem;
  border: 2px solid var(--edge);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--chip-bg);
  box-shadow: 3px 3px 0 var(--edge);
  animation: floaty 5s ease-in-out infinite;
}

.chip-1 {
  top: 6%;
  left: 4%;
  background: var(--chip-1);
  animation-delay: 0s;
}

.chip-2 {
  top: 12%;
  right: 2%;
  background: var(--chip-2);
  animation-delay: -1.2s;
}

.chip-3 {
  bottom: 14%;
  left: 0;
  background: var(--chip-3);
  animation-delay: -2.4s;
}

.chip-4 {
  bottom: 8%;
  right: 8%;
  background: var(--chip-4);
  animation-delay: -3.6s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.sentence-stage {
  position: absolute;
  inset: 8% 6%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: clamp(0.85rem, 3.5vw, 1.35rem);
  background: var(--stage);
  border: 3px solid var(--edge);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--edge);
  overflow: hidden;
}

.sentence-stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, var(--shine), transparent 40%),
    repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 14px,
      var(--stripe) 14px,
      var(--stripe) 15px
    );
  animation: drift 22s linear infinite;
}

@keyframes drift {
  from {
    transform: translateX(-3%);
  }
  to {
    transform: translateX(3%);
  }
}

.sentence-card {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--foam);
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--grape);
  animation: pop-in 0.85s 0.15s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sentence-card.is-swap {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.sentence-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--quiet);
}

.card-brand {
  font-size: 1.05rem;
  line-height: 1;
  -webkit-text-stroke-width: 0.18em;
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--edge);
  animation: pulse 1.6s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 90, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(139, 90, 255, 0);
  }
}

.meta-right {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--meta-pill);
  border: 1.5px solid var(--edge);
  color: var(--ink);
  font-size: 0.72rem;
}

.sentence-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  min-height: 2.6em;
  flex: 1 1 auto;
}

.sentence-line .tok,
.sentence-line .tok-fixed {
  color: inherit;
  border-radius: 0.15em;
}

.sentence-line .tok {
  cursor: pointer;
  padding: 0 0.04em;
  -webkit-user-select: none;
  user-select: none;
}

.sentence-line .tok:hover,
.sentence-line .tok:focus-visible {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  outline: none;
}

/* again on a word / family */
.sentence-line .tok.miss-word {
  background: linear-gradient(transparent 58%, rgba(255, 90, 95, 0.72) 58%);
}

/* again on grammar / ending / particle */
.sentence-line .tok.miss-gram {
  background: linear-gradient(transparent 58%, rgba(255, 140, 50, 0.75) 58%);
}

.sentence-line .tok.miss-word:hover,
.sentence-line .tok.miss-gram:hover {
  filter: brightness(1.05);
}

.sentence-sub {
  margin: 0.75rem 0 0;
  color: var(--quiet);
  font-size: 0.95rem;
  /* reserve two lines so a wrapping gloss doesn't stretch one slide */
  min-height: 2.8em;
}

/* Sections */
.section-label {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
}

.reasons,
.how,
.joining,
.waitlist {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3.25rem, 8vh, 5rem);
}

.reason-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.reason-list li {
  padding: 1.3rem 1.2rem 1.4rem;
  background: var(--foam);
  border: 3px solid var(--edge);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--edge);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reason-list li:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--edge);
}

.tone-coral {
  background: var(--reason-coral);
}
.tone-sky {
  background: var(--reason-sky);
}
.tone-sun {
  background: var(--reason-sun);
}

.reason-list h3,
.steps h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.reason-list p,
.steps p,
.joining-lead {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--foam);
  border: 3px solid var(--edge);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--edge);
}

.step-num {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2.5px solid var(--edge);
  font-family: var(--font-brand);
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1;
}

.step-num.tone-coral {
  background: var(--coral);
  color: #fff;
  -webkit-text-stroke: 0;
}
.step-num.tone-sky {
  background: var(--sky);
  color: #fff;
}
.step-num.tone-sun {
  background: var(--sun);
  color: #1a1a2e;
}

.joining-lead {
  max-width: 40rem;
  font-size: 1.3rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Waitlist */
.waitlist-panel {
  padding: clamp(1.75rem, 4vw, 2.6rem);
  border-radius: 24px;
  background: var(--waitlist-bg);
  color: #fff;
  border: 3px solid var(--edge);
  box-shadow: 8px 8px 0 var(--edge);
}

.waitlist-brand {
  margin: 0 0 0.35rem;
  font-size: 2.4rem;
  line-height: 1;
  /* mono on brand panel - brand stroke would mush into the gradient */
  color: #fff;
  -webkit-text-stroke: 0.14em #1a1a2e;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.waitlist-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.waitlist-note {
  margin: 0.55rem 0 1.3rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 34rem;
}

.waitlist-form input {
  flex: 1 1 14rem;
  min-height: 3rem;
  padding: 0 1rem;
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  background: #fff;
  color: #1a1a2e;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.waitlist-form input:focus {
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.55);
}

.waitlist-form .btn-primary {
  background: var(--sun);
  color: #1a1a2e;
}

.waitlist-form .btn-primary:hover {
  color: #1a1a2e;
}

.waitlist-status {
  margin: 1rem 0 0;
  font-weight: 800;
  color: #fff;
}

.waitlist-status[data-tone="error"] {
  color: #ffe0a8;
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.4rem var(--gutter) 2rem;
  border-top: 3px solid var(--edge);
  background: color-mix(in srgb, var(--foam) 80%, transparent);
}

.footer-brand {
  font-size: 1.35rem;
  -webkit-text-stroke-width: 0.18em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 800;
}

/* Dialogs */
.sheet {
  width: min(92vw, 420px);
  padding: 1.4rem;
  border: 3px solid var(--edge);
  border-radius: 18px;
  background: var(--foam);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--edge);
}

html[data-theme="dark"] .sheet {
  /* keep chunky dark edge like the rest of the UI (ink read as a white outline) */
  border-color: var(--edge);
  box-shadow: 6px 6px 0 var(--edge);
}

.sheet::backdrop {
  background: var(--backdrop);
}

.sheet h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
}

.sheet p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
    padding-top: 1.5rem;
  }

  .hero-visual {
    /* taller so stage+card keep even padding (was clipping the card) */
    min-height: min(52vw, 360px);
    order: -1;
  }

  .sentence-stage {
    inset: 6% 4%;
  }

  .reason-list {
    grid-template-columns: 1fr;
  }

  .float-chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }
}

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

  .blob,
  .float-chip,
  .sentence-card,
  .hero-copy,
  .brand-mark,
  .sentence-stage::before,
  .dot,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
