/* ====================================================================
   Community Portal — marketing site
   Civic Ledger brand: pine / stone / brass, Fraunces display + Inter.
   Token names mirror the product (communityportal-app) theme system.
   ==================================================================== */

:root {
  --pine-50: #eef6f1;
  --pine-100: #d7eadf;
  --pine-300: #84bba0;
  --pine-400: #539c7b;
  --pine-600: #1f7350;
  --pine-700: #1a5c41;
  --pine-800: #14382a;
  --pine-900: #11291f;
  --pine-950: #0c1f18;

  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;

  --brass-100: #fdf3d7;
  --brass-200: #f3e3b3;
  --brass-600: #9a5d07;
  --rose-50: #fff1f2;
  --rose-700: #be123c;

  --ink: var(--stone-800);
  --ink-soft: var(--stone-500);
  --paper: var(--stone-50);
  --hairline: var(--stone-200);

  --display: "Fraunces", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgb(28 25 23 / 0.04), 0 4px 16px -8px rgb(28 25 23 / 0.10);
  --shadow-lift: 0 2px 4px rgb(28 25 23 / 0.05), 0 16px 36px -16px rgb(28 25 23 / 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga', 'cv02', 'cv03', 'cv04', 'cv11';
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; color: var(--stone-900); line-height: 1.15; }
h1 { font-size: clamp(36px, 5.4vw, 56px); }
h2 { font-size: clamp(27px, 3.6vw, 36px); }
h3 { font-size: 19px; }

a { color: var(--pine-700); }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pine-700); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; height: 1px; width: 42px; background: var(--pine-100); }

.cite { font-size: 12px; font-style: italic; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 9px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--pine-700); color: #fff;
  box-shadow: 0 1px 2px rgb(12 31 24 / 0.35), inset 0 1px 0 rgb(255 255 255 / 0.12);
}
.btn-primary:hover { background: var(--pine-800); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--stone-300); }
.btn-ghost:hover { border-color: var(--pine-400); }
.btn-lg { height: 54px; padding: 0 32px; font-size: 16px; }

/* ---------- header ---------- */
.site-header { background: rgb(250 250 249 / 0.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--hairline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 34px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--stone-700); text-decoration: none; }
.site-nav a:hover { color: var(--pine-700); }
.site-nav .nav-cta {
  color: #fff; background: var(--pine-700); padding: 9px 16px; border-radius: 8px; font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--pine-800); color: #fff; }
@media (max-width: 820px) { .site-nav a:not(.nav-cta) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 88px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 60% at 80% 0%, var(--pine-50), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--pine-700); }
.hero .lede { font-size: 18px; color: var(--stone-700); max-width: 520px; }
.hero-ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-fine { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

.statute-strip {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--brass-100); border: 1px solid var(--brass-200); border-left: 3px solid var(--brass-600);
  border-radius: 10px; padding: 10px 16px; margin-top: 28px;
  font-size: 13.5px; color: var(--stone-700);
}
.statute-strip b { color: var(--brass-600); font-variant-numeric: tabular-nums; }

