/* ==========================================================================
   base.css: reset, type, and the reusable "sticker" pieces
   (buttons, pills, titles). Page-specific layout lives in page.css.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

/* ---------- Page ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--page);
  /* faint dotted paper, like the app's backgrounds */
  background-image: radial-gradient(var(--border-soft) 1px, transparent 1.4px);
  background-size: 22px 22px;
  overflow-x: hidden;
  overflow-x: clip;     /* the sunburst is wider than a phone: clip, don't scroll */
  -webkit-font-smoothing: antialiased;
}

/* ---------- State switch (see launch-config.js) ---------- */
html[data-state="pre"] [data-show="launched"],
html[data-state="launched"] [data-show="pre"] { display: none !important; }

/* ---------- Helpers ---------- */
.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;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--white); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sky-lip); outline-offset: 4px; border-radius: 12px; }

/* ---------- Type ---------- */
.display, .section-title, .sticker-title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* The store-screenshot headline look: cream letters, thick ink outline,
   a hard drop shadow. paint-order keeps the outline OUTSIDE the letters. */
.display {
  position: relative; z-index: 0;   /* own layer: keeps the outline behind the letters in Chrome */
  font-size: clamp(3rem, 13.5vw, 6.4rem);
  color: var(--white);
  -webkit-text-stroke: 0.15em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 var(--ink);
}

.section-title { font-size: clamp(2.1rem, 8vw, 3.4rem); }

/* Doodled underline under a word (the biro double stroke from the app) */
.underlined {
  position: relative;
  display: inline-block;
  line-height: 0.98;
  white-space: nowrap;
}
.underlined::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: -0.16em; height: 0.3em;
  background: url("../img/doodles/underline_double.webp") center / 100% 100% no-repeat;
  z-index: -1;
}

/* ---------- Pills (the "LIVE NOW" sticker) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 5px;
  border: var(--line-sm) solid var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 800; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.pill--sunny { background: var(--sunny); box-shadow: 0 3px 0 var(--sunny-lip), 0 3px 0 var(--line-sm) var(--ink); }
.pill--mint  { background: var(--mint);  box-shadow: 0 3px 0 var(--mint-lip),  0 3px 0 var(--line-sm) var(--ink); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }

/* ---------- Buttons ----------
   Chunky pill with the app's hard lip: fill, darker lip below, ink outline
   around both. Pressing pushes it down onto its lip. */
.btn {
  --fill: var(--cream); --lip: var(--border-soft); --text: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px;
  padding: 10px 26px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem; line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 var(--lift) 0 var(--lip), 0 var(--lift) 0 var(--line) var(--ink);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active {
  transform: translateY(calc(var(--lift) - 2px));
  box-shadow: 0 2px 0 var(--lip), 0 2px 0 var(--line) var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 calc(var(--lift) + 2px) 0 var(--lip), 0 calc(var(--lift) + 2px) 0 var(--line) var(--ink); }
  .btn:hover:active { transform: translateY(calc(var(--lift) - 2px)); box-shadow: 0 2px 0 var(--lip), 0 2px 0 var(--line) var(--ink); }
}
.btn__icon { width: 1.15em; height: 1.15em; flex: none; }

.btn--sunny { --fill: var(--sunny); --lip: var(--sunny-lip); --text: var(--sunny-ink); }
.btn--cream { --fill: var(--cream); --lip: var(--border-soft); --text: var(--ink); }
.btn--ink   { --fill: var(--ink); --lip: var(--cocoa); --text: var(--white); }
.btn--small { min-height: 46px; padding: 8px 18px; font-size: 1.05rem; --lift: 4px; }

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
