/* ============================================================
   SmashOne — Legal pages (US)
   Shared premium template · Stripe/Linear tier
   Neutral light palette per brief; Onest/Inter/Plex Mono.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&family=Inter:wght@400;450;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  /* Surfaces — neutral legal palette */
  --page:        #fafafa;
  --card:        #ffffff;
  --raised:      #f4f4f5;
  --inset:       #f7f7f8;

  /* Ink */
  --ink-strong:  rgba(10, 10, 10, 0.92);
  --ink:         rgba(10, 10, 10, 0.80);
  --ink-2:       rgba(10, 10, 10, 0.60);
  --ink-3:       rgba(10, 10, 10, 0.45);

  /* Borders */
  --line:        rgba(10, 10, 10, 0.06);
  --line-1:      rgba(10, 10, 10, 0.09);
  --line-2:      rgba(10, 10, 10, 0.14);

  /* Gold — restrained ≤10% */
  --gold:        #b08930;
  --gold-text:   #6d5310;
  --gold-soft:   #faf5e6;
  --gold-line:   #e6d49f;

  /* Fonts */
  --font-display: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Shadows — soft, downward, ink-tinted */
  --sh-1: 0 1px 2px rgba(10,10,10,0.05), 0 1px 1px rgba(10,10,10,0.03);
  --sh-2: 0 1px 0 rgba(10,10,10,0.03), 0 2px 6px rgba(10,10,10,0.05), 0 8px 24px rgba(10,10,10,0.05);
  --sh-3: 0 2px 8px rgba(10,10,10,0.06), 0 18px 40px rgba(10,10,10,0.09);
  --focus: 0 0 0 3px rgba(176,137,48,0.34);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
  --dur: 160ms;

  --header-h: 64px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  html { scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 28px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  letter-spacing: -0.003em;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "zero";
  letter-spacing: -0.01em;
}

::selection { background: rgba(176,137,48,0.20); }

a { color: inherit; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.icon { display: inline-block; vertical-align: middle; flex: none; }

/* ============================================================
   HEADER (sticky)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-1);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}
.brand-mark { width: 26px; height: 26px; display: block; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}
.brand-word .on { color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.main-nav a:hover { color: var(--ink-strong); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 7px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.flag-chip svg { border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(10,10,10,0.08); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  padding: 10px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 1px 2px rgba(176,137,48,0.30);
}
.btn-primary:hover { background: var(--gold-text); }
.btn-primary:active { transform: scale(0.985); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 9px 12px;
}
.btn-ghost:hover { background: var(--raised); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

/* ============================================================
   HERO (compact)
   ============================================================ */
.legal-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 50% -40%, rgba(176,137,48,0.05), transparent 60%),
    var(--page);
}
.legal-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 44px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-text);
  margin: 0 0 16px;
}
.eyebrow .icon { color: var(--gold); }
.legal-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(32px, 4.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--ink-strong);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 18px;
}
.hero-dates {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
}
.hero-dates .icon { color: var(--ink-3); }
.hero-dates .dot { color: var(--ink-3); }
.hero-entity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-pill);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.hero-entity .icon { color: var(--gold); }

/* ============================================================
   BODY — two-column
   ============================================================ */
.legal-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px 96px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* TOC rail (desktop) */
.toc-rail {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  align-self: start;
  padding-top: 44px;
}
.toc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin: 0 0 14px 14px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line-1);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.toc-list a {
  display: flex;
  gap: 9px;
  padding: 6px 12px 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.toc-list a:hover { color: var(--ink-strong); }
.toc-list a .toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  padding-top: 1px;
  flex: none;
  transition: color var(--dur) var(--ease);
}
.toc-list a.active {
  color: var(--gold-text);
  border-left-color: var(--gold);
  font-weight: 500;
}
.toc-list a.active .toc-num { color: var(--gold); }

/* Mobile TOC dropdown */
.toc-mobile {
  display: none;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin: 0 -24px 4px;
  padding: 12px 24px;
  background: rgba(250,250,250,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-1);
}
.toc-select-wrap {
  position: relative;
  display: block;
}
.toc-select-wrap .icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-2);
}
.toc-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-strong);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 12px 40px 12px 14px;
  cursor: pointer;
}
.toc-select:focus-visible { box-shadow: var(--focus); }