@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- product peek (mini Civic Ledger dashboard) ---------- */
.peek {
  background: #fff; border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: var(--shadow-lift); padding: 22px; position: relative;
}
.peek::after {
  content: "the actual product — not an illustration";
  position: absolute; top: -11px; right: 18px;
  background: var(--pine-950); color: #fff; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; border-radius: 9999px; padding: 4px 12px;
}
.peek-strip {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--brass-100); border-left: 3px solid var(--brass-600);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 12px;
}
.peek-strip b { color: var(--brass-600); }
.peek-strip .cite { margin-left: auto; }
.peek-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.peek-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.peek-ring svg { transform: rotate(-90deg); }
.peek-ring-track { stroke: var(--stone-100); }
.peek-ring-value { stroke: var(--pine-600); stroke-linecap: round; stroke-dasharray: 251.33; stroke-dashoffset: 35.2; }
.peek-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 24px; font-weight: 600; }
.peek-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; flex: 1; }
.peek-stat { border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 14px; }
.peek-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; }
.peek-num { font-family: var(--display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.peek-num.ok { color: var(--pine-700); }
.peek-rows { border-top: 1px solid var(--stone-100); }
.peek-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px 9px 10px; border-left: 3px solid transparent; border-bottom: 1px solid var(--stone-100); font-size: 12.5px; }
.peek-row:last-child { border-bottom: none; }
.peek-row.crit { border-left-color: var(--rose-700); }
.peek-row.warn { border-left-color: var(--brass-600); }
.peek-chip { margin-left: auto; font-size: 10.5px; font-weight: 700; border-radius: 9999px; padding: 2px 9px; white-space: nowrap; }
.peek-chip.crit { background: var(--rose-50); color: var(--rose-700); }
.peek-chip.warn { background: var(--brass-100); color: var(--brass-600); }
.peek-chip.ok { background: var(--pine-50); color: var(--pine-700); }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { color: var(--stone-700); font-size: 16.5px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.centered .eyebrow { justify-content: center; }
.section-head.centered .eyebrow::after { display: none; }

/* stakes ledger */
.stakes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.stakes-copy p { color: var(--stone-700); margin-bottom: 16px; font-size: 16px; }
.stakes-copy b { color: var(--stone-900); }
.ledger-card { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.ledger-card-head { padding: 16px 22px 12px; font-family: var(--display); font-size: 18px; font-weight: 600; }
.ledger-line { display: flex; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--stone-100); align-items: baseline; }
.ledger-line .amt { font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--rose-700); min-width: 86px; font-variant-numeric: tabular-nums; }
.ledger-line .what { font-size: 14px; color: var(--stone-700); }
.ledger-line .what b { color: var(--stone-900); }
.ledger-foot { padding: 14px 22px; background: var(--pine-50); font-size: 13.5px; color: var(--pine-800); border-top: 1px solid var(--pine-100); }
.ledger-foot b { font-weight: 700; }
@media (max-width: 880px) { .stakes-grid { grid-template-columns: 1fr; } }

/* checklist */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 880px; }
.check-item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-card); }
.check-tick { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--pine-50); color: var(--pine-700); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.check-item .t { font-size: 14.5px; font-weight: 600; }
.check-item .d { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 720px) { .check-grid { grid-template-columns: 1fr; } }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: 26px 24px; box-shadow: var(--shadow-card); position: relative; }
.step-num { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--brass-600); }
.step h3 { margin: 10px 0 8px; }
.step p { font-size: 14px; color: var(--stone-700); }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* personas */
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.persona { border-radius: 16px; padding: 32px 30px; position: relative; overflow: hidden; }
.persona-board { background: var(--pine-950); color: rgb(255 255 255 / 0.85); }
.persona-board::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgb(132 187 160 / 0.12), transparent 55%); pointer-events: none; }
.persona-pm { background: #fff; border: 1px solid var(--hairline); box-shadow: var(--shadow-card); }
.persona h3 { font-size: 22px; margin: 8px 0 10px; }
.persona-board h3 { color: #fff; }
.persona p { font-size: 14.5px; }
.persona .eyebrow { color: var(--brass-600); }
.persona-board .eyebrow { color: var(--pine-300); }
.persona-board .eyebrow::after { background: rgb(255 255 255 / 0.15); }
.persona a.plink { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 14px; }
.persona-board a.plink { color: var(--pine-300); }
@media (max-width: 820px) { .persona-grid { grid-template-columns: 1fr; } }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card { background: #fff; border: 1px solid var(--hairline); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--pine-400); box-shadow: var(--shadow-lift); position: relative; }
.price-card.featured::before {
  content: "most associations"; position: absolute; top: -11px; left: 24px;
  background: var(--pine-700); color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; border-radius: 9999px; padding: 4px 12px;
}
.price-name { font-family: var(--display); font-size: 19px; font-weight: 600; }
.price-amt { font-family: var(--display); font-size: 40px; font-weight: 600; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.price-amt small, .price-amt .price-per { font-size: 15px; color: var(--ink-soft); font-family: var(--sans); font-weight: 500; }
.price-billed { font-size: 12.5px; color: var(--ink-soft); min-height: 18px; margin: -2px 0 2px; }
.price-for { font-size: 13px; color: var(--ink-soft); margin: 8px 0 18px; }
.price-list { list-style: none; flex: 1; margin-bottom: 20px; }
.price-list li { font-size: 13.5px; color: var(--stone-700); padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--stone-100); }
.price-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--pine-600); font-weight: 700; }
.price-cta { width: 100%; }
.price-note { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--ink-soft); }
/* two-tier layout: two cards centered, not stretched full width */
.price-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 880px) { .price-grid { grid-template-columns: 1fr; } .price-grid-2 { max-width: 420px; } }

