/* collectiv.press — light mode, built on the app's "the feed" v3 LIGHT tokens. */

:root {
  /* App v3 LIGHT tokens */
  --bg: #F4F1EA;
  --fg: #16140F;
  --muted: #9C9486;
  --faint: #CFC8BB;
  --line: #E4DED3;
  --surface: #EAE4D9;
  --press: #ECE7DC;

  /* Brief's structural-rule parchment (tweakable accent) */
  --accent: #D4C5A9;

  /* Section colors (v3) */
  --labor: #BE3B3B;
  --climate: #6B9E78;
  --justice: #2E7B78;
  --democracy: #C4923A;
  --race-equity: #C06B45;
  --international: #5C7CB8;
  --culture: #8B6FAE;
  --health: #AE5A8C;

  /* Tweakable wordmark */
  --wordmark-size: 72px;
  --wordmark-tracking: -0.02em;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in oklab, var(--accent) 55%, transparent); }

a { color: inherit; }

/* ── Shell ──────────────────────────────────────────────── */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Home centers itself vertically — single screen, no scroll target */
.page--home {
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Document pages sit toward the top with breathing room */
.page--doc {
  padding-top: clamp(64px, 12vh, 132px);
  padding-bottom: 80px;
}

/* ── Motion ─────────────────────────────────────────────── */

/* Visible is the base state — content always shows even if the animation is
   throttled, printed, or reduced-motion. The fade only animates FROM hidden. */
@media (prefers-reduced-motion: no-preference) {
  .motion-gentle .reveal {
    animation: rise 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .motion-gentle .reveal-1 { animation-delay: 0.04s; }
  .motion-gentle .reveal-2 { animation-delay: 0.13s; }
  .motion-gentle .reveal-3 { animation-delay: 0.22s; }
  .motion-gentle .reveal-4 { animation-delay: 0.31s; }
  .motion-gentle .reveal-5 { animation-delay: 0.40s; }
  .motion-gentle .reveal-6 { animation-delay: 0.49s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Wordmark / type ────────────────────────────────────── */

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: min(var(--wordmark-size), 17vw);
  line-height: 1.04;
  letter-spacing: var(--wordmark-tracking);
  margin: 0;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.26em;
}
.wordmark .mark {
  flex: 0 0 auto;
  width: 0.072em;
  height: 0.78em;
  background: var(--fg);
  border-radius: 1px;
  position: relative;
  top: 0.02em;
}

.tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 4.4vw, 27px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: color-mix(in oklab, var(--fg) 78%, var(--bg));
  margin: 14px 0 0;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--accent);
  width: 100%;
  max-width: 100%;
  margin: 34px 0;
}
.rule--short { width: 88px; margin: 30px 0; }

.lede {
  font-family: var(--sans);
  font-size: clamp(16px, 2.4vw, 18px);
  line-height: 1.66;
  color: color-mix(in oklab, var(--fg) 80%, var(--bg));
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}
.lede .lede-line { display: block; }
.lede .lede-line + .lede-line { margin-top: 1.05em; }

.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 7vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--fg);
}

/* ── Back link / nav ────────────────────────────────────── */

.backlink {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.18s ease;
  margin-bottom: clamp(40px, 8vh, 72px);
  align-self: flex-start;
}
.backlink:hover { color: var(--fg); }
.backlink .arrow { color: var(--accent); transition: transform 0.18s ease; }
.backlink:hover .arrow { transform: translateX(-3px); }

/* ── App Store badge ────────────────────────────────────── */

.cta-row { margin-top: 38px; }

/* Official Apple "Download on the App Store" lockup — used as-is per Apple
   marketing guidelines; the wrapper only handles sizing and the hover lift. */
.appstore {
  display: inline-block;
  text-decoration: none;
  border-radius: 9px;
  transition: transform 0.18s ease;
}
.appstore img { display: block; height: 52px; width: auto; }
.appstore:hover { transform: translateY(-2px); }

/* Pre-launch: the badge is shown but intentionally inert — dimmed and
   desaturated with a "Coming soon" caption below, so it reads as a deliberate
   not-yet-available state rather than a broken download link. */
.appstore--soon {
  filter: grayscale(1);
  opacity: 0.5;
  cursor: default;
}
.appstore--soon:hover { transform: none; }

.cta-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ── Section dot row (the app's signature, quietly) ─────── */

.sections {
  margin-top: 46px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sections .dots {
  display: flex;
  gap: 11px;
  align-items: center;
}
.sections .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.sections .caption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 28px 34px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 56px;
}
.page--home + .footer { margin-top: 0; }
.footer .copy { color: var(--muted); white-space: nowrap; }
.footer .sep { color: var(--faint); }
.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}
.footer a:hover { color: var(--fg); }
.footer a[data-active="true"] { color: var(--fg); }

/* ── FAQ (Support) ──────────────────────────────────────── */

.contact {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--fg) 82%, var(--bg));
  margin: 26px 0 0;
  max-width: 56ch;
}
.contact a, .inline-link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.contact a:hover, .inline-link:hover {
  border-color: var(--fg);
}

.faq { margin-top: 8px; }
.faq-item {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.005em;
  color: var(--muted);
  margin: 0 0 9px;
}
.faq-a {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}

/* ── Placeholder (Privacy / Terms) ──────────────────────── */

.placeholder {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  color: color-mix(in oklab, var(--fg) 80%, var(--bg));
  margin: 28px 0 0;
  max-width: 56ch;
  text-wrap: pretty;
}
.placeholder-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 30px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.placeholder-tag .blip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--democracy);
}

/* ── Long-form legal document (Privacy / Terms) ─────────── */

.doc-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.doc-meta .blip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--climate);
  flex: 0 0 auto;
}

