/* Mochi site. One stylesheet, no build step. Colours come from the pet: its mint body (#8dd7b8 in
   img/mochi-stand.png; a darker mint, #1d7153, for links and buttons on the light background),
   the cream speech bubble with a dark brown outline, and the slate the screenshots sit on.
   Contrast (WCAG): light #1d7153 on --bg 5.44:1, white on #1d7153 5.93:1;
   dark #8dd7b8 on --bg 9.41:1, #10261d on #8dd7b8 9.53:1. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbf4ec;
  --surface: #fffaf5;
  --ink: #3b2219;
  --ink-soft: #6e5247;
  --line: #e4d3c6;
  --outline: #4a2a20;
  --accent: #1d7153;
  --accent-ink: #ffffff;
  --red: #b83a2c;
  --green: #3f8a55;
  --slate: #2e3440;
  --shadow: #4a2a20;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f232b;
    --surface: #2a2f39;
    --ink: #f4e9df;
    --ink-soft: #c2b2a6;
    --line: #3d4350;
    --outline: #12151a;
    --accent: #8dd7b8;
    --accent-ink: #10261d;
    --red: #f07a6b;
    --green: #7ccf92;
    --slate: #262b34;
    --shadow: #0d0f13;
  }
}

:root[data-theme="dark"] {
  --bg: #1f232b;
  --surface: #2a2f39;
  --ink: #f4e9df;
  --ink-soft: #c2b2a6;
  --line: #3d4350;
  --outline: #12151a;
  --accent: #8dd7b8;
  --accent-ink: #10261d;
  --red: #f07a6b;
  --green: #7ccf92;
  --slate: #262b34;
  --shadow: #0d0f13;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, .brand, .btn, .price, th {
  font-family: "Pixelify Sans", ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.1; margin: 0 0 16px; }
h2 { font-size: 1.6rem; line-height: 1.2; margin: 56px 0 12px; }
h3 { font-size: 1.2rem; margin: 28px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--line); padding: 1px 5px; border-radius: 4px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* header */
.top { border-bottom: 2px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 1.5rem; }
.brand img { width: 40px; height: 40px; }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.top nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* buttons: chunky, pixel-ish, like the bubble outline */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 3px solid var(--outline);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 4px 0 var(--shadow);
  transition: transform 0.05s, box-shadow 0.05s;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--shadow); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn small { display: block; font: 0.78rem/1.3 ui-sans-serif, system-ui, sans-serif; opacity: 0.85; }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 10px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 48px 0 16px; }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); }
.shot {
  background: var(--slate);
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: 0 6px 0 var(--shadow);
  overflow: hidden;
}
.shot img { width: 100%; }
.fine { font-size: 0.9rem; color: var(--ink-soft); }

/* how it looks, in short rows */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.fact { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.fact h3 { margin-top: 0; }
.fact p { margin: 0; color: var(--ink-soft); }
.line { font-family: "Pixelify Sans", monospace; font-size: 1.02rem; }
.line.red { color: var(--red); }
.line.ok { color: var(--green); }

/* tables */
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 1.05rem; background: color-mix(in srgb, var(--line) 45%, transparent); }
td.c, th.c { text-align: center; white-space: nowrap; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--ink-soft); }

/* price card */
.price-card {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  background: var(--surface); border: 3px solid var(--outline); border-radius: 16px;
  box-shadow: 0 6px 0 var(--shadow); padding: 24px; margin-top: 20px;
}
.price-card img { width: 150px; }
.price { font-size: 2.4rem; line-height: 1; margin: 0 0 6px; }
.price-card ul { padding-left: 20px; }

/* legal pages */
.doc { padding-top: 40px; padding-bottom: 24px; }
.doc .updated { color: var(--ink-soft); font-size: 0.95rem; }
.doc h2 { margin-top: 36px; font-size: 1.35rem; }
.note {
  background: var(--surface); border: 2px solid var(--line); border-left: 6px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; margin: 20px 0;
}
.pet-aside { display: flex; gap: 16px; align-items: center; }
.pet-aside img { width: 96px; flex: none; }

/* footer */
.foot { border-top: 2px solid var(--line); margin-top: 64px; padding: 24px 0 40px; font-size: 0.92rem; color: var(--ink-soft); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.foot nav a { color: var(--ink-soft); }
.foot p { margin: 0 0 6px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .facts { grid-template-columns: 1fr; }
  .price-card { grid-template-columns: 1fr; text-align: left; }
  .price-card img { width: 110px; }
  h2 { margin-top: 44px; }
  th, td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
