/* Nomi's site: the landing page and /word. The app's own look (docs/design/BRIEF.md): colours from
   design/tokens.json, the app's OFL faces served from fonts/, chunky buttons with an ink lip, sticker
   cards and the butter highlighter. No inline style, so the pages run under the Worker's strict CSP
   (server/app/src/site/pages.ts). Mobile first; the breakpoints are 560, 720, 1080 and 1280. Layout and
   look live here; the quiz is quiz.css, the word page word.css, and every animation motion.css, so
   the pages are whole and still without it. */

@font-face {
  font-family: "Fraunces"; /* unslop-ignore: the app's own display face, chosen for the brand */
  src: url("/fonts/Fraunces.ttf") format("truetype"); /* unslop-ignore */
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("/fonts/DMMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #262A56;
  --ink-2: #4D5180;
  --ink-deep: #11132E;
  --mist: #EEF0FB;
  --mist-2: #DCE3F7;
  --card: #FFFFFF;
  --line: #DCDFF0;
  --mochi: #FFF7EE;
  --peri: #ADBCE9;
  --butter: #FFD66B;
  --butter-soft: #FFF1C2;
  --good: #2E8B62;
  --good-soft: #DDF3E8;
  --good-ink: #1F6B4A;
  --bad: #C8483C;
  --bad-soft: #FBE3E0;
  --bad-ink: #A3372D;
  --on-ink: #FFF7EE;
  --on-ink-2: #C9CEEA;
  --display: "Fraunces", Georgia, serif; /* unslop-ignore: brand face */
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 16px;
  /* The widest the content gets: wide screens give the extra room to the pictures, not the lines. */
  --content: 1400px;
  /* The app's curves (docs/design/screens/Motion.dc.html, NavMotion.dc.html, Splash.dc.html). */
  --spring: cubic-bezier(.3, 1.45, .5, 1);
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  --swipe: cubic-bezier(.3, 1.35, .5, 1);
  --out: cubic-bezier(.2, .8, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 0; margin: 0; }
p { margin: 0; }

a { color: var(--ink); text-decoration-color: var(--peri); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--butter); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px;
  font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font: 500 12px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
}

/* The highlighter: a butter bar behind the lower half of the words, tilted as in the app. */
.hl { position: relative; display: inline-block; z-index: 0; white-space: nowrap; }
.hl::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.06em; right: -0.08em; bottom: 0.08em; height: 0.42em;
  background: var(--butter); border-radius: 0.17em 0.31em 0.24em 0.14em; transform: rotate(-1.5deg);
  transform-origin: 0 50%;
}

.tag {
  display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); background: var(--butter-soft); border-radius: 8px; padding: 5px 8px;
}
.tag-pro { background: var(--ink); color: var(--on-ink); }
.ipa { font: 500 13px/1.2 var(--mono); color: var(--ink-2); }

.sparkle { position: absolute; pointer-events: none; }

/* ---- Top bar ---- */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.wordmark {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  font: 800 28px/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -0.03em;
}
.wordmark .sparkle { right: -14px; top: 4px; width: 12px; height: 12px; }
.top nav { display: flex; align-items: center; gap: 6px 18px; }
.top nav .link {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 16px; text-decoration: none;
}
.top nav .link-wide { display: none; }
.top nav .link:hover, .top nav .link[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--butter); text-decoration-thickness: 3px; }

/* ---- Chunky buttons: lift a touch on hover, sink by their lip on press ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 24px;
  background: var(--butter); color: var(--ink); box-shadow: 0 4px 0 var(--ink);
  font: 700 16px/1.1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-nav { min-height: 44px; padding: 0 16px; font-size: 15px; gap: 8px; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.btn-soon, .store-soon {
  background: var(--card); border-style: dashed; border-color: var(--ink-2); color: var(--ink-2);
  box-shadow: none; cursor: default;
}
.btn-soon .tag { padding: 4px 6px; }

.stores { display: flex; flex-wrap: wrap; gap: 14px 12px; margin-top: 28px; }
.store { min-height: 62px; border-radius: 31px; padding: 0 24px 0 16px; gap: 12px; text-align: left; }
.store svg { flex: none; width: 26px; height: 26px; }
.store-label { display: flex; flex-direction: column; font-size: 19px; line-height: 1.1; }
.store-label small { font: 500 13px/1.2 var(--sans); }
.store-soon .tag { margin-left: 4px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
}
.facts li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--butter); border: 1.5px solid var(--ink); }

/* ---- Phone frames around the app's own screens ---- */

