/*
 * The public site's stylesheet, shared by the landing page and the admin
 * console.
 *
 * The legal pages generated by tools/gen-legal-site.mjs deliberately do NOT
 * use this file: they inline their own copy so a single .html can be handed to
 * a Play reviewer, or copied to any host, and still render. The tokens below
 * are the same values, so the two look like one site.
 *
 * Colours mirror mobile/constants/theme.ts. When one moves, move the other -
 * there is no build step here that could enforce it.
 */

:root {
  color-scheme: light dark;

  --brand: #c10214;
  --brand-ink: #c50013;
  --on-brand: #ffffff;

  --canvas: #fbf9f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e6e3e1;

  --ok: #1c7c4a;
  --ok-bg: #e8f5ee;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --danger: #b3261e;
  --danger-bg: #fdecea;

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.06), 0 8px 24px rgba(26, 26, 26, 0.06);
  --shadow-lift: 0 2px 6px rgba(26, 26, 26, 0.08), 0 18px 40px rgba(26, 26, 26, 0.12);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali",
    "Noto Sans Devanagari", sans-serif;

  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #121212;
    --surface: #1c1c1e;
    --surface-raised: #242427;
    --ink: #f2f0ef;
    --muted: #a8a5a3;
    --line: #33322f;
    --brand-ink: #ff6b74;
    --ok: #6fd39b;
    --ok-bg: #10331f;
    --warn: #e0b25e;
    --warn-bg: #33270f;
    --danger: #ff8f86;
    --danger-bg: #3a1310;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.55), 0 18px 40px rgba(0, 0, 0, 0.55);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-ink);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 8px 20px rgba(193, 2, 20, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(193, 2, 20, 0.36);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
}

.btn-small {
  min-height: 38px;
  padding: 0 0.9rem;
  font-size: 0.88rem;
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.pill-ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: transparent;
}
.pill-warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: transparent;
}
.pill-danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: transparent;
}

/* --------------------------------------------------------------- reveals */

/*
 * Scroll reveals are an ENHANCEMENT, never a gate: the class is added by
 * JavaScript, so with scripting off (or if the observer never fires) every
 * section is simply visible. A site whose content depends on an animation
 * having run is a site that shows a policy reviewer a blank page.
 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
