/* Lune — landing page.
 * Phone first (most visitors come from Instagram / TikTok on an iPhone), then wider
 * layouts from 760px and 1040px. Colors are the app's (Design/Theme.swift): cobalt blue for the
 * brand and for the word being said, on a pale blue-cream. Light only.
 * No web fonts: the system's San Francisco on iPhone, and nothing to wait for in an in-app
 * browser. */

:root {
  --bg: #F5F6FB;
  --bg-2: #ECEFF8;
  --card: #FFFFFF;
  --ink: #12162B;
  --ink-2: #545A74;
  --ink-3: #868CA6;
  --line: #DFE3EF;
  --accent: #2E5BFF;        /* the brand: big type, lines, dots */
  --accent-ink: #2547D9;    /* cobalt that reads as text on the light page (6.3:1) */
  --accent-fill: #2E5BFF;   /* buttons with white text (5.2:1) */
  --accent-soft: #E3E9FF;
  --spoken: #2E5BFF;        /* the word being said, as in the app */
  --cream: #F6EBDD;         /* the snail */
  --navy: #1F2C8F;          /* the beret */
  --bezel: #141830;
  --shadow: 0 24px 60px -24px rgba(31, 44, 143, .34), 0 8px 20px -12px rgba(18, 22, 43, .18);
  --radius: 22px;
  --gutter: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); }
strong { color: var(--ink); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 760px; }
.center { text-align: center; }

.h2 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 7vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.h3 { margin: 0 0 8px; font-size: 1.55rem; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.sub { margin: 0 0 28px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.7; text-wrap: pretty; }
.sub.center { max-width: 600px; margin-left: auto; margin-right: auto; }
.accent { color: var(--accent); }

section { padding: 72px 0; }
@media (min-width: 760px) { section { padding: 104px 0; } }

/* ---------------------------------------------------------------- Header */

.top {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--bg); } }
.top__in { max-width: 1080px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.brand img { border-radius: 9px; }
.top__cta {
  padding: 9px 16px; border-radius: 999px;
  background: var(--accent-fill); color: #fff; text-decoration: none;
  font-size: .9rem; font-weight: 700;
  box-shadow: 0 6px 18px -6px rgba(46, 91, 255, .5);
}
.top__cta:active { transform: scale(.97); }

/* ---------------------------------------------------------------- Hero */

.hero { padding: 36px 0 24px; overflow: hidden; }
.hero__in { display: grid; gap: 8px; align-items: center; }
.hero__copy { text-align: center; }
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 5px 14px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink);
  font-size: .85rem; font-weight: 700; letter-spacing: .02em;
}
.hero__title {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 11vw, 3.9rem);
  line-height: 1.04; font-weight: 900; letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__title .accent { display: block; }
.lead { margin: 0 auto 26px; max-width: 28em; color: var(--ink-2); font-size: 1.1rem; line-height: 1.65; text-wrap: pretty; }

