/* ==========================================================================
   ZerO3 — Legal pages (Terms of Service, Privacy Policy)
   Shared stylesheet. Tokens and component grammar mirror index.html so the
   legal surfaces read as the same product, not a bolted-on document dump.
   See DESIGN.md — "The Molecular Clean".
   ========================================================================== */

:root {
  --black: #0A0A0A;
  --near-black: #111111;
  --card-dark: #161616;
  --card-raised: #1C1C1C;
  --green: #59D95D;
  --green-deep: #1B6B22;
  --green-hover: #4BC44F;
  --white: #FFFFFF;
  --gray: #878787;
  --gray-light: #AAAAAA;
  --border: rgba(89,217,93,0.15);
  --border-soft: rgba(255,255,255,0.06);
  --glow: 0 0 40px rgba(89,217,93,0.35);
  --lift: 0 20px 60px rgba(0,0,0,0.45);
  --nav-height: 72px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--nav-height) + 24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
svg { display: block; }

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Skip link — keyboard users land past the fixed nav. */
.skip-link {
  position: absolute; left: 24px; top: -100px; z-index: 1100;
  background: var(--green); color: var(--black);
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.85rem;
  padding: 12px 20px; border-radius: 8px;
  transition: top var(--transition);
}
.skip-link:focus { top: 16px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px; border-radius: 8px;
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--green); color: var(--black); box-shadow: 0 0 0 rgba(89,217,93,0); }
.btn-primary:hover { background: var(--green-hover); transform: translateY(-1px); box-shadow: var(--glow); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.28); }
.btn-outline:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 8px; }

