/* Shared stylesheet for the standalone legal pages (/privacy, /terms).
   Mirrors the Glass Flow landing design system: slate-50/950 canvas, twin
   radial hero glows, glass sticky header, Sora display + Inter body (the same
   self-hosted woff2, copied to /fonts for these unbundled pages), blue icon
   chips like the old LegalModal. Dark mode is CLASS-driven (html.dark), set by
   /theme.js from the SAME localStorage.theme the in-app toggle writes — dark by
   default, exactly like the app shell. No prefers-color-scheme fallback here:
   the app ignores the OS setting, so a media query would fight a stored choice
   (stored 'light' + OS dark would wrongly render dark). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/sora-latin-wght-normal.woff2') format('woff2');
}

:root {
  /* slate-50 canvas / slate-900 ink — landing light theme */
  --bg: #f8fafc;
  --fg: #0f172a;
  --heading: #1e293b;      /* slate-800 (modal section titles) */
  --body: #64748b;         /* slate-500 (modal body copy) */
  --muted: #94a3b8;        /* slate-400 */
  --border: rgba(226, 232, 240, 0.6);   /* slate-200/60 */
  --divider: #f1f5f9;      /* slate-100 (modal section rules) */
  --card: rgba(255, 255, 255, 0.7);
  --header-bg: rgba(248, 250, 252, 0.8); /* slate-50/80 */
  --accent: #2563eb;       /* blue-600 */
  --accent-chip-bg: rgba(59, 130, 246, 0.1); /* blue-500/10 */
  --accent-chip-fg: #3b82f6;                 /* blue-500 */
  --glow-opacity: 0.65;
}
html.dark {
  /* slate-950 canvas — landing dark theme */
  --bg: #020617;
  --fg: #ffffff;
  --heading: #ffffff;
  --body: #94a3b8;       /* slate-400 */
  --muted: #64748b;      /* slate-500 */
  --border: rgba(30, 41, 59, 0.6);     /* slate-800/60 */
  --divider: #1e293b;    /* slate-800 */
  --card: rgba(15, 23, 42, 0.6);       /* slate-900/60 */
  --header-bg: rgba(2, 6, 23, 0.8);    /* slate-950/80 */
  --accent: #60a5fa;     /* blue-400 (link colour on dark) */
  --glow-opacity: 1;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
::selection { background: #3b82f6; color: #fff; }
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Twin radial glows around the header zone — exact landing values. */
.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: var(--glow-opacity);
  background-image:
    radial-gradient(38rem 26rem at 30% 12rem, rgba(37, 99, 235, 0.14), transparent 70%),
    radial-gradient(34rem 24rem at 72% 20rem, rgba(129, 140, 248, 0.11), transparent 70%);
}

/* Sticky glass header, as on the landing. */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}
.top-inner {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  display: block;
}
/* The landing's signature CTA: gradient pill with a hairline ring + blue glow,
   hover lift, active press — same recipe as "Start Chatting Now". */
.btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.3), 0 14px 34px -12px rgba(37, 99, 235, 0.8);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.45), 0 18px 40px -12px rgba(37, 99, 235, 0.9);
}
.btn:active { transform: scale(0.95); }

main {
  position: relative;
  z-index: 10;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 5rem;
}
h1 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.035em;
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 0.375rem;
}
.updated {
  color: var(--muted);
  font-size: 0.8125rem;
  margin: 0 0 1.75rem;
}

/* Glass content card — the LegalModal sheet, as a page. */
.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  padding: 1.75rem 1.5rem;
}
@media (min-width: 640px) { .card { padding: 2rem 2rem; } }

section {
  border-top: 1px solid var(--divider);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}
section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 0.5rem;
}
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--accent-chip-bg);
  color: var(--accent-chip-fg);
}
.chip svg { width: 15px; height: 15px; }
section p, section li { font-size: 0.875rem; color: var(--body); }
section p { margin: 0 0 0.625rem; }
section p:last-child { margin-bottom: 0; }
ul { margin: 0 0 0.625rem; padding-left: 1.25rem; }
li { margin-bottom: 0.375rem; }
b { color: var(--heading); font-weight: 700; }

/* Footer — landing-footer register. */
.foot {
  margin-top: 2.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.foot .links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.foot .sep { color: var(--divider); }
.foot .copy { margin-top: 0.5rem; font-size: 0.8125rem; }
