/* Scrandella — shared styles for the public site.
   Palette matches the app (src/constants/Colors.ts). */

:root {
  --accent: #E8432A;
  --accent-soft: #FFF0ED;
  --bg: #ffffff;
  --surface: #faf9f8;
  --text: #1A1A1A;
  --text-secondary: #5c5856;
  --text-muted: #908a86;
  --border: #e9e5e2;
  --measure: 34rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c0c;
    --surface: #171515;
    --text: #f6f4f3;
    --text-secondary: rgba(246, 244, 243, 0.68);
    --text-muted: rgba(246, 244, 243, 0.45);
    --border: rgba(246, 244, 243, 0.12);
    --accent-soft: rgba(232, 67, 42, 0.14);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 0;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding-block: 18px;
  margin-bottom: 40px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover { color: var(--text); }

/* ---- Type ---- */

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-wrap: balance;
}

h3 {
  font-size: 1rem;
  margin: 26px 0 6px;
  letter-spacing: -0.01em;
}

p, li { color: var(--text-secondary); }

h1 + p.lede {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 0;
}

.updated {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

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

ul, ol { padding-left: 1.25rem; }
li { margin-block: 5px; }

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

/* ---- Tables ---- */

.table-scroll { overflow-x: auto; margin-block: 18px; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  min-width: 26rem;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

td { color: var(--text-secondary); }

/* ---- Callout ---- */

.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  margin-block: 22px;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
}

.note p { margin-block: 6px; }
.note :first-child { margin-top: 0; }
.note :last-child { margin-bottom: 0; }

/* ---- Home ---- */

.hero { padding-block: 10px 48px; }

.hero p { font-size: 1.15rem; max-width: 30rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.card {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  background: var(--surface);
}

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

.card strong { display: block; color: var(--text); margin-bottom: 4px; }
.card span { color: var(--text-secondary); font-size: 14px; }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding-block: 28px 48px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
