/*
 * ToDooDoo landing page (task 6.3). Static, no scripts, no outside requests.
 * Values are copied from src/ui/tokens.css (the app's source of truth) so the
 * page looks like the app without depending on its build.
 *
 * Light theme only (the screenshots are light captures).
 */

/* ---------- Fredoka, self-hosted (copied from @fontsource/fredoka) ---------- */
@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/fredoka-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/fredoka-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: Fredoka;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/fredoka-latin-600-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --font: Fredoka, ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', 'Varela Round',
    system-ui, sans-serif;

  --text-s: 1rem;
  --text-m: 1rem;
  --text-l: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  /* Display sizes exist only on this page; the app stops at 2rem. */
  --text-h2: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --text-h1: clamp(2.25rem, 1.2rem + 4.6vw, 4rem);

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --line: 3px;
  --line-thin: 2px;
  --lift: 4px;
  --tap: 44px;

  --gutter: 20px;
  --section: 72px;
  --page-max: 1120px;

  --mascot-paper: #fffdf7;
  --mascot-shade: #f3e3d0;
  --mascot-core: #e2c9a8;
  --mascot-ink: #5b3a29;
  --mascot-cheek: #ff9fb2;
  --mascot-spark: #ffd25e;
}

:root,
.island,
.panel > * {
  color-scheme: light;
  --bg: #fff3dc;
  --surface: #fffbf2;
  --surface-sunken: #f6e3bf;
  --text: #5b3a29;
  --text-muted: #765140;
  --outline: #5b3a29;
  --shadow: #5b3a29;
  --focus: #1b6e9c;
  --on-fill: #5b3a29;
  --accent: #ffb8c6;
  --tone-mint: #bfe8d6;
  --tone-butter: #ffe08a;
  --tone-sky: #bfe3f5;
  --status-overdue-bg: #ffa58c;
}

/* Muted brown is too weak on a pastel, so panels carry full-strength ink. */
.panel > * {
  --text-muted: #5b3a29;
}

@media (min-width: 720px) {
  :root {
    --gutter: 40px;
    --section: 112px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-m);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-l);
}

p {
  max-width: 54ch;
  text-wrap: pretty;
}

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

:focus-visible {
  outline: var(--line) solid var(--focus);
  outline-offset: 3px;
}

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

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

.section {
  margin-top: var(--section);
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 16px;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---------- Wordmark (plain Fredoka text until a logo is chosen) ---------- */
.wordmark {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.wordmark--s {
  font-size: var(--text-l);
}

/* The wordmark is a drawn lockup (assets/brand/logo-inline.svg, 270 x 64).
   Sized by width so it keeps its shape; the global img rule lets it shrink in a tight row. */
.wordmark {
  min-width: 0;
}

.wordmark img {
  width: clamp(144px, 42vw, 203px);
  height: auto;
}

/* Footer row is baseline-aligned. The box ends on the baseline of the letters, so the name lines up
   with the text beside it; the same 10px comes back as margin for when the row wraps. */
.foot .wordmark--s {
  margin-bottom: 10px;
}

.wordmark--s img {
  width: 152px;
  margin-bottom: -10px;
}

/* Next to the lockup the header button keeps its one line; the lockup gives way instead. */
.top .btn {
  flex: none;
}

/* ---------- Button: the app's sticker button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 20px;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 var(--lift) 0 var(--shadow);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms cubic-bezier(0.2, 0, 0, 1);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--shadow);
}

/* Pink is the one action colour. Only the two main calls to action use it. */
.btn--primary {
  background: var(--accent);
  color: var(--on-fill);
}

.btn--lg {
  min-height: 56px;
  padding-inline: 28px;
  border-radius: var(--radius-l);
  font-size: var(--text-l);
  font-weight: 600;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 48px;
  padding-top: 24px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero h1 {
  max-width: 11ch;
}

.lead {
  max-width: 34ch;
  font-size: var(--text-l);
  line-height: 1.4;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  color: var(--text-muted);
  font-weight: 500;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* A drawn tick, the same mark the app puts on a selected choice. */
.facts li::before,
.ticks li::before {
  content: '';
  flex: none;
  width: 0.4em;
  height: 0.75em;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-0.1em) rotate(45deg);
}

.hero__art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* The phone lies on a butter backing sheet, like a sticker not yet peeled. */
.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 400px);
  padding: 28px 0 36px;
}

.hero__stage::before {
  content: '';
  position: absolute;
  inset: 14% 4% 0;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-xl);
  background: var(--tone-butter);
  box-shadow: 0 var(--lift) 0 var(--shadow);
  transform: rotate(3deg);
}

.hero__mascot {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 96px;
  height: auto;
  transform: rotate(-6deg);
}

figcaption {
  color: var(--text-muted);
  font-size: var(--text-s);
  text-align: center;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 40px;
    padding-top: 48px;
  }

  .hero__copy {
    gap: 28px;
  }

  .hero__mascot {
    left: -12px;
    width: 124px;
  }
}

/* ---------- Phone frame: a CSS sticker around a real screenshot ---------- */
.phone {
  position: relative;
  flex: none;
  width: 264px;
  max-width: 100%;
  padding: 8px;
  border: var(--line) solid var(--outline);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: 0 var(--lift) 0 var(--shadow);
}

.phone img {
  width: 100%;
  /* inner radius = outer (36) minus border and padding (11) */
  border-radius: 25px;
  border: var(--line-thin) solid var(--outline);
}