/* ===================== LOGO MARK ===================== */
.logo-mark { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-stack { display: flex; flex-direction: column; }
.logo-word {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: 1.7rem; line-height: 1; display: flex;
  align-items: flex-start; letter-spacing: -0.02em;
}
.logo-zer { color: var(--white); }
.logo-o { color: var(--green); }
.logo-sub { color: var(--green); font-size: 0.95rem; font-weight: 900; align-self: flex-end; transform: translateY(22%); line-height: 1; }
.logo-tagline {
  font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--gray); margin-top: 4px;
}

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(10,10,10,0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(10,10,10,0.96); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-back {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 500; font-size: 0.9rem;
  color: var(--gray-light); display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--transition);
}
.nav-back svg { width: 16px; height: 16px; }
.nav-back:hover { color: var(--green); }
.lang-toggle {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.05em; color: var(--green);
  background: rgba(89,217,93,0.08); border: 1px solid rgba(89,217,93,0.35);
  border-radius: 100px; padding: 7px 14px; flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.lang-toggle:hover { background: var(--green); color: var(--black); }

/* ===================== PAGE HEADER ===================== */
.legal-header {
  padding: calc(var(--nav-height) + 72px) 0 56px;
  background: var(--near-black);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
/* Green light bleeding in from the top-left — depth, per the Layered-Dark Rule. */
.legal-header::before {
  content: ''; position: absolute; top: -180px; left: -120px;
  width: 520px; height: 520px; pointer-events: none;
  background: radial-gradient(circle, rgba(89,217,93,0.10) 0%, rgba(89,217,93,0) 68%);
}
.legal-header .container { position: relative; }
.eyebrow {
  font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--green);
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.eyebrow::after { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, var(--green), transparent); }
.legal-title { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin-bottom: 18px; }
.legal-title .accent { color: var(--green); }
.legal-meta { font-size: 0.85rem; color: var(--gray); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-meta strong { color: var(--gray-light); font-weight: 500; }

/* ===================== BODY LAYOUT ===================== */
.legal-body { padding: 64px 0 96px; }
.legal-grid { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; }

/* Sticky table of contents */
.legal-toc { position: sticky; top: calc(var(--nav-height) + 32px); }
.legal-toc h2 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gray); margin-bottom: 16px;
}
.legal-toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 2px; }
.legal-toc a {
  display: block; font-size: 0.85rem; color: var(--gray-light);
  padding: 7px 12px; border-radius: 6px; border-left: 2px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.legal-toc a:hover { color: var(--white); background: var(--card-dark); border-left-color: var(--green); }

/* Prose */
.legal-prose { max-width: 68ch; }
.legal-prose section { margin-bottom: 44px; scroll-margin-top: calc(var(--nav-height) + 24px); }
.legal-prose h2 {
  font-size: 1.35rem; margin-bottom: 16px;
  display: flex; align-items: baseline; gap: 12px;
}
.legal-prose h2 .num {
  font-size: 0.85rem; font-weight: 900; color: var(--green);
  letter-spacing: 0; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.legal-prose h3 {
  font-size: 1rem; font-weight: 700; color: var(--white);
  margin: 24px 0 10px; letter-spacing: normal;
}
.legal-prose p { color: var(--gray-light); margin-bottom: 14px; font-size: 0.97rem; }
.legal-prose a:not(.btn) { color: var(--green); border-bottom: 1px solid rgba(89,217,93,0.35); transition: border-color var(--transition); }
.legal-prose a:not(.btn):hover { border-bottom-color: var(--green); }
.legal-prose strong { color: var(--white); font-weight: 600; }
.legal-prose ul { list-style: none; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.legal-prose ul li {
  color: var(--gray-light); font-size: 0.97rem;
  padding-left: 22px; position: relative;
}
/* Ring motif as list marker — the recurring thin green circle. */
.legal-prose ul li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.75px solid var(--green);
}
.legal-prose dl { margin-bottom: 16px; }
.legal-prose dt { color: var(--white); font-weight: 600; font-size: 0.95rem; margin-top: 14px; }
.legal-prose dd { color: var(--gray-light); font-size: 0.95rem; }

/* Callout — used for the ozone safety notice and other must-read blocks.
   Separation comes from tonal layering (Card Raised against Card Dark prose)
   plus a green hairline, per the Layered-Dark Rule — not from a side accent
   bar. The icon sits inside a thin ring, which is the design system's
   recurring motif and carries the emphasis a stripe would otherwise do. */
.callout {
  background: var(--card-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin: 22px 0;
}
.callout-title {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--green);
  display: flex; align-items: center; gap: 11px; margin-bottom: 12px;
}
.callout-title svg {
  width: 15px; height: 15px; flex-shrink: 0;
  box-sizing: content-box; padding: 5px;
  border: 1.75px solid currentColor; border-radius: 50%;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-color: rgba(232,178,58,0.3); }
.callout.warn .callout-title { color: #E8B23A; }

/* Data table — what we collect / why / how long. */
.legal-table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 0.9rem; }
.legal-table th {
  text-align: left; font-family: 'Montserrat', sans-serif; font-size: 0.7rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray); padding: 0 14px 10px 0; border-bottom: 1px solid var(--border);
}
.legal-table td { padding: 12px 14px 12px 0; color: var(--gray-light); border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.legal-table td:first-child { color: var(--white); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* Contact block closing the document */
.legal-contact {
  background: var(--card-dark); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-top: 8px;
}
.legal-contact h2 { font-size: 1.15rem; margin-bottom: 14px; }
.legal-contact a { display: inline-flex; align-items: center; gap: 9px; color: var(--green); }
.legal-contact svg { width: 16px; height: 16px; }
.contact-rows { display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }

/* ===================== FOOTER ===================== */
.footer { background: var(--black); border-top: 1px solid var(--border-soft); padding: 56px 0 32px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-bottom .fb-contact { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; }
.footer-bottom .fb-contact a { display: inline-flex; align-items: center; gap: 7px; color: var(--gray-light); transition: color var(--transition); }
.footer-bottom .fb-contact a:hover { color: var(--green); }
.footer-bottom .fb-contact svg { width: 15px; height: 15px; color: var(--green); }
.footer-copy { font-size: 0.78rem; color: var(--gray); margin-top: 10px; }
.footer-legal-links { display: flex; gap: 18px; font-size: 0.8rem; }
.footer-legal-links a { color: var(--gray); transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--green); }
.footer-disclaimer { font-size: 0.72rem; color: var(--gray); max-width: 500px; text-align: right; }

/* ===================== BILINGUAL ===================== */
/* Both language versions ship in the HTML; the toggle swaps which is shown.
   Long-form legal text is too brittle for the homepage's string-map approach. */
[data-lang-block] { display: none; }
[data-lang-block].active { display: block; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 40px; }
  .legal-toc { position: static; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
  .legal-toc ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2px; }
}
@media (max-width: 640px) {
  .legal-header { padding: calc(var(--nav-height) + 48px) 0 40px; }
  .legal-body { padding: 48px 0 64px; }
  .nav-back span { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-disclaimer { text-align: left; }
  .legal-prose h2 { flex-direction: column; gap: 4px; }
}