.phone {
  position: relative; width: min(72vw, 290px); margin: 0 auto;
  background: var(--ink); border: 2px solid var(--ink); border-radius: 44px; padding: 8px;
  box-shadow: 0 8px 0 var(--ink-deep);
}
.phone img { width: 100%; height: auto; border-radius: 36px; background: var(--mist); }
.tilt-r { transform: rotate(2.5deg); }
.tilt-l { transform: rotate(-2deg); }

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

.hero {
  display: grid; gap: 44px; padding-block: 28px 64px;
  grid-template-areas: "copy" "quiz" "art";
}
.hero-copy { grid-area: copy; }
.hero .quiz { grid-area: quiz; }
.hero-art { grid-area: art; }
.hero h1 {
  font-weight: 800; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(50px, 14vw, 104px); margin-top: 14px;
}
.lead { margin-top: 22px; max-width: 34ch; font-size: clamp(19px, 4.6vw, 22px); line-height: 1.5; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 600; }

.hero-art { position: relative; padding: 12px 0 92px; }
.hero-art::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 2%;
  width: min(calc(100% + 2 * var(--gutter)), 520px); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: var(--mist-2);
}
.phone-stage { position: relative; z-index: 1; }
.hero-art .phone { width: min(70vw, 300px); }
.hero-art .s1 { left: 6%; top: 9%; width: 24px; height: 24px; z-index: 2; }
.hero-art .s2 { right: 9%; top: 1%; width: 15px; height: 15px; z-index: 2; }
.hero-art .s3 { right: 3%; top: 46%; width: 12px; height: 12px; z-index: 2; }

/* A word card stuck over the phone's corner, as on the welcome screen. It holds the last few days'
   words; one shows at a time, and motion.css turns through them. */
.word-sticker {
  position: absolute; z-index: 3; left: 0; bottom: 38px; width: min(80vw, 310px);
  background: var(--mochi); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink);
  padding: 14px 18px 16px; transform: rotate(-3.5deg);
}
.recent { display: grid; margin: 0; list-style: none; }
.recent-word { grid-area: 1 / 1; }
.recent-word + .recent-word { opacity: 0; }
.word-sticker .eyebrow { font-size: 11px; }
.word-sticker .head { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-top: 6px; }
.word-sticker b { font: 800 30px/1.05 var(--display); font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -0.02em; }
.word-sticker .hl { white-space: normal; }
.word-sticker .meaning { margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }

/* Pause motion: a checkbox, so it works without script; motion.css reads it. */
.hold-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hold {
  position: absolute; z-index: 4; right: 0; bottom: 0;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border: 1.5px solid var(--line); border-radius: 22px; background: var(--card); cursor: pointer;
  font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.hold svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hold .hold-play { display: none; fill: var(--ink); }
.hold-input:checked + .hold { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hold-input:checked + .hold svg { stroke: var(--on-ink); }
.hold-input:checked + .hold .hold-pause { display: none; }
.hold-input:checked + .hold .hold-play { display: block; fill: var(--on-ink); }
.hold-input:focus-visible + .hold { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---- Your five minutes ---- */

.loop {
  background: var(--ink); color: var(--on-ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink-deep);
  padding: 32px 22px 30px; position: relative; overflow: hidden;
}
.loop .eyebrow { color: var(--on-ink-2); }
.loop h2 { margin-top: 10px; font-weight: 800; font-size: clamp(32px, 7vw, 52px); line-height: 1.05; letter-spacing: -0.03em; max-width: 18ch; }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 22px; position: relative; }
.step { position: relative; padding-left: 58px; }
.step .node {
  position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); border: 2px solid var(--on-ink); color: var(--on-ink);
  font: 500 15px/1 var(--mono);
}
.step:first-child .node { background: var(--butter); border-color: var(--butter); color: var(--ink); }
.step .when { font: 500 12px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-2); }
.step h3 { margin-top: 4px; font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; }
.step p { margin-top: 6px; color: var(--on-ink-2); font-size: 16px; line-height: 1.5; max-width: 36ch; }

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

