/* Solidarity website. One stylesheet, no external fonts or scripts.
   Colour tokens mirror constants/theme.ts in the app. */

:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f0f1f5;
  --border: #e3e5eb;
  --text: #12141a;
  --subtext: #4b5262;
  --muted: #6b7280;
  --brand: #d9493a;
  --brand-2: #f47a4e;
  --accent: #4f6ef0;
  --positive: #108a55;
  --negative: #d02f4e;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(18, 20, 26, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07080b;
    --surface: #12151c;
    --surface-2: #1a1e27;
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f7fa;
    --subtext: #a3aab8;
    --muted: #8a92a3;
    --brand: #f0643c;
    --brand-2: #ff8a65;
    --accent: #8ea6ff;
    --positive: #4ade9b;
    --negative: #fb7185;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--subtext); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }

/* Hero */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 26%, transparent), transparent),
              radial-gradient(closest-side at 80% 40%, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; }
h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--subtext); max-width: 560px; margin: 0 0 28px; }

.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--surface);
}
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; border: 0; box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: 0.85; line-height: 1; }
.btn span { line-height: 1.15; text-align: left; }

/* Phone mock (pure CSS, no screenshots needed) */
.phone {
  width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 19; border-radius: 40px; padding: 12px;
  background: #0b0c10; box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,0.08);
}
.phone-screen { height: 100%; border-radius: 30px; background: #07080b; padding: 22px 16px; color: #f5f7fa; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.phone-title { font-weight: 800; font-size: 24px; margin: 0; }
.phone-over { color: #ff8a65; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }
.phone-cam { flex: 0 0 38%; border-radius: 22px; background: linear-gradient(160deg, #2a2f3a, #111318); position: relative; }
.phone-cam::after { content: ""; position: absolute; left: 14%; right: 14%; top: 50%; height: 3px; border-radius: 2px; background: #f0643c; box-shadow: 0 0 12px #f0643c; }
.phone-card { border-radius: 18px; background: #12151c; border: 1px solid rgba(74,222,155,0.35); padding: 14px; }
.phone-card .k { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #a3aab8; font-weight: 800; }
.phone-card .v { font-size: 22px; font-weight: 800; margin: 4px 0 8px; }
.phone-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; }
.phone-bar i { display: block; background: #4ade9b; }
.phone-bar i + i { background: #fb7185; }
.phone-votes { display: flex; gap: 8px; margin-top: 10px; }
.phone-votes span { flex: 1; text-align: center; border-radius: 10px; padding: 8px 0; background: rgba(255,255,255,0.05); font-weight: 700; font-size: 13px; }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { color: var(--subtext); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--subtext); margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; background: color-mix(in srgb, var(--brand) 14%, transparent); }

.cta { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 40px 20px; }
.cta p { color: var(--subtext); }
.cta .buttons { justify-content: center; }

.note { font-size: 14px; color: var(--muted); }

/* Prose pages */
.page { padding: 48px 0 64px; }
.page h1 { font-size: clamp(32px, 5vw, 46px); }
.page h2 { font-size: 24px; margin-top: 40px; padding-top: 8px; }
.page h3 { margin-top: 24px; }
.page p, .page li { color: var(--subtext); }
.page strong { color: var(--text); }
.meta { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 6px 0; }
.callout { border-left: 4px solid var(--brand); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0; }

.toc { columns: 2; padding-left: 20px; }
.toc li { margin: 2px 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); color: var(--text); font-size: 14px; }
td { color: var(--subtext); }
tr:last-child td { border-bottom: 0; }

ol.steps { padding-left: 22px; }
ol.steps li { margin: 8px 0; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--text); padding: 16px 0; min-height: 48px; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
details p { margin: 10px 0 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--subtext); }

/* Responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .phone { max-width: 260px; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0 32px; }
  .grid { grid-template-columns: 1fr; }
  .toc { columns: 1; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  section { padding: 40px 0; }
  .btn { width: 100%; }

  /* Tables become stacked cards on phones. */
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table { border: 0; background: none; }
  tr { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; padding: 6px 0; }
  td { border: 0; padding: 6px 14px; }
  td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
