/* Nibbles site. Tokens follow DESIGN.md; the link and button colours are darker so text meets WCAG AA. */

@font-face {
  font-family: "Nunito";
  src: url("/assets/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #FFF8F0;
  --surface: #FFFFFF;
  --surface-alt: #FBEFE3;
  --ink: #3A2E2A;
  --ink-soft: #6F625B;
  --line: #EFE3D6;
  --link: #A3461A;
  --button: #B84A1A;
  --on-button: #FFFFFF;
  --tangerine-in: #FF9450;
  --tangerine-out: #DC5426;
  --mint: #6CC3A0;
  --mark: #FFE2AE;
  --shadow: 0 4px 16px rgba(58, 46, 42, 0.06);
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1714;
    --surface: #27201C;
    --surface-alt: #322924;
    --ink: #F6EDE6;
    --ink-soft: #B3A59C;
    --line: #3B322C;
    --link: #F59A62;
    --button: #F59A62;
    --on-button: #1C1714;
    --mark: #5A3A22;
    --shadow: none;
  }
}

*, *::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 var(--text);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, .brand, summary { font-family: var(--rounded); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; margin: 0.4em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; font-weight: 750; margin: 2em 0 0.5em; }
h3 { font-size: 1.15rem; font-weight: 750; margin: 0.6em 0 0.3em; }
code { font-size: 0.9em; background: var(--surface-alt); padding: 0.1em 0.35em; border-radius: 6px; }
mark.ph { background: var(--mark); color: inherit; padding: 0 0.2em; border-radius: 4px; }
.quiet, .meta { color: var(--ink-soft); font-size: 0.95rem; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 16px; }

.bar { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.site-header ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-header nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-header nav a:hover { background: var(--surface-alt); }
.site-header nav a[aria-current="page"] { background: var(--surface-alt); color: var(--link); }

main { padding: 24px 16px 64px; }
main.prose { max-width: 760px; margin: 0 auto; }
main.wide { max-width: 1040px; margin: 0 auto; }
.prose ul { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }

.draft { background: var(--surface-alt); border: 1px solid var(--line); border-left: 6px solid var(--tangerine-out); border-radius: 14px; padding: 14px 18px; margin: 8px 0 16px; font-size: 0.95rem; }

.table { overflow-x: auto; margin: 1em 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-alt); font-family: var(--rounded); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; min-width: 9em; }

.support-hero { display: flex; gap: 20px; align-items: center; margin-top: 8px; }
.support-hero img { flex: 0 0 auto; width: 120px; }
.email { font-weight: 700; }
.faq details { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); margin: 10px 0; border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 750; font-size: 1.05rem; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; }

.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 24px 0 16px; }
.eyebrow { font-family: var(--rounded); font-weight: 800; color: var(--link); margin: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
.lead { font-size: 1.2rem; max-width: 34em; }
.hero-art { background: radial-gradient(circle at 50% 36%, var(--tangerine-in), var(--tangerine-out) 78%); border-radius: 22%; aspect-ratio: 1; display: grid; place-items: center; box-shadow: 0 24px 60px rgba(160, 64, 20, 0.25); }
.hero-art img { width: 78%; filter: drop-shadow(0 10px 14px rgba(90, 36, 16, 0.25)); }
.badge-row { margin-top: 28px; }
.store-badge { display: inline-block; background: #000; color: #FFF; border: 1px solid #A6A6A6; border-radius: 12px; padding: 12px 22px; font: 600 1rem/1.2 var(--text); }

.features { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 20px 22px 24px; }
.feature img { width: 88px; display: block; }
.feature p { margin: 0; }

.kind { background: var(--surface-alt); border-radius: 28px; padding: 8px 28px 24px; margin-top: 48px; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 34px; margin: 12px 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); }
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(0.3em + 5px); width: 6px; height: 9px; border: solid #FFF; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 0.95rem; }
.site-footer p { margin: 6px 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; width: 100%; margin: 0 auto; order: -1; }
  .features { grid-template-columns: 1fr; }
  .kind { padding: 4px 18px 18px; }
  .support-hero { flex-direction: column; align-items: flex-start; }
  .support-hero img { width: 96px; }
}

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: fade 0.2s ease-out; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
