/* ============================================================
   Sparkling — Legal page shell
   Shared base for privacy.html, terms.html, support.html, blog.html.
   Mirrors index.html's tokens, fonts, nav and footer, plus
   long-form typography for editorial body copy.
   ============================================================ */

/* ---- Fonts (same self-hosted GT Standard Trial as index.html) ---- */
@font-face { font-family:'GT Standard'; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/GT-Standard-Text-Regular.otf')   format('opentype'); }
@font-face { font-family:'GT Standard'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/GT-Standard-Text-Medium.otf')    format('opentype'); }
@font-face { font-family:'GT Standard'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/GT-Standard-Text-Semibold.otf')  format('opentype'); }
@font-face { font-family:'GT Standard Display'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/GT-Standard-Display-Medium.otf')   format('opentype'); }
@font-face { font-family:'GT Standard Display'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/GT-Standard-Display-Semibold.otf') format('opentype'); }
@font-face { font-family:'GT Standard Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/GT-Standard-Mono-Medium.otf')   format('opentype'); }
@font-face { font-family:'GT Standard Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/GT-Standard-Mono-Semibold.otf') format('opentype'); }

:root {
  --spk-ink:        oklch(0.04  0.012 246);
  --spk-ink-2:      oklch(0.09  0.014 246);
  --spk-ink-3:      oklch(0.13  0.016 246);
  --spk-ink-4:      oklch(0.20  0.018 246);
  --spk-spark:      oklch(0.725 0.147 246);
  --spk-spark-soft: oklch(0.725 0.147 246 / 0.16);
  --spk-fg:         oklch(0.985 0.005 246);
  --spk-fg-dim:     oklch(0.985 0.005 246 / 0.72);
  --spk-fg-mute:    oklch(0.985 0.005 246 / 0.56);
  --spk-fg-faint:   oklch(0.985 0.005 246 / 0.38);
  --spk-line:       oklch(0.985 0.005 246 / 0.08);
  --spk-line-2:     oklch(0.985 0.005 246 / 0.14);

  --spk-font-display: 'GT Standard Display', 'GT Standard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --spk-font-text:    'GT Standard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --spk-font-mono:    'GT Standard Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --spk-ease:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --spk-maxw:    1392px;
  --spk-gutter:  24px;
}

/* ---- Base ---- */
html { scrollbar-gutter:stable both-edges; scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
html, body {
  margin:0; padding:0;
  background:var(--spk-ink);
  color:var(--spk-fg);
  font-family:var(--spk-font-text);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
* { box-sizing:border-box; }
img, svg { display:block; max-width:100%; }
a { color:inherit; }
.container { max-width:var(--spk-maxw); margin:0 auto; padding:0 var(--spk-gutter); }

:focus { outline:none; }
:focus-visible {
  outline:2px solid var(--spk-spark);
  outline-offset:3px;
  border-radius:inherit;
}

/* ---- Nav (same as index.html, narrowed surface) ---- */
.nav {
  position:fixed; top:0; left:0; right:0; z-index:50; padding:18px 0;
  background:linear-gradient(180deg, oklch(0 0 0 / 0.7) 0%, transparent 100%);
  transition:background .3s, backdrop-filter .3s;
}
.nav--scrolled {
  background:oklch(0 0 0 / 0.65);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid var(--spk-line);
}
.nav__inner {
  max-width:var(--spk-maxw); margin:0 auto; padding:0 24px;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:24px;
}
.nav__logo { display:inline-flex; align-items:center; color:var(--spk-fg); height:32px; text-decoration:none; }
.nav__logo svg { height:28px; width:auto; }
.nav__links { display:flex; gap:8px; justify-content:center; }
.nav__link {
  padding:10px 16px; border-radius:10px; font-size:14px; font-weight:500;
  letter-spacing:-0.02em; color:oklch(0.985 0.005 246 / 0.78);
  text-decoration:none;
  transition:background .15s, color .15s;
}
.nav__link:hover { background:oklch(0.985 0.005 246 / 0.06); color:var(--spk-fg); }
.nav__right { display:flex; align-items:center; justify-content:flex-end; }
.nav__cta {
  min-height:44px; padding:0 20px; border-radius:10px;
  background:var(--spk-fg); color:var(--spk-ink); border:0;
  display:inline-flex; align-items:center;
  font-family:var(--spk-font-display); font-size:14px; font-weight:600;
  letter-spacing:-0.02em; cursor:pointer; text-decoration:none;
  transition:transform .15s, box-shadow .2s;
}
.nav__cta:hover { transform:translateY(-1px); box-shadow:0 6px 24px var(--spk-spark-soft); }

/* ---- Legal page body ---- */
.legal {
  padding:140px 0 96px;
  min-height:100vh; min-height:100dvh;
}
.legal__inner {
  max-width:720px;
  margin:0 auto;
  padding:0 var(--spk-gutter);
}
.legal__kicker {
  display:inline-block;
  font-family:var(--spk-font-mono); font-size:11px; font-weight:500;
  letter-spacing:0.18em; text-transform:uppercase;
  color:var(--spk-fg-faint);
  margin-bottom:18px;
}
.legal__title {
  font-family:var(--spk-font-display);
  font-size:clamp(40px, 6vw, 72px);
  line-height:1.0; letter-spacing:-0.04em; font-weight:600;
  margin:0 0 20px;
}
.legal__meta {
  font-family:var(--spk-font-mono); font-size:12px;
  color:var(--spk-fg-mute); letter-spacing:0.04em;
  margin:0 0 56px;
}
.legal__notice {
  border:1px solid var(--spk-spark-soft);
  background:oklch(0.725 0.147 246 / 0.05);
  border-radius:14px;
  padding:18px 22px;
  margin:0 0 56px;
  font-size:14px; line-height:1.55;
  color:var(--spk-fg-dim);
}
.legal__notice strong {
  font-weight:600; color:var(--spk-spark);
}

/* Long-form typography */
.legal__body { font-size:16px; line-height:1.65; color:var(--spk-fg-dim); }
.legal__body h2 {
  font-family:var(--spk-font-display);
  font-size:28px; font-weight:600; letter-spacing:-0.025em; line-height:1.15;
  color:var(--spk-fg);
  margin:64px 0 18px;
}
.legal__body h2:first-child { margin-top:0; }
.legal__body h3 {
  font-family:var(--spk-font-display);
  font-size:18px; font-weight:600; letter-spacing:-0.015em;
  color:var(--spk-fg);
  margin:36px 0 12px;
}
.legal__body p { margin:0 0 18px; }
.legal__body ul, .legal__body ol { margin:0 0 18px; padding-left:24px; }
.legal__body li { margin-bottom:6px; }
.legal__body a {
  color:var(--spk-spark);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
  transition:color .15s;
}
.legal__body a:hover { color:var(--spk-fg); }
.legal__body strong { font-weight:600; color:var(--spk-fg); }
.legal__body code {
  font-family:var(--spk-font-mono); font-size:0.92em;
  background:var(--spk-ink-3); padding:2px 6px; border-radius:4px;
}
.legal__body hr {
  border:0; border-top:1px solid var(--spk-line);
  margin:48px 0;
}
.legal__body table {
  width:100%;
  border-collapse:collapse;
  margin:24px 0;
  font-size:14px;
}
.legal__body th,
.legal__body td {
  text-align:left;
  padding:12px 14px;
  border-bottom:1px solid var(--spk-line);
  vertical-align:top;
}
.legal__body th {
  font-family:var(--spk-font-mono); font-size:11px;
  letter-spacing:0.1em; text-transform:uppercase;
  color:var(--spk-fg-mute); font-weight:600;
}
.legal__body td:first-child {
  color:var(--spk-fg);
  font-weight:500;
}

/* Block-uppercase callouts (THE SERVICE IS PROVIDED "AS IS" etc.)
   are common in legal docs. Give them a quiet ink-3 background so
   they read as block emphasis without screaming. */
.legal__body p strong:only-child {
  display:inline;
}
.legal__callout {
  background:var(--spk-ink-2);
  border:1px solid var(--spk-line);
  border-radius:10px;
  padding:18px 22px;
  margin:24px 0;
  font-size:14px; line-height:1.6;
  color:var(--spk-fg-dim);
}

/* ---- Footer (compact version of index.html's footer) ---- */
.footer {
  background:oklch(0 0 0 / 0.6);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  padding:64px 0 32px;
  border-top:1px solid var(--spk-line);
}
.footer__top {
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:48px;
  margin-bottom:48px;
}
.footer__brand-logo { display:flex; align-items:center; gap:12px; margin-bottom:16px; color:var(--spk-fg); text-decoration:none; }
.footer__brand-logo svg { height:28px; width:auto; }
.footer__brand-tag { font-size:14px; color:var(--spk-fg-mute); max-width:280px; line-height:1.5; }
.footer__col h3 {
  font-family:var(--spk-font-mono); font-size:11px; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--spk-fg-faint); margin:0 0 16px; font-weight:500;
}
.footer__col ul { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.footer__col a {
  font-size:14px; color:var(--spk-fg-dim); text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
  transition:color .15s;
}
.footer__col a:hover { color:var(--spk-fg); }
.footer__col svg { width:14px; height:14px; }
.footer__bottom {
  display:flex; justify-content:space-between; align-items:center;
  padding-top:24px; border-top:1px solid var(--spk-line);
  font-family:var(--spk-font-mono); font-size:12px; color:var(--spk-fg-faint);
  letter-spacing:0.04em;
}

/* ---- Responsive ---- */
@media (max-width:1100px) {
  .footer__top { grid-template-columns:repeat(3, 1fr); gap:32px; }
  .footer__top > div:first-child { grid-column:1 / -1; max-width:540px; }
}
@media (max-width:720px) {
  .legal { padding:100px 0 64px; }
  .legal__title { font-size:clamp(32px, 8vw, 48px); }
  .legal__meta { margin-bottom:40px; }
  .legal__notice { margin-bottom:40px; }
  .nav__links { display:none; }
  .nav__inner { grid-template-columns:auto 1fr auto; gap:12px; }
  .nav__cta { padding:0 16px; min-height:44px; font-size:13px; }
  .footer { padding:48px 0 32px; }
  .footer__top { grid-template-columns:repeat(2, 1fr); gap:28px; }
  .footer__top > div:first-child { grid-column:1 / -1; }
  .footer__bottom { flex-direction:column; gap:16px; align-items:flex-start; }
}
@media (max-width:480px) {
  .footer__top { grid-template-columns:1fr; gap:24px; }
}

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