/* BackToZero website: shared tokens and components (Organic design system).
   Every page links this file; page-specific layout stays in the page. */

@font-face { font-family: "Caprasimo"; src: url("/media/fonts/caprasimo-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/media/fonts/figtree-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --bg: #f5ead8;
  --surface: #fbf4e8;
  --ink: #201e1d;
  --muted: #5f574e;
  --line: #e0cfb5;
  --accent: #c67139;
  --accent-ink: #9a4f22;
  --accent-deep: #a9552a; /* terracotta that keeps contrast on the light green band and under white text */
  --on-accent: #ffffff;
  --sage: #5f6e45;
  --sage-soft: #e6e3cb;
  --band: #e6e3cb;
  --on-band: #201e1d;
  --step: #fbf4e8;
  --step-line: #cfcaa8;
  --display: "Caprasimo", "Cooper Black", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-pill: 999px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916; --surface: #27221d; --ink: #f3e8d6; --muted: #c4b6a1; --line: #3d352d;
    --accent: #d9824a; --accent-ink: #eba878; --accent-deep: #d9824a; --on-accent: #1c1916; --sage: #b3c293; --sage-soft: #2d3024;
    --band: #2d3024; --on-band: #f3e8d6; --step: #1c1916; --step-line: #4a5238; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); }
img, video { max-width: 100%; }
a { color: var(--accent-ink); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 16px; }

/* header */
.site-head { background: var(--band); color: var(--on-band); }
.site-head .wrap { display: flex; justify-content: space-between; align-items: center; padding-block: max(20px, env(safe-area-inset-top, 0px)) 20px; }
.wordmark { font-family: var(--display); font-size: 24px; color: var(--on-band); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { width: 34px; height: 34px; flex: none; display: block; }
.wordmark .wm-text span { color: var(--accent-deep); }
.site-head a:focus-visible { outline-color: var(--on-band); }

/* footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.site-foot .wrap { display: grid; gap: 14px; padding-block: 28px max(40px, env(safe-area-inset-bottom, 0px)); }
.site-foot a { color: var(--ink); font-weight: 500; }
.site-foot .legal, .site-foot .org { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.site-foot .tm { font-size: 13px; }
.linkbtn { font: inherit; font-weight: 500; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--accent-ink); }

/* video pause control (WCAG 2.2.2) */
.vid-toggle { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(32, 30, 29, .72); color: #f8eddb; }
.vid-toggle:hover { background: rgba(32, 30, 29, .9); }
.vid-toggle:active { transform: translateY(1px); }
.vid-toggle:focus-visible { outline: 3px solid #f8eddb; outline-offset: 2px; }
.vid-toggle svg { width: 20px; height: 20px; }
.vid-toggle .i-play { display: none; }
.vid-toggle[aria-pressed="true"] .i-play { display: block; }
.vid-toggle[aria-pressed="true"] .i-pause { display: none; }

/* legal documents */
.doc { padding-block: 48px 64px; overflow-wrap: break-word; line-height: 1.65; }
.doc > * { max-width: 40rem; }
.doc a { overflow-wrap: anywhere; }
.doc-head { display: grid; gap: 10px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc h1 { font-size: clamp(36px, 9vw, 56px); }
.doc .meta { color: var(--muted); font-size: 15px; }
.doc h2 { font-size: 24px; line-height: 1.2; margin: 40px 0 12px; }
.doc p, .doc li { margin: 0 0 14px; }
.doc ul { padding-left: 1.2rem; margin: 0 0 14px; }
.summary { background: var(--sage-soft); border-radius: var(--r-md); padding: 20px 22px; margin: 0 0 8px; }
.summary p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--surface); font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 600; min-width: 9rem; }
.doc address { font-style: normal; margin: 0 0 14px; }

/* cookie consent banner (built by /static/consent.js) */
.cb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.cb__card { pointer-events: auto; max-width: 720px; margin-inline: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(32, 30, 29, .18); padding: 18px; display: grid; gap: 14px; font-size: 15px; line-height: 1.5; }
.cb__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cb__btn { font: 600 15px/1 var(--body); border-radius: var(--r-pill); padding: 12px 22px; cursor: pointer; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.cb__btn:hover { background: var(--sage-soft); }
.cb__btn--primary { background: var(--ink); color: var(--bg); }
.cb__btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.cb__btn:active { transform: translateY(1px); }
@media (min-width: 640px) {
  .cb__card { grid-template-columns: 1fr auto; align-items: center; padding: 18px 22px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