.section { padding-top: 80px; }
.intro h2, .pricing h2 {
  margin-top: 12px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(38px, 9vw, 68px); max-width: 15ch;
}
.intro p:not(.eyebrow) { margin-top: 16px; max-width: 46ch; font-size: 19px; color: var(--ink-2); }

.feature { display: grid; gap: 34px; align-items: center; padding-top: 72px; }
.feature h3 { margin-top: 12px; font-weight: 800; font-size: clamp(30px, 7vw, 46px); line-height: 1.06; letter-spacing: -0.025em; max-width: 16ch; }
.feature-copy p:not(.eyebrow) { margin-top: 14px; max-width: 44ch; font-size: 18px; color: var(--ink-2); }
.feature-copy p.note { font-size: 15px; margin-top: 12px; }
.feature-media { position: relative; padding-block: 12px 20px; }
/* A soft blob behind each picture, as behind the app's own heroes. */
.feature-media::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: min(calc(100% + 2 * var(--gutter)), 440px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--mist-2);
}
.feature { position: relative; z-index: 0; }

/* A crop of a screen, on a sticker rather than in a phone. */
.crop {
  width: min(100%, 440px); margin: 0 auto; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); background: var(--mist);
}
.crop img { width: 100%; height: auto; }

.shot { margin: 0; }
.shot figcaption {
  margin: 22px auto 0; max-width: 26ch; text-align: center;
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}

/* What Nomi leaves out, crossed through like the words placement skips. */
.nots { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 22px 0 0; padding: 0; max-width: 520px; }
.nots li {
  background: var(--mist-2); border-radius: 20px; padding: 7px 16px;
  font: 700 18px/1.2 var(--display); font-variation-settings: "SOFT" 100, "WONK" 0;
  text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-2);
}

.pair { display: flex; justify-content: center; align-items: flex-start; gap: 0; }
.pair .phone { width: min(46vw, 250px); margin: 0; }
.pair .phone + .phone { margin-left: -18px; margin-top: 48px; }

/* ---- Prices ---- */