.doc-intro {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  color: color-mix(in oklab, var(--fg) 82%, var(--bg));
  margin: 30px 0 0;
  max-width: 64ch;
  text-wrap: pretty;
}

.doc { margin-top: 6px; }

.doc p {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.68;
  color: color-mix(in oklab, var(--fg) 86%, var(--bg));
  margin: 15px 0 0;
  max-width: 66ch;
  text-wrap: pretty;
}

.doc a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: border-color 0.16s ease;
}
.doc a:hover { border-color: var(--fg); }

/* Section blocks divided by a hairline */
.doc-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.doc-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(21px, 4vw, 27px);
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
  margin: 0;
  scroll-margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 13px;
}
.doc-section h2 .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  flex: 0 0 auto;
  position: relative;
  top: -0.18em;
}

.doc h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 26px 0 0;
}

/* "In Short" callouts */
.in-short {
  margin: 18px 0 0;
  padding: 13px 18px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 9px 9px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.56;
  color: color-mix(in oklab, var(--fg) 76%, var(--bg));
  max-width: 64ch;
}
.in-short strong { font-style: normal; font-weight: 600; color: var(--fg); }

/* Body lists */
.doc ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  max-width: 66ch;
}
.doc li {
  position: relative;
  padding-left: 21px;
  margin: 9px 0 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.62;
  color: color-mix(in oklab, var(--fg) 86%, var(--bg));
}
.doc li::before {
  content: "";
  position: absolute;
  left: 3px; top: 0.66em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.doc li strong { color: var(--fg); font-weight: 600; }
.doc li em { font-style: italic; color: var(--muted); }

/* Nested list (Canada exceptions, legitimate-interest examples) */
.doc li ul { margin-top: 6px; }

/* Table of contents */
.toc {
  margin: 30px 0 0;
  padding: 24px 26px;
  background: var(--surface);
  border-radius: 13px;
}
.toc-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.toc ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 34px;
}
.toc li {
  counter-increment: toc;
  break-inside: avoid;
  margin: 0 0 9px;
  padding-left: 26px;
  position: relative;
  line-height: 1.4;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.16em;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
}
.toc a {
  font-family: var(--sans);
  font-size: 13.5px;
  color: color-mix(in oklab, var(--fg) 72%, var(--bg));
  text-decoration: none;
  border: 0;
  transition: color 0.16s ease;
}
.toc a:hover { color: var(--fg); }

/* CCPA category grid (all "No") */
.cat-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  max-width: 66ch;
  border-top: 1px solid var(--line);
}
.cat-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: color-mix(in oklab, var(--fg) 84%, var(--bg));
}
.cat-list li::before { content: none; }
.cat-list .no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}

/* Postal address block */
.doc address {
  font-style: normal;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: color-mix(in oklab, var(--fg) 86%, var(--bg));
  margin: 14px 0 0;
}

/* ── Contribute ─────────────────────────────────────────── */

.intro {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  color: color-mix(in oklab, var(--fg) 82%, var(--bg));
  margin: 26px 0 0;
  max-width: 56ch;
  text-wrap: pretty;
}

.form {
  margin-top: 40px;
  max-width: 460px;
}

.toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 4px;
  width: 100%;
}
.toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.toggle button[aria-pressed="true"] {
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 1px 3px -1px rgba(22,20,15,0.18);
}

.amounts {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.amount {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}
.amount .sub {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}
.amount:hover { border-color: var(--faint); }
.amount[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 16%, var(--bg));
}
.amount[aria-pressed="true"] .sub { color: color-mix(in oklab, var(--fg) 60%, var(--bg)); }

.custom-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.16s ease;
}
.custom-wrap[hidden] { display: none; }
.custom-wrap:focus-within { border-color: var(--accent); }
.custom-wrap .currency {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--muted);
  padding: 0 4px 0 16px;
}
.custom-wrap input {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--fg);
  padding: 14px 16px 14px 2px;
  width: 100%;
  outline: none;
}

/* Faux Stripe Payment Element */
.pay {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.applepay {
  width: 100%;
  appearance: none;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.applepay:hover { transform: translateY(-1px); }
.applepay .apple { width: 16px; height: 19px; fill: var(--bg); }

.or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.or::before, .or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.field { margin-bottom: 10px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field .input, .field .input-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  transition: border-color 0.16s ease;
}
.field .input {
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field .input .card-dots { letter-spacing: 0.18em; color: var(--faint); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; }
.input-row .half {
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
}
.input-row .half:first-child { border-right: 1px solid var(--line); }

.submit {
  margin-top: 22px;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 11px;
  background: color-mix(in oklab, var(--accent) 92%, var(--fg));
  color: #1a160d;
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.submit:hover { transform: translateY(-1px); filter: brightness(1.04); }

.preview-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
  min-height: 14px;
  transition: color 0.2s ease;
}
.preview-note[data-flash="true"] { color: var(--labor); }

.share-note {
  margin-top: 30px;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: color-mix(in oklab, var(--fg) 78%, var(--bg));
  display: flex;
  gap: 13px;
  max-width: 460px;
}
.share-note .pct {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--climate);
  line-height: 1;
  flex: 0 0 auto;
}
.footnote {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 460px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .page { padding: 0 20px; }
  .footer { padding-left: 20px; padding-right: 20px; }
  /* Copyright on its own row; Support · Privacy · Terms together below it. */
  .footer .copy { flex-basis: 100%; }
  .footer .copy + .sep { display: none; }
  .amounts { gap: 7px; }
  .amount { font-size: 17px; padding: 14px 4px; }
  .toc { padding: 20px; }
  .toc ol { columns: 1; }
  .in-short, .doc p, .doc ul, .cat-list { max-width: none; }
}
