/* =============================================================
   walkdeeznuts — landing site
   Cherry Ink · Field Edition · v2.0 — newspaper setting
   -------------------------------------------------------------
   System rules, obeyed throughout:
     · One type weight. Size does the work.
     · Cherry is for humans only. Never decoration.
     · Square corners. Hairlines. The interface is printed.
   ============================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* -- Palette (verbatim from the system) ---------------------------- */
  --paper:    #FAF9F7;
  --ink:      #1D1B1A;
  --cherry:   #B3172D;   /* humans only */
  --teal:     #15535C;   /* contrast */
  --bone:     #F0EDE8;
  --brick:    #8C2F23;   /* safety */
  --smoke:    #6E6862;
  --hairline: #E6E2DC;

  --canvas:   #DCD8D1;
  --ash:      #4A453F;
  --stone:    #9A948D;

  /* -- Semantic ------------------------------------------------------ */
  --bg:        var(--paper);
  --fg:        var(--ink);
  --fg-muted:  var(--smoke);
  --fg-soft:   var(--ash);
  --rule:      var(--ink);
  --rule-soft: var(--hairline);

  /* -- Type ---------------------------------------------------------- */
  /* Figtree stands in for Fixel Text 400, exactly as the system does. */
  --font: "Figtree", system-ui, -apple-system, sans-serif;

  --t-banner:  clamp(2.5rem, 1.1rem + 6.4vw, 5.75rem);
  --t-display: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
  --t-italic:  clamp(1.85rem, 1.4rem + 2vw, 2.5rem);
  --t-sub:     1.375rem;
  --t-body:    1.0625rem;
  --t-body-sm: 0.9375rem;
  --t-note:    0.8125rem;
  --t-label:   0.6875rem;
  --t-micro:   0.625rem;

  --ls-banner:  -0.05em;
  --ls-display: -0.038em;
  --ls-italic:  -0.035em;
  --ls-sub:     -0.018em;
  --ls-label:    0.145em;
  --ls-micro:    0.22em;

  /* -- Space --------------------------------------------------------- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 28px; --sp-7: 36px; --sp-8: 56px; --sp-9: 72px;

  --container: 1100px;
  --measure: 640px;
  --gutter: clamp(20px, 5vw, 48px);
  --col-gap: clamp(24px, 3vw, 44px);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One weight. Nothing may synthesise a heavier face. */
strong, b, h1, h2, h3, h4, th, summary { font-weight: 400; }

img, svg { display: block; max-width: 100%; }
svg { flex: none; }
a { color: var(--ink); }
a:hover { color: var(--cherry); }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--cherry); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--paper); }

/* The landing page holds to one screen where the viewport allows it. */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page main { flex: 1; }

/* ---------- 3. PRIMITIVES ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }

.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 999;
  padding: 8px 14px;
  background: var(--ink); color: var(--paper);
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; color: var(--paper); }

.label {
  font-size: var(--t-label); line-height: 1;
  letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--fg-muted);
}
.micro {
  font-size: var(--t-micro); line-height: 1.3;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase; color: var(--fg-muted);
}

.t-display { font-size: var(--t-display); line-height: 0.96; letter-spacing: var(--ls-display); }
.t-sub     { font-size: var(--t-sub);     line-height: 1.2;  letter-spacing: var(--ls-sub); }
.t-italic  { font-size: var(--t-italic);  line-height: 1;    letter-spacing: var(--ls-italic); font-style: italic; }

.body    { font-size: var(--t-body); line-height: 1.45; max-width: var(--measure); text-wrap: pretty; }
.body-sm { font-size: var(--t-body-sm); line-height: 1.5; max-width: var(--measure); text-wrap: pretty; }
.note    { font-size: var(--t-note); line-height: 1.4; color: var(--fg-soft); text-wrap: pretty; }

/* The cherry full stop — the app's one job, finished. */
.stop { color: var(--cherry); }

/* ---------- 4. MASTHEAD ---------- */
.masthead__banner {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-block: var(--sp-5) var(--sp-4);
  text-align: center;
}
.banner {
  display: inline-flex; align-items: center; gap: clamp(8px, 1.6vw, 18px);
  text-decoration: none; color: var(--ink);
  font-size: var(--t-banner);
  line-height: 0.86;
  letter-spacing: var(--ls-banner);
}
.banner:hover { color: var(--ink); }
.banner__mark { width: clamp(30px, 5vw, 56px); height: clamp(30px, 5vw, 56px); }

.masthead__strip { border-bottom: 1px solid var(--ink); }
.masthead__place { text-align: center; padding-block: 11px; }

