/* ParaTimer — classroom felt, on the web.
   Tokens mirror src/theme/index.ts in the app. */

@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/Fredoka_500Medium.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/Fredoka_600SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/Fredoka_700Bold.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/Nunito_400Regular.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/Nunito_600SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/Nunito_700Bold.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap;
  src: url('/assets/fonts/Nunito_800ExtraBold.woff2') format('woff2'); }

:root {
  --paper: #FAF5EC;
  --card: #FFFFFF;
  --sunken: #F1EAE0;
  --outline: #E5DCCE;
  --ink: #2A2D43;
  --ink-soft: #6E7187;
  --ink-faint: #A5A8B8;
  --teal: #2FA7A0;
  --teal-soft: #DFF2F0;
  --coral: #F4795B;
  --coral-soft: #FDE9E3;
  --marigold: #F0A93A;
  --marigold-soft: #FCF1DA;
  --marigold-lip: #F5CE8F;
  --go: #4CAF6D;
  --go-soft: #E3F2E8;
  --lilac: #9A7FD1;
  --lilac-soft: #EFE9F8;
  --slate: #5C6B8A;
  --slate-soft: #E9ECF3;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-close: 0 2px 8px rgba(42, 45, 67, 0.06);
  --shadow-soft: 0 10px 30px rgba(42, 45, 67, 0.10);

  --display: 'Fredoka', 'Avenir Next', system-ui, sans-serif;
  --body: 'Nunito', 'Avenir Next', system-ui, sans-serif;
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }

.section-lede {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 14px 0 0;
  font-size: 18px;
}

::selection { background: var(--teal-soft); }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Nav ---------- */

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand-mark {
  border-radius: 11px;
  box-shadow: var(--shadow-close);
}

.brand-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
}
.brand-word em { font-style: normal; color: var(--teal); }

.nav-pill {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-close);
}

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

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 12em;
}

/* Crayon underline under "see" */
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%; bottom: -0.08em;
  height: 0.28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16' preserveAspectRatio='none'%3E%3Cpath d='M3 11 C 22 4, 40 13, 60 8 S 100 4, 117 9' fill='none' stroke='%232FA7A0' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.lede {
  color: var(--ink-soft);
  font-size: 19px;
  max-width: 520px;
  margin: 22px 0 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-store {
  background: var(--ink);
  color: #fff;
  padding: 12px 24px;
  cursor: default;
  box-shadow: var(--shadow-close);
}
.btn-store-lines { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-store-lines small { font-family: var(--body); font-weight: 700; font-size: 11px; opacity: 0.75; }
.btn-store-lines strong { font-size: 19px; font-weight: 600; }

.btn-try {
  background: var(--teal);
  color: #fff;
  padding: 16px 26px;
  font-size: 18px;
  box-shadow: var(--shadow-close);
  transition: transform 0.15s ease;
}
.btn-try:hover { transform: scale(1.04); }
.btn-try:active { transform: scale(0.96); }

/* Phone frames */

.phone {
  background: #22243a;
  border-radius: 54px;
  padding: 11px;
  box-shadow: var(--shadow-soft);
}
.phone img { display: block; width: 100%; border-radius: 43px; }

.hero-stage { position: relative; justify-self: center; width: min(320px, 82vw); }

.phone-hero { position: relative; z-index: 1; transform: rotate(-2deg); }

.hero-blob {
  position: absolute;
  inset: -7% -13%;
  background: var(--marigold-soft);
  border-radius: 46% 54% 55% 45% / 48% 44% 56% 52%;
  z-index: 0;
}

.sticker {
  position: absolute;
  z-index: 2;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--outline);
  background: #fff;
  box-shadow: var(--shadow-close);
}
.sticker-1 { top: 8%; left: -56px; transform: rotate(-8deg); }
.sticker-2 { bottom: 2%; right: -54px; transform: rotate(7deg); }

/* ---------- Bands ---------- */

.band {
  background: var(--card);
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
  padding: 88px 0;
}

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

.steps {
  list-style: none;
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-close);
}