.phone--hero {
  transform: rotate(-2.5deg);
}

/* ---------- Pastel panels ---------- */
.panel {
  padding: 32px 20px;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-xl);
  box-shadow: 0 var(--lift) 0 var(--shadow);
  color: #5b3a29;
}

.panel > * {
  color: var(--text);
}

.panel--sky {
  background: #bfe3f5;
}

.panel--butter {
  background: #ffe08a;
}

.panel--mint {
  background: #bfe8d6;
}

@media (min-width: 720px) {
  .panel {
    padding: 56px;
  }
}

/* ---------- One tap ---------- */
.tap {
  display: grid;
  gap: 40px;
}

.tap__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tap__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3em;
}

/* The numeral is the first word of the heading, cut out like a sticker. */
.tap__one {
  color: #fffbf2;
  font-size: clamp(6rem, 3rem + 13vw, 10rem);
  line-height: 0.8;
  -webkit-text-stroke: 6px #5b3a29;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 #5b3a29;
}

.ticks {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

.ticks li {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.phone--undo {
  justify-self: center;
  transform: rotate(2deg);
}

@media (min-width: 880px) {
  .tap {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 64px;
  }
}

/* ---------- Starter packs ---------- */
.packs {
  display: grid;
  gap: 48px;
}

.packs__shots {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 40px;
}

.packs__shots .phone {
  flex: 0 1 220px;
  width: auto;
  min-width: 0;
  padding: 6px;
  border-radius: 30px;
}

.packs__shots .phone img {
  border-radius: 21px;
}

.phone--a {
  transform: rotate(-2deg);
}

.phone--b {
  transform: translateY(40px) rotate(2deg);
}

.packs__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* A plain spec list: label left, answer right, ruled like a label sheet. */
.spec {
  display: grid;
  border-top: var(--line-thin) solid var(--outline);
}

.spec > div {
  display: grid;
  gap: 2px;
  padding-block: 14px;
  border-bottom: var(--line-thin) solid var(--outline);
}

.spec dt {
  color: var(--text-muted);
  font-size: var(--text-s);
  font-weight: 500;
}

.spec dd {
  font-weight: 500;
}

@media (min-width: 880px) {
  .packs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 72px;
  }

  .spec > div {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
  }
}

/* ---------- Status ---------- */
.status {
  display: grid;
  gap: 40px;
}

.status__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-l);
  background: var(--surface);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 14px 2px 10px;
  border: var(--line-thin) solid var(--outline);
  border-radius: var(--radius-pill);
  color: var(--on-fill);
  font-weight: 500;
  line-height: 1.2;
}

.tag--ok {
  background: var(--tone-mint);
}

.tag--soon {
  background: var(--tone-butter);
}

/* Overdue changes shape as well as colour, as in the app. */
.tag--over {
  border-radius: var(--radius-s);
  background: var(--status-overdue-bg);
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Reports ---------- */
.reports {
  display: grid;
  justify-items: center;
  gap: 40px;
}

.reports__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-self: stretch;
}

.phone--reports {
  transform: rotate(-2deg);
}

@media (min-width: 880px) {
  .reports {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 72px;
  }
}

/* ---------- Private ---------- */
.private {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 54ch;
  padding: 16px 20px;
  border: var(--line-thin) dashed var(--outline);
  border-radius: var(--radius-l);
  background: var(--surface);
}

/* ---------- Install ---------- */
.install {
  display: grid;
  gap: 32px;
}

.install__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ways {
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: 0 var(--lift) 0 var(--shadow);
}

.ways > div {
  display: grid;
  gap: 4px;
  padding: 16px 20px;
}

.ways > div + div {
  border-top: var(--line-thin) solid var(--outline);
}

.ways dt {
  font-weight: 600;
}

.ways dt span {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: var(--text-s);
  font-weight: 500;
}

.install__foot {
  color: var(--text-muted);
}

@media (min-width: 880px) {
  .install {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 24px 72px;
    align-items: start;
  }

  .install__foot {
    grid-column: 2;
  }

  .ways > div {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    padding: 20px 24px;
  }
}

/* ---------- Closing ---------- */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.closing .btn {
  margin-top: 12px;
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: var(--section);
  padding-block: 28px 40px;
  border-top: var(--line-thin) solid var(--outline);
  color: var(--text-muted);
}

.foot .wordmark {
  color: var(--text);
}

/* ---------- Mascot: fixed sticker colours in both themes ---------- */
.mascot {
  display: block;
  flex: none;
  overflow: visible;
}

.m-paper,
.m-glint {
  fill: var(--mascot-paper);
}

.m-shade {
  fill: var(--mascot-shade);
}

.m-core {
  fill: var(--mascot-core);
}

.m-ink {
  fill: var(--mascot-ink);
}

.m-cheek {
  fill: var(--mascot-cheek);
  opacity: 0.85;
}

.m-mouth {
  opacity: 1;
}

.m-spark {
  fill: var(--mascot-spark);
}

.m-line {
  fill: none;
}

.m-line,
.m-stroked {
  stroke: var(--mascot-ink);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Reduced motion: the press does not move ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}

/* ---------- Price line, Play link, footer links ---------- */
.price-line {
  color: var(--text-muted);
  font-weight: 500;
}

/* Placeholder only. Replace with Google's official badge when the app is published. */
.play {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 20px;
  border: var(--line) solid var(--outline);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.foot__links a,
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  font-weight: 500;
}

.foot__note {
  flex-basis: 100%;
  max-width: none;
}
