/*
 * Shared theme for crimplab.vedware.com.
 *
 * Values come from the app's design tokens (src/constants/theme.ts): the page
 * wash is the app's meshGradient, cards are the `surface` token, and the
 * accent is `tint` (burnt orange on light, brighter orange on dark). The app
 * follows the system appearance, so the site does too: the dark tokens are
 * declared twice (media query and [data-theme]) the way the app's own
 * ColorSchemeContext allows an override.
 */
:root {
  color-scheme: light dark;

  --bg-from: #ffe9d6;        /* meshGradient[0] */
  --bg-mid: #f2f2f7;         /* meshGradient[1] / background */
  --bg-to: #fbefd9;          /* meshGradient[2] */
  --surface: #ffffff;
  --surface-tint: #fff4e6;   /* the app icon's ground */

  --text: #000000;
  --body: #2c2c2e;
  --muted: #6c6c70;          /* textSecondary */

  --accent: #c2410c;         /* tint */
  --accent-strong: #9a3412;
  --on-accent: #ffffff;      /* onTint */

  --border: rgba(60, 60, 67, 0.18);
  --border-tint: rgba(194, 65, 12, 0.35);

  --radius: 0.75rem;         /* radii.sm = 12 */
  --radius-lg: 1.25rem;      /* radii.lg = 20 */
  --shadow: 0 4px 14px rgba(92, 50, 20, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-from: #2e2118;
    --bg-mid: #1b1714;
    --bg-to: #241d18;
    --surface: #26201b;
    --surface-tint: #322a24;

    --text: #f3eee9;
    --body: #ddd3ca;
    --muted: #a39689;

    --accent: #ff8a3d;
    --accent-strong: #ffa35f;
    --on-accent: #1b1714;

    --border: rgba(190, 150, 120, 0.22);
    --border-tint: rgba(255, 138, 61, 0.4);

    --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg-from: #2e2118;
  --bg-mid: #1b1714;
  --bg-to: #241d18;
  --surface: #26201b;
  --surface-tint: #322a24;

  --text: #f3eee9;
  --body: #ddd3ca;
  --muted: #a39689;

  --accent: #ff8a3d;
  --accent-strong: #ffa35f;
  --on-accent: #1b1714;

  --border: rgba(190, 150, 120, 0.22);
  --border-tint: rgba(255, 138, 61, 0.4);

  --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background-color: var(--bg-mid);
  background-image: linear-gradient(160deg, var(--bg-from), var(--bg-mid) 55%, var(--bg-to));
  background-attachment: fixed;
  min-height: 100vh;
}

h1,
h2,
h3 {
  color: var(--text);
}

a {
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

/* Support and privacy pages share one document layout. */
.doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.doc header {
  margin-bottom: 2rem;
}

.doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc .summary {
  margin: 1.75rem 0 2rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doc .summary p {
  margin: 0;
}

.doc h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.doc p,
.doc li {
  margin: 0 0 0.85rem;
}

.doc ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.doc footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.doc .nav-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc .nav-links li {
  margin: 0 0 0.35rem;
}

.doc .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.doc .brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}