/* ---------- 5. STATEMENT ---------- */
.edition {
  padding-block: clamp(40px, 7vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.statement {
  max-width: 660px;
  margin-inline: auto;
  text-align: center;
}
.statement__head {
  max-width: 20ch;
  margin-inline: auto;
  text-wrap: balance;
}
.statement__lede {
  margin-top: var(--sp-5);
  font-size: var(--t-sub);
  line-height: 1.35;
  letter-spacing: var(--ls-sub);
  color: var(--fg-soft);
  text-wrap: pretty;
}
.statement__mission {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--t-body-sm);
  line-height: 1.55;
  color: var(--fg-muted);
  text-wrap: pretty;
}
.statement .stores { margin-top: var(--sp-7); }

/* ---------- 6. STORE NOTICES ---------- */
.stores {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}

/* Custom-styled placeholders — NOT official Apple/Google badge artwork.
   Replace with the official assets before launch. */
.store-btn {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  padding: 14px 22px; min-width: 216px;
  border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  text-decoration: none;
}
.store-btn__logo { width: 24px; height: 24px; }

/* Stack to equal widths once they no longer sit side by side. */
@media (max-width: 560px) {
  .stores { flex-direction: column; align-items: stretch; }
  .store-btn { min-width: 0; }
}
.store-btn[aria-disabled="true"] { cursor: not-allowed; color: var(--smoke); border-color: var(--smoke); }
.store-btn:not([aria-disabled="true"]):hover { background: var(--ink); color: var(--paper); }
.store-btn__text { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.store-btn__name { font-size: var(--t-body); letter-spacing: var(--ls-sub); }

/* ---------- 7. BUTTONS (documents) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 11px 18px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  font-size: var(--t-body-sm); line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background 120ms linear, color 120ms linear;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- 8. FOOTER ---------- */
.site-footer { border-top: 1px solid var(--ink); padding-block: var(--sp-5); }
.site-footer__row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-3) var(--sp-5);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 9. DOCUMENTS (privacy, terms, support, deletion) ---------- */
.site-header { border-bottom: 3px solid var(--ink); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5);
  min-height: 62px;
  padding-block: var(--sp-3);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-size: var(--t-sub); letter-spacing: var(--ls-sub);
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 28px; height: 28px; }
.site-nav { display: flex; align-items: center; gap: var(--sp-6); }
.site-nav .btn--ghost { color: var(--ink); }
.site-nav .btn--ghost:hover { color: var(--paper); }

.doc { padding-block: var(--sp-7) var(--sp-8); }
.doc__header { margin-bottom: var(--sp-6); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--ink); }
.doc__title { margin-block: var(--sp-3) var(--sp-3); }
.doc__meta { font-size: var(--t-micro); letter-spacing: var(--ls-micro); text-transform: uppercase; color: var(--fg-muted); }

.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-size: var(--t-sub); letter-spacing: var(--ls-sub); line-height: 1.2;
  margin-block: var(--sp-7) var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 24px;
}
.doc__body h3 { font-size: var(--t-body); margin-block: var(--sp-5) var(--sp-3); }
.doc__body p { margin-bottom: var(--sp-4); font-size: var(--t-body-sm); line-height: 1.55; }
.doc__body ul { margin-bottom: var(--sp-5); }
.doc__body ul li {
  position: relative; padding-left: 22px; margin-bottom: 9px;
  font-size: var(--t-body-sm); line-height: 1.55;
}
.doc__body ul li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 10px; height: 1px; background: var(--ink);
}
.doc__body a { text-decoration-color: var(--hairline); text-underline-offset: 3px; }

.toc { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: var(--sp-4); margin-bottom: var(--sp-6); }
.toc h2 {
  font-size: var(--t-micro) !important; letter-spacing: var(--ls-micro);
  text-transform: uppercase; color: var(--fg-muted);
  border: 0 !important; padding: 0 !important; margin: 0 0 var(--sp-3) !important;
}
.toc ol { counter-reset: toc; columns: 2; column-gap: var(--sp-7); }
@media (max-width: 620px) { .toc ol { columns: 1; } }
.toc li { counter-increment: toc; margin-bottom: 7px; break-inside: avoid; }
.toc a { font-size: var(--t-body-sm); text-decoration: none; }
.toc a::before { content: counter(toc) " · "; color: var(--fg-muted); }
.toc a:hover { text-decoration: underline; }

.callout { border-left: 2px solid var(--ink); background: var(--bone); padding: var(--sp-4); margin-block: var(--sp-5); }
.callout p:last-child { margin-bottom: 0; }
.callout--safety { border-left-color: var(--brick); }

/* Draft values. Cherry is reserved for humans, so drafts take bone. */
.fill {
  padding: 0.1em 0.3em; margin-inline: -0.1em;
  background: var(--bone);
  box-shadow: inset 0 -1px 0 var(--smoke);
}

.data-table { width: 100%; border-collapse: collapse; margin-block: var(--sp-4) var(--sp-5); }
.data-table th, .data-table td {
  text-align: left; padding: var(--sp-3);
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  font-size: var(--t-note); line-height: 1.45;
}
.data-table thead th {
  font-size: var(--t-micro); letter-spacing: var(--ls-micro);
  text-transform: uppercase; color: var(--fg-muted);
  border-bottom-color: var(--ink);
}
.table-scroll { overflow-x: auto; }

/* ---------- 10. 404 ---------- */
.notfound { min-height: 58vh; display: grid; place-content: center; text-align: center; gap: var(--sp-4); }

/* ---------- 11. MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 12. PRINT ---------- */
@media print {
  .site-header, .site-footer, .toc { display: none !important; }
  body { background: #fff; }
  .doc__body { max-width: none; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}