.get { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.badge { display: inline-block; line-height: 0; border-radius: 12px; transition: transform .15s ease; }
.badge img { height: 56px; width: auto; }
.badge:active { transform: scale(.97); }
.get__note { margin: 0; color: var(--ink-3); font-size: .86rem; line-height: 1.5; }

.hero__visual { position: relative; width: min(76vw, 360px); margin: 10px auto 0; }
.glow {
  position: absolute; inset: 12% 4% 6%;
  background: radial-gradient(closest-side, rgba(92, 133, 255, .42), rgba(92, 133, 255, 0));
  filter: blur(10px);
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }

@media (min-width: 1040px) {
  .hero { padding: 64px 0 40px; }
  .hero__in { grid-template-columns: 1.2fr .8fr; gap: 32px; }
  .hero__copy { text-align: left; }
  .lead { margin-left: 0; }
  .get { align-items: flex-start; }
  .hero__visual { margin: 0 0 0 auto; width: 420px; }
}

/* ---------------------------------------------------------------- Subtitle ribbon */

.ribbon { padding: 34px 0 30px; background: #0E1330; color: #F4F5FB; text-align: center; }
.karaoke {
  font-size: clamp(1.3rem, 5.8vw, 2.15rem); font-weight: 800; line-height: 1.6;
  letter-spacing: -.005em;
}
.karaoke span {
  display: inline-block; padding: 0 .16em; margin: 0 .02em .12em;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .24);
  transition: background-color .18s ease, color .18s ease, border-radius .18s ease;
}
.karaoke span.on { background: var(--spoken); color: #fff; border-radius: .35em; box-shadow: none; }
.karaoke__en { margin: 8px 0 0; color: #B9C0E0; font-size: 1rem; }
.ribbon__note { margin: 14px 0 0; color: #8189B5; font-size: .84rem; }

/* ---------------------------------------------------------------- Steps */

.steps .h2 { text-align: center; margin-bottom: 40px; }
.step { display: grid; gap: 26px; align-items: center; margin: 0 auto 64px; max-width: 920px; }
.step:last-child { margin-bottom: 0; }
.step__text { text-align: center; }
.step__text p { margin: 0 auto; max-width: 26em; color: var(--ink-2); line-height: 1.7; text-wrap: pretty; }
.step__num {
  margin: 0 0 4px !important; color: var(--accent-ink) !important;
  font-size: .95rem; font-weight: 800; letter-spacing: .14em;
}
.form { white-space: nowrap; font-weight: 700; color: var(--ink); }
.nowrap { white-space: nowrap; }
@media (min-width: 760px) {
  .step { grid-template-columns: 1fr 1fr; gap: 56px; }
  .step__text { text-align: left; }
  .step__text p { margin: 0; }
  .step--flip .step__text { order: 2; }
}

/* A screenshot in a thin bezel. */
.screen {
  margin: 0 auto; width: min(68vw, 300px);
  border-radius: 34px; padding: 7px; background: var(--bezel);
  box-shadow: var(--shadow);
}
.screen img { width: 100%; height: auto; border-radius: 28px; }

/* ---------------------------------------------------------------- Art panels
 * Until the app's screenshots and demo video exist (TODO.md): the mascot on a soft panel,
 * with a small drawn card that shows what the step does. To switch to a real screenshot,
 * swap the whole <figure class="art"> for <figure class="screen"><img ...></figure>
 * (the .screen bezel above is kept for that). */

.art {
  position: relative; margin: 0 auto; width: min(80vw, 340px); aspect-ratio: 1 / 1;
  border-radius: 40px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 28%, #FFFFFF 0%, var(--accent-soft) 62%, #CBD7FF 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.art--tall { aspect-ratio: 4 / 5; width: min(72vw, 300px); }
.art > img { position: absolute; left: 50%; top: 4%; width: 74%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 12px 18px rgba(31, 44, 143, .25)); }
.art--tall > img { width: 66%; top: 3%; }
.art__card {
  position: absolute; left: 6%; right: 6%; bottom: 6%;
  padding: 12px 16px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 14px 30px -14px rgba(18, 22, 43, .35);
  text-align: left; line-height: 1.35;
}
.art__fr { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.art__fr b { padding: 0 .22em; border-radius: .3em; background: var(--spoken); color: #fff; font-weight: 800; }
.art__lemma { margin: 0; font-size: 1.3rem; font-weight: 900; letter-spacing: -.02em; color: var(--ink); }
.art__lemma span { color: var(--ink-3); font-size: .98rem; font-weight: 700; }
.art__tag { margin: 2px 0 0; color: var(--accent-ink); font-size: .74rem; font-weight: 800; letter-spacing: .03em; }
.art__en { margin: 2px 0 0; color: var(--ink-2); font-size: .9rem; }

/* The hero: the snail with two floating word chips (also drawn, not screenshots). */
.stage { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.stage__snail { position: absolute; left: 4%; top: 4%; width: 92%; height: auto;
  filter: drop-shadow(0 18px 24px rgba(31, 44, 143, .3)); animation: bob 4.8s ease-in-out infinite; }
.chip-float {
  position: absolute; padding: 9px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(18, 22, 43, .35);
  font-size: .9rem; font-weight: 800; line-height: 1.3; text-align: left; color: var(--ink);
}
.chip-float small { display: block; color: var(--accent-ink); font-size: .68rem; font-weight: 800; letter-spacing: .04em; }
.chip-float--a { left: -3%; top: 6%; }
.chip-float--b { right: -2%; bottom: 10%; }

/* ---------------------------------------------------------------- Why */

.why { background: var(--bg-2); }
.why__in { display: grid; gap: 36px; align-items: center; }
.why__copy { text-align: center; }
.compare { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; text-align: left; }
.compare li {
  display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; align-items: center;
  padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.compare li > span:nth-child(2) { color: var(--ink-3); font-size: .93rem; text-decoration: line-through; text-decoration-color: rgba(134, 140, 166, .5); }
.compare li > span:nth-child(4) { font-weight: 700; }
.compare .x, .compare .o {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: .9rem; font-weight: 800;
}
.compare .x { background: rgba(134, 140, 166, .16); color: var(--ink-3); }
.compare .o { background: var(--accent-fill); color: #fff; }

.chart { margin: 0 auto; width: 100%; max-width: 440px; padding: 20px 18px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__axis { stroke: var(--line); stroke-width: 2; }
.chart__book { fill: none; stroke: var(--ink-3); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 9; }
.chart__lune { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.chart__dot { fill: var(--accent); }
.chart__lbl { fill: var(--ink-3); font-size: 13px; font-weight: 700; }
.chart__lbl--lune { fill: var(--accent-ink); font-size: 15px; font-weight: 800; }
.chart__axis-lbl { fill: var(--ink-3); font-size: 11px; }
.chart.in .chart__lune { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 1.6s .2s cubic-bezier(.6, .1, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (min-width: 900px) {
  .why__in { grid-template-columns: 1.1fr .9fr; gap: 64px; }
  .why__copy { text-align: left; }
}

/* ---------------------------------------------------------------- Genres */

.genres { text-align: center; }
.chips { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
.chips li {
  padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: .95rem; font-weight: 600; white-space: nowrap;
}
.genres__note { margin: 26px auto 0; max-width: 34em; color: var(--ink-2); font-size: .97rem; text-wrap: balance; }
.flags { margin: 18px 0 0; font-size: 1.6rem; letter-spacing: .12em; }

/* ---------------------------------------------------------------- Features */

.features { background: var(--bg-2); }
.features__in { display: grid; gap: 44px; align-items: center; }
.features .h2 { text-align: center; margin-bottom: 30px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feat { padding: 20px 20px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.feat svg {
  width: 40px; height: 40px; padding: 8px; margin-bottom: 10px; border-radius: 12px;
  background: var(--accent-soft); stroke: var(--accent-ink); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.feat h3 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.feat p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) {
  .features__in { grid-template-columns: 1fr 300px; gap: 64px; }
  .features .h2 { text-align: left; }
}

/* ---------------------------------------------------------------- FAQ */

.faq .h2 { margin-bottom: 26px; }
details {
  border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  margin-bottom: 12px; overflow: hidden;
}
summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 700; line-height: 1.5;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
  border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); font-size: .97rem; line-height: 1.7; }
.faq__more { margin: 22px 0 0; text-align: center; color: var(--ink-2); font-size: .97rem; }

/* ---------------------------------------------------------------- Final */

.final { padding-top: 40px; text-align: center; }
.final__in { display: flex; flex-direction: column; align-items: center; }
.final__mascot { width: 170px; height: auto; margin-bottom: 8px; filter: drop-shadow(0 12px 20px rgba(31, 44, 143, .24)); }
.final .h2 { margin-bottom: 24px; max-width: 16em; }
.final .get__note { margin-top: 10px; }

/* ---------------------------------------------------------------- Footer */

.foot { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.foot__in .brand { font-size: 1.05rem; }
.foot__in .brand img { border-radius: 7px; }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: .92rem; }
.foot__nav a { color: var(--ink-2); text-decoration: none; }
.foot__nav a:hover { color: var(--accent-ink); }
.foot__fine { margin: 0; max-width: 640px; color: var(--ink-3); font-size: .78rem; line-height: 1.7; }

/* ---------------------------------------------------------------- Motion */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .stage__snail { animation: none; }
  .chart.in .chart__lune { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
}

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