.step-num {
  position: absolute;
  top: -16px;
  left: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--marigold);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-close);
}

.step-art {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--outline);
  background: #fff;
  margin-bottom: 16px;
}

.step-text p { color: var(--ink-soft); font-size: 16px; margin-top: 8px; }

/* ---------- Reveal demo ---------- */

.reveal-section { padding: 96px 0; }

.reveal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.reveal-hint { margin-top: 18px; font-weight: 700; color: var(--ink); }
.reveal-hint strong { color: var(--go); }

.demo-card {
  justify-self: center;
  width: min(380px, 100%);
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--r-xl);
  padding: 16px 16px 20px;
  box-shadow: var(--shadow-soft);
}

.demo-stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  background: #fff;
  border: 1px solid var(--outline);
}

.demo-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
}

.demo-curtain {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: var(--marigold);
  display: grid;
  place-items: center;
  will-change: height;
}
.demo-curtain::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 9px;
  background: var(--marigold-lip);
  border-radius: 0 0 6px 6px;
}

.demo-chip {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  background: rgba(42, 45, 67, 0.42);
  color: #fff;
}

.demo-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 10px 0;
}

.demo-digits {
  font-family: var(--display);
  font-weight: 700;
  font-size: 52px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.demo-digits.is-done { color: var(--marigold); font-size: 40px; }

.btn-start {
  background: var(--go);
  color: #fff;
  padding: 15px 30px;
  font-size: 19px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-start:hover { transform: scale(1.05); }
.btn-start:active { transform: scale(0.94); }
.btn-start[data-state="running"] { background: var(--ink-faint); pointer-events: none; }

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

.feature-grid {
  list-style: none;
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-close);
}

.feature p { color: var(--ink-soft); font-size: 16px; margin-top: 6px; }
.feature h3 { margin-top: 16px; font-size: 19px; }

.chip {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
}
.chip svg { width: 26px; height: 26px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chip-teal { background: var(--teal-soft); } .chip-teal svg { stroke: var(--teal); }
.chip-coral { background: var(--coral-soft); } .chip-coral svg { stroke: var(--coral); }
.chip-marigold { background: var(--marigold-soft); } .chip-marigold svg { stroke: var(--marigold); }
.chip-go { background: var(--go-soft); } .chip-go svg { stroke: var(--go); }
.chip-lilac { background: var(--lilac-soft); } .chip-lilac svg { stroke: var(--lilac); }
.chip-slate { background: var(--slate-soft); } .chip-slate svg { stroke: var(--slate); }

/* ---------- Screens ---------- */

.screens { padding: 96px 0; }

.screen-row {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.screen { text-align: center; }
.screen figcaption {
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}

/* ---------- Privacy ---------- */

.privacy-inner { max-width: 640px; text-align: center; }
.privacy-inner p { color: var(--ink-soft); margin-top: 16px; font-size: 18px; }

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

.footer { padding: 48px 0 64px; }
.footer-inner { text-align: center; }
.brand-word-sm { font-size: 22px; }
.footer p { color: var(--ink-faint); font-size: 15px; margin-top: 8px; }

/* ---------- Scroll reveals ---------- */

.reveal-on-scroll { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal-on-scroll.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 72px; gap: 64px; }
  .hero-copy { text-align: center; }
  .lede, .section-lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-stage { width: min(300px, 78vw); }
  .sticker-1 { left: -40px; }
  .sticker-2 { right: -40px; }

  .steps, .feature-grid { grid-template-columns: 1fr 1fr; }
  .reveal-grid { grid-template-columns: 1fr; gap: 44px; }
  .reveal-copy { text-align: center; }
  .reveal-copy .section-lede { max-width: 620px; }

  .screen-row { grid-template-columns: repeat(3, minmax(230px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .screen { scroll-snap-align: center; }
}

@media (max-width: 600px) {
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .steps { gap: 28px; }
  .nav-pill { display: none; }
  h2 { text-wrap: balance; }
  .hero h1 { text-wrap: balance; }
}