.pricing { padding-top: 96px; display: grid; gap: 34px; }
.plans { display: grid; gap: 22px; align-items: start; }
.plan { border-radius: 26px; padding: 26px 22px 24px; }
.plan-free { background: var(--card); border: 1.5px solid var(--line); }
.plan-pro { background: var(--mochi); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.plan h3 { font-weight: 800; font-size: 30px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan .price { margin-top: 6px; font: 500 15px/1.4 var(--mono); color: var(--ink-2); }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 17px; line-height: 1.4; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card) url("/img/tick.svg") center / 12px no-repeat; border: 1.5px solid var(--line);
}
.plan-pro .ticks li::before { background-color: var(--butter-soft); border-color: var(--butter); }
.rates { list-style: none; margin: 22px 0 0; padding: 0; border-top: 2px dashed var(--line); }
.rates li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 0; border-bottom: 1.5px solid var(--line); }
.rates li:last-child { border-bottom: 0; padding-bottom: 0; }
.rates .name { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.rates .cost { font: 500 15px/1.4 var(--mono); }
.small { margin-top: 18px; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }

/* ---- Closing ---- */

.closing {
  position: relative; margin-top: 120px; background: var(--ink); color: var(--on-ink);
  border-radius: 28px; box-shadow: 0 6px 0 var(--ink-deep); padding: 64px 22px 32px;
}
.closing .mascot-img { position: absolute; left: 22px; top: -74px; width: 140px; height: auto; }
.closing h2 { font-weight: 800; font-size: clamp(34px, 8vw, 56px); line-height: 1.04; letter-spacing: -0.03em; max-width: 16ch; }
.closing p { margin-top: 12px; color: var(--on-ink-2); font-size: 18px; max-width: 40ch; }
.closing .btn { box-shadow: 0 4px 0 var(--ink-deep); border-color: var(--ink-deep); }
.closing .store-soon { background: transparent; color: var(--on-ink-2); border-color: var(--on-ink-2); box-shadow: none; }
.closing :focus-visible { outline-color: var(--butter); }

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

.foot { padding-block: 48px 56px; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 10px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.foot .company { font-size: 14px; }

/* ---- Wider screens ---- */

@media (min-width: 560px) {
  .top nav .link-wide { display: inline-flex; }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .top nav { gap: 6px 24px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .steps::before {
    content: ""; position: absolute; left: 21px; right: 12%; top: 21px;
    border-top: 2px dashed var(--on-ink-2); opacity: 0.6;
  }
  .step { padding-left: 0; padding-top: 60px; }
  .loop { padding: 44px 40px 40px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closing { display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 36px; align-items: center; padding: 48px 40px 44px; }
  .closing .mascot-img { position: static; width: 160px; grid-row: span 2; }
  .closing .stores { margin-top: 22px; }
  .word-sticker { left: -2%; }
  .hero-art .phone { width: 320px; }
}

@media (min-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
    grid-template-areas: "copy art" "quiz art";
    grid-template-rows: auto 1fr;
    column-gap: clamp(40px, 5vw, 112px); row-gap: 64px;
    padding-block: 40px 96px;
  }
  .hero h1 { font-size: clamp(84px, 6.9vw, 104px); }
  .lead { max-width: 36ch; }
  .hero .quiz { align-self: start; }
  .hero-art { align-self: center; padding: 24px 0 72px; }
  .hero-art::before { width: min(calc(100% + 2 * var(--gutter)), 680px); top: 4%; }
  .hero-art .phone { width: clamp(300px, 27vw, 400px); }
  .word-sticker { left: max(-6%, -40px); bottom: 64px; width: clamp(280px, 23vw, 340px); padding: 16px 20px 18px; }
  .word-sticker b { font-size: 34px; }
  .hero-art .s1 { left: 10%; }
  .hero-art .s3 { right: 8%; }

  .section { padding-top: 120px; }
  .intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(56px, 6vw, 120px); align-items: end; }
  .intro .eyebrow { grid-column: 1 / -1; }
  .intro p:not(.eyebrow) { margin-top: 0; padding-bottom: 6px; }
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(56px, 6vw, 120px); padding-top: 112px;
  }
  .feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .feature.flip .feature-media { order: -1; }
  .feature-media { padding-block: 24px 32px; }
  .feature-media::before { width: min(100%, 600px); }
  .feature .phone { width: clamp(280px, 24vw, 380px); }
  .crop { width: min(100%, 560px); }
  .pair .phone { width: clamp(250px, 21vw, 300px); }
  .pair .phone + .phone { margin-left: -28px; margin-top: 72px; }

  .pricing {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(48px, 5vw, 96px);
    align-items: start; padding-top: 140px;
  }
  .pricing h2 { font-size: clamp(44px, 4vw, 64px); }
  .plans { gap: 28px; }
  .loop { padding: 56px 56px 52px; }
  .steps { gap: 48px; margin-top: 44px; }
  .closing { grid-template-columns: 180px minmax(0, 1fr); column-gap: 48px; padding: 52px 56px; }
  .closing .mascot-img { width: 180px; }
}

@media (min-width: 1280px) {
  :root { --gutter: 48px; }
}

/* Room for the closing line and both store buttons side by side. */
@media (min-width: 1440px) {
  .closing { grid-template-columns: 180px minmax(0, 1fr) auto; }
  .closing .mascot-img { grid-row: auto; }
  .closing .stores { margin-top: 0; justify-content: flex-end; }
}

/* Big screens: the headline and the phone grow into the room; the lines stay the length they were. */
@media (min-width: 1600px) {
  .hero { grid-template-columns: minmax(0, 720px) minmax(0, 1fr); }
  .hero h1 { font-size: 118px; }
  .lead { font-size: 23px; }
  .hero-art .phone { width: 420px; }
  .hero-art::before { width: 720px; }
  .word-sticker { width: 350px; }
}
