/* ==========================================================================
   Ahead Kitchen — LEGAL pages stylesheet (terms · refund · privacy).

   These pages are lawyer-reviewed and frozen: this file is the original
   warm-paper "ink on paper" system extracted verbatim from the pre-rebrand
   styles.css, so the policy pages keep their exact look while the marketing
   page moves to its own design. Only the subset the legal pages use lives
   here. Do not restyle without re-checking the legal content is untouched.
   ========================================================================== */

/* ----------------------------------- tokens ----------------------------- */
:root {
  --paper:        #FBF8F2;
  --paper-deep:   #F4EFE6;
  --card:         #FFFFFF;

  --ink:          #1A1714;
  --ink-strong:   #171310;
  --ink-muted:    #5C544B;
  --ink-faint:    #6B6258;

  --accent:       #C53A1F;
  --accent-ink:   #A6301A;

  --line:         #E7E0D4;
  --line-soft:    #EFE9DE;

  --focus:        #C53A1F;

  --font-display: "Bricolage Grotesque", ui-serif, Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-micro:  0.78rem;
  --fs-small:  0.94rem;
  --fs-body:   clamp(1.0rem, 0.97rem + 0.18vw, 1.125rem);
  --fs-lede:   clamp(1.18rem, 1.08rem + 0.5vw, 1.4rem);
  --fs-h3:     clamp(1.5rem, 1.3rem + 0.9vw, 2.0rem);
  --fs-h2:     clamp(2.1rem, 1.5rem + 2.6vw, 3.35rem);

  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4rem;
  --s-9: 8.5rem;

  --wrap-max: 1140px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 14px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ----------------------------------- reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink-strong); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 10px 10px;
  z-index: 200; transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ----------------------------------- buttons ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.82rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 11px;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-faint); background: rgba(0,0,0,0.015); }

/* ----------------------------------- header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.075rem;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}
.brand .mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #141414;
  color: #fff;
  flex: none;
}
.brand .mark svg { width: 100%; height: 100%; display: block; }
.brand-name::after { content: "."; color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: var(--s-3); }

/* ----------------------------------- legal body ------------------------- */
.legal {
  padding-top: var(--s-7);
  padding-bottom: var(--s-9);
}
.legal .wrap { max-width: 760px; }

.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.legal .updated {
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.legal .lede {
  margin-top: var(--s-5);
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--ink-muted);
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink-strong);
  margin-top: var(--s-7);
  margin-bottom: var(--s-3);
}
.legal p { margin-top: var(--s-3); color: var(--ink); }
.legal p:first-of-type { margin-top: var(--s-5); }
.legal ul { margin-top: var(--s-3); display: grid; gap: 0.6rem; }
.legal li { position: relative; padding-left: 1.4rem; color: var(--ink); }
.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.7rem;
  height: 1.5px;
  background: var(--accent);
}
.legal strong { color: var(--ink-strong); font-weight: 600; }
.legal a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.legal a:hover { color: var(--accent); }

.legal .note {
  margin-top: var(--s-7);
  padding: var(--s-4);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-muted);
}
.legal .note strong { color: var(--ink-strong); }

.legal-cross {
  margin-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.legal-cross a { color: var(--ink-faint); }
.legal-cross a:hover { color: var(--accent-ink); }

/* ----------------------------------- footer ----------------------------- */
.site-footer {
  padding: var(--s-7) 0 var(--s-6);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand--footer .mark { width: 26px; height: 26px; border-radius: 7px; }
.brand--footer { font-size: 1rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.4rem, 2vw, 1.4rem);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.35rem;
  transition: color 0.15s var(--ease);
}
.footer-links a:hover { color: var(--accent-ink); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}

/* ----------------------------------- reduced motion --------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