/* pricing monthly/annual toggle */
.price-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.price-toggle-label { font-size: 15px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: color 150ms ease; }
.price-toggle-label.is-active { color: var(--stone-900); }
.price-switch { position: relative; width: 52px; height: 30px; border-radius: 9999px; border: none; background: var(--stone-300); cursor: pointer; padding: 0; transition: background 150ms ease; flex-shrink: 0; }
.price-switch[aria-checked="true"] { background: var(--pine-700); }
.price-switch:focus-visible { outline: 2px solid var(--pine-600); outline-offset: 2px; }
.price-switch-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.price-switch[aria-checked="true"] .price-switch-knob { transform: translateX(22px); }
.price-save { font-size: 13.5px; font-weight: 700; color: var(--pine-700); }
@media (prefers-reduced-motion: reduce) { .price-switch-knob { transition: none; } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--hairline); border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 22px; color: var(--pine-600); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 22px 20px; font-size: 14.5px; color: var(--stone-700); }
.faq .a p + p { margin-top: 10px; }

/* form */
.form-section { background: var(--pine-950); color: rgb(255 255 255 / 0.85); position: relative; overflow: hidden; }
.form-section::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 70% at 15% 0%, rgb(132 187 160 / 0.10), transparent 55%); pointer-events: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; position: relative; }
.form-section h2 { color: #fff; margin: 14px 0; }
.form-section .eyebrow { color: var(--pine-300); }
.form-section .eyebrow::after { background: rgb(255 255 255 / 0.15); }
.form-section .pitch { font-size: 16px; }
.form-section .pitch b { color: #fff; }
.form-points { list-style: none; margin-top: 20px; }
.form-points li { padding: 8px 0 8px 30px; position: relative; font-size: 14.5px; border-top: 1px solid rgb(255 255 255 / 0.08); }
.form-points li::before { content: "→"; position: absolute; left: 2px; color: var(--pine-300); }
.waitlist-form { background: #fff; border-radius: 16px; padding: 30px 28px; color: var(--ink); box-shadow: var(--shadow-lift); }
.waitlist-form h3 { font-size: 20px; margin-bottom: 4px; }
.waitlist-form .sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--stone-700); }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--stone-300);
  border-radius: 8px; font-size: 14.5px; font-family: var(--sans); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--pine-600); box-shadow: 0 0 0 3px var(--pine-50); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-fine { font-size: 11.5px; color: var(--ink-soft); margin-top: 12px; line-height: 1.5; }
@media (max-width: 880px) { .form-grid { grid-template-columns: 1fr; } }

/* article pages (law explainer) */
.article { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.article h1 { font-size: clamp(32px, 4.5vw, 44px); margin: 16px 0 12px; }
.article .updated { font-size: 13px; color: var(--ink-soft); margin-bottom: 32px; }
.article h2 { font-size: 26px; margin: 44px 0 14px; }
.article p, .article li { font-size: 16px; color: var(--stone-700); }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 16px 22px; }
.article li { margin-bottom: 8px; }
.article .tldr {
  background: var(--pine-50); border: 1px solid var(--pine-100); border-left: 3px solid var(--pine-600);
  border-radius: 10px; padding: 18px 22px; margin-bottom: 28px; font-size: 15.5px;
}
.article .tldr b { color: var(--pine-800); }
.article .callout {
  background: var(--brass-100); border: 1px solid var(--brass-200); border-left: 3px solid var(--brass-600);
  border-radius: 10px; padding: 16px 20px; margin: 20px 0; font-size: 14.5px;
}
.article table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; }
.article th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.article td { padding: 10px 12px; border-bottom: 1px solid var(--stone-100); color: var(--stone-700); }

/* footer */
.site-footer { background: var(--pine-950); color: rgb(255 255 255 / 0.7); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.footer-logo { height: 30px; width: auto; display: block; margin-bottom: 14px; }
.footer-note { font-size: 13.5px; max-width: 320px; }
.footer-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: rgb(255 255 255 / 0.4); margin-bottom: 12px; }
.footer-grid a { display: block; color: rgb(255 255 255 / 0.75); text-decoration: none; font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; font-size: 12px; color: rgb(255 255 255 / 0.45); flex-wrap: wrap; }
.footer-disclaimer { max-width: 560px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