/* Content column */
.legal-content {
  max-width: 720px;
  padding-top: 44px;
  min-width: 0;
}
.legal-content .intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 8px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.legal-section {
  padding-top: 40px;
  scroll-margin-top: calc(var(--header-h) + 28px);
}
.legal-section:first-of-type { padding-top: 32px; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.sec-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0;
  flex: none;
  padding-top: 4px;
  line-height: 1;
}
.sec-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.22;
  letter-spacing: -0.022em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.sec-body { padding-left: 36px; }
.sec-body > p {
  margin: 0 0 16px;
  color: var(--ink);
  text-wrap: pretty;
}
.sec-body > p:last-child { margin-bottom: 0; }
.sec-body strong { font-weight: 600; color: var(--ink-strong); }
.sec-body a.inline-link {
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
}
.sec-body a.inline-link:hover { text-decoration-color: var(--gold); }

/* legal emphasis: all-caps statutory blocks */
.sec-body .legal-caps {
  display: block;
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--ink);
}

/* Definition / rights list cards */
.legal-list {
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}
.legal-list li {
  background: var(--card);
  padding: 14px 18px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.legal-list li .icon { color: var(--gold); margin-top: 2px; }
.legal-list li .li-text { color: var(--ink); }
.legal-list li .li-text strong { color: var(--ink-strong); font-weight: 600; }

/* Sub-processor / data cards grid */
.proc-grid {
  margin: 12px 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.proc-card {
  background: var(--card);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--sh-1);
}
.proc-card .pc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-strong);
  margin: 0 0 3px;
}
.proc-card .pc-role {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
}
.proc-card .pc-region {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-text);
}

/* Retention / definition table-ish rows */
.kv-list {
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
  border-top: 1px solid var(--line-1);
}
.kv-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-1);
}
.kv-list .kv-term {
  flex: 1 1 240px;
  color: var(--ink-strong);
  font-weight: 500;
}
.kv-list .kv-val {
  flex: 1 1 180px;
  color: var(--ink-2);
}
.kv-list .kv-val .tabular { color: var(--ink); }

/* Gold-tinted callout (max once per page) */
.callout {
  margin: 14px 0 16px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
}
.callout .icon { color: var(--gold); flex: none; margin-top: 2px; }
.callout p { margin: 0; color: var(--ink); }
.callout strong { color: var(--ink-strong); }

/* Contact block */
.contact-card {
  margin-top: 6px;
  background: var(--raised);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.contact-card .addr {
  font-style: normal;
  color: var(--ink);
}
.contact-card .addr .tabular { color: var(--ink-strong); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--raised);
  border-top: 1px solid var(--line-1);
  padding: 64px 0 28px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
}
.footer-brand .brand-word { font-size: 22px; }
.footer-blurb {
  margin: 14px 0 0;
  max-width: 270px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--card);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-socials a:hover { border-color: var(--line-2); transform: translateY(-1px); }
.footer-socials img { width: 19px; height: 19px; display: block; }

.footer-col h4 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a, .footer-col button {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover, .footer-col button:hover { color: var(--ink-strong); }
.footer-col a.current { color: var(--gold-text); font-weight: 500; }

.footer-bottom {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.footer-bottom .fb-right { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc-rail { display: none; }
  .toc-mobile { display: block; }
  .legal-content { padding-top: 20px; max-width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .header-desktop-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .flag-chip .flag-text { display: none; }
  .proc-grid { grid-template-columns: 1fr; }
  .legal-hero-inner { padding: 40px 24px 32px; }
  .sec-body { padding-left: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Mobile slide-in nav sheet */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.mobile-nav.open { display: block; }
.mobile-nav-scrim {
  position: absolute; inset: 0;
  background: rgba(10,10,10,0.32);
}
.mobile-nav-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(82vw, 320px);
  background: var(--page);
  border-right: 1px solid var(--line-1);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--sh-3);
}
.mobile-nav-panel .mn-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.mobile-nav-panel a {
  padding: 12px 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-sm);
}
.mobile-nav-panel a:hover { background: var(--raised); }
.mobile-nav-panel .btn-primary { margin-top: 10px; justify-content: center; }
.mn-close {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--card); color: var(--ink); cursor: pointer;
}
