/* ============================================================
   Redeogen - legal pages ("Modern Simple")
   Standalone stylesheet for the static privacy pages in public/
   (they do NOT get Vite's bundled src/style.css). Tokens are
   inlined here; colours flip via [data-theme="light"].
   ============================================================ */

/* --- Self-hosted webfonts (same files the app uses) --- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin-wght-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
}

:root {
  /* Ink ramp */
  --ink-1000: #060708;
  --ink-950: #0a0b0c;
  --ink-900: #0e0f11;
  --ink-850: #121316;
  --ink-800: #16181b;
  --ink-700: #1c1e22;
  --ink-600: #2a2d33;
  --ink-500: #3a3e45;
  --ink-400: #6b7280;
  --ink-300: #8b9099;
  --ink-200: #c2c6cc;
  --ink-100: #f2f3f5;
  --white: #ffffff;

  /* Signal accent */
  --blue-600: #2f73e0;
  --blue-500: #4d8df7;
  --blue-400: #7eb0ff;

  /* Status */
  --green-500: #34d399;
  --amber-500: #fbbf24;
  --red-500: #f87171;

  /* Semantic aliases */
  --surface-base: var(--ink-900);
  --surface-sunken: var(--ink-950);
  --surface-raised: var(--ink-850);
  --surface-card: var(--ink-800);
  --surface-inset: var(--ink-1000);

  --text-primary: var(--white);
  --text-body: var(--ink-100);
  --text-muted: var(--ink-300);
  --text-subtle: var(--ink-400);

  --border-default: var(--ink-700);
  --border-strong: var(--ink-600);

  --accent: var(--blue-500);
  --accent-strong: var(--blue-600);

  --status-success: var(--green-500);
  --status-warning: var(--amber-500);
  --status-error: var(--red-500);

  --link: var(--blue-400);
  --link-hover: var(--white);

  --fill-info: rgba(77, 141, 247, 0.1);
  --fill-success: rgba(52, 211, 153, 0.1);
  --fill-warning: rgba(251, 191, 36, 0.1);

  --cta-bg: var(--white);
  --cta-fg: var(--ink-900);
  --cta-bg-hover: #d8dadd;

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

:root[data-theme='light'] {
  --surface-base: #fbfbfc;
  --surface-sunken: #f4f5f6;
  --surface-raised: #f6f7f8;
  --surface-card: #ffffff;
  --surface-inset: #f0f1f3;

  --text-primary: var(--ink-900);
  --text-body: #1c1e22;
  --text-muted: #565b63;
  --text-subtle: #71767e;

  --border-default: #e6e8eb;
  --border-strong: #d3d6db;

  --accent: var(--blue-600);
  --accent-strong: #245cc0;

  --status-success: #059669;
  --status-warning: #d97706;
  --status-error: #dc2626;

  --link: var(--blue-600);
  --link-hover: var(--ink-900);

  --fill-info: rgba(47, 115, 224, 0.08);
  --fill-success: rgba(5, 150, 105, 0.1);
  --fill-warning: rgba(217, 119, 6, 0.1);

  --cta-bg: var(--ink-900);
  --cta-fg: #ffffff;
  --cta-bg-hover: #2a2d33;

  color-scheme: light;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--surface-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Top bar --- */
.bar {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.brand span {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-body);
  cursor: pointer;
  transition: 0.15s ease;
}

.toggle:hover {
  background: var(--surface-card);
}

.toggle svg {
  width: 18px;
  height: 18px;
}

/* Sun shows in dark (click for light); moon shows in light (click for dark) */
.toggle .icon-moon {
  display: none;
}

:root[data-theme='light'] .toggle .icon-sun {
  display: none;
}

:root[data-theme='light'] .toggle .icon-moon {
  display: block;
}

/* --- Layout --- */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 18px;
}

.kicker svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

h1,
.privacy-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
}

.sub {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 1.0625rem;
  margin-top: 14px;
  max-width: 560px;
}

/* Icon block (page header + cards) */
.ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-inset);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.ic svg {
  width: 20px;
  height: 20px;
}

/* --- Index page (selection cards) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.card {
  display: block;
  text-decoration: none;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 22px;
  transition: 0.15s ease;
  position: relative;
}

a.card:hover {
  border-color: var(--border-strong);
}

.card h2 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 300;
}

.card ul {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

.card li svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

.soon {
  opacity: 0.55;
  pointer-events: none;
}

.soon-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 2px 8px;
}

/* --- Prose pages (long policies) --- */
.privacy-content {
  /* container holds the prose; the .wrap provides the max-width + padding */
}

.last-updated {
  color: var(--text-subtle);
  font-size: 0.875rem;
  margin: 16px 0 32px;
}

.privacy-section {
  margin-bottom: 32px;
}

.privacy-section h2 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
}

.privacy-section h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.privacy-section p {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.privacy-section ul,
.privacy-section ol {
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 0 14px;
  padding-left: 1.25rem;
}

.privacy-section li {
  margin-bottom: 6px;
}

.privacy-section li::marker {
  color: var(--text-subtle);
}

strong {
  color: var(--text-primary);
  font-weight: 500;
}

.contact-link {
  color: var(--link);
  text-decoration: none;
  transition: 0.15s ease;
}

.contact-link:hover {
  color: var(--link-hover);
}

/* Notice boxes: flat fill + thin left accent border */
.contact-info,
.highlight-box,
.warning-box,
.privacy-summary {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 16px 0;
}

.contact-info {
  background: var(--surface-card);
  border-left: 3px solid var(--accent);
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 6px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

.highlight-box {
  background: var(--fill-info);
  border-left: 3px solid var(--accent);
}

.warning-box {
  background: var(--fill-warning);
  border-left: 3px solid var(--status-warning);
}

.privacy-summary {
  background: var(--fill-success);
  border-left: 3px solid var(--status-success);
  margin-top: 32px;
}

.highlight-box p,
.warning-box p,
.privacy-summary p {
  color: var(--text-body);
  margin-bottom: 0;
}

.privacy-summary h3 {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
  font-weight: 300;
}

.data-table th {
  background: var(--surface-card);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.8125rem;
}

.data-table td {
  color: var(--text-muted);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* --- Buttons --- */
.back {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-body);
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover {
  background: var(--surface-card);
}

.btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .bar {
    padding: 16px;
  }

  .wrap {
    padding: 16px 16px 64px;
  }
}
