/* =========================================================================
   SavePropertyTax — design system (flat)
   Paper cream + deep forest ink + gold accent. Fraunces / Public Sans.
   Mobile-first: base rules target small screens; breakpoints layer up.
   Flat aesthetic: solid fills, hairline borders, minimal shadow, no gloss.
   ========================================================================= */

:root {
  /* palette */
  --paper:        #FAF5EA;
  --paper-2:      #F2EAD7;
  --ink:          #16271F;   /* deep forest, near-black */
  --forest:       #1F4A38;
  --forest-2:     #2C6A4F;
  --gold:         #C28B2B;
  --gold-soft:    #E7C56A;
  --terracotta:   #BE5F45;
  --line:         #E2D8C2;
  --line-strong:  #CBBD9C;
  --muted:        #5C6660;

  /* fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2.05rem);
  --step-3:  clamp(1.95rem, 1.6rem + 1.8vw, 2.95rem);
  --step-4:  clamp(2.45rem, 1.9rem + 2.9vw, 4.25rem);
  --step-5:  clamp(2.9rem, 2.1rem + 4.2vw, 5.6rem);

  /* structure */
  --maxw: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 12px;
  --radius-lg: 20px;
  /* flat: shadows are barely-there, structure comes from borders */
  --shadow-sm: 0 1px 2px rgba(22,39,31,.04);
  --shadow-md: 0 2px 8px rgba(22,39,31,.06);

  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--gold-soft); color: var(--ink); }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -.015em;
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-5); font-weight: 540; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
p { text-wrap: pretty; }
.lede { font-size: var(--step-1); color: #2c3a33; line-height: 1.5; }

.serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 500; }
.u-gold { color: var(--gold); }
.u-forest { color: var(--forest-2); }

/* highlight pen under key words */
.mark {
  background: linear-gradient(transparent 62%, var(--gold-soft) 62% 94%, transparent 94%);
  padding: 0 .04em;
}

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: var(--gold); border-radius: 2px; }

/* ---------- buttons (flat: solid fills, no gradient, no lift) ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--bg); color: var(--fg);
  font-weight: 650; font-size: var(--step-0);
  padding: .95rem 1.5rem; border: 1.5px solid transparent; border-radius: 10px;
  line-height: 1; text-align: center;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { background: #0e1a13; }
.btn--gold { --bg: var(--gold); --fg: #241803; }
.btn--gold:hover { background: #b07f25; }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--lg { padding: 1.1rem 1.8rem; font-size: var(--step-1); }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.02em; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.nav-links { display: none; align-items: center; gap: 1.9rem; }
.nav-links a { font-weight: 550; font-size: .98rem; color: #36433c; transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content:""; position:absolute; left:0; right:0; bottom:-5px; height:2px; background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .22s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: none; }

@media (min-width: 880px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}

/* ---------- locale ribbon ---------- */
.locale-bar {
  background: var(--ink); color: var(--paper);
  font-size: .82rem; text-align: center; padding: .5rem var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap;
}
.locale-bar b { color: var(--gold-soft); font-weight: 700; }
.locale-bar svg { color: var(--gold-soft); }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero-copy { max-width: 38rem; }
.hero h1 { margin-top: 1.1rem; }
.hero h1 .swash { font-style: italic; font-weight: 480; color: var(--forest-2); }
.hero .lede { margin-top: 1.35rem; max-width: 33rem; }

.trust-row { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; margin-top: 2rem; align-items: center; }
.trust-stat { display: flex; flex-direction: column; }
.trust-stat b { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1; }
.trust-stat span { font-size: .82rem; color: var(--muted); margin-top: .3rem; max-width: 14ch; }
.trust-sep { width: 1px; align-self: stretch; background: var(--line-strong); }

/* lead capture (flat) */
.lead-card {
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.1rem);
  position: relative;
}
.lead-card .tag {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--forest-2); background: var(--paper-2); padding: .32rem .7rem; border-radius: 8px;
}
.lead-card h2 { font-size: var(--step-2); margin-top: .9rem; }
.lead-card .sub { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
.field { margin-top: 1rem; }
.field label { display: block; font-size: .8rem; font-weight: 650; letter-spacing: .02em; color: #3a463f; margin-bottom: .35rem; }
.input {
  width: 100%; font: inherit; font-size: 1rem;
  padding: .9rem 1rem; border: 1.5px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9aa39d; }
.input:focus { outline: none; border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(44,106,79,.16); }
.lead-card .btn { margin-top: 1.1rem; }
.fineprint { font-size: .8rem; color: var(--muted); margin-top: .9rem; text-align: center; line-height: 1.45; }
.fineprint svg { display: inline; vertical-align: -2px; }

/* success state */
.lead-success { display: none; text-align: center; padding: 1rem 0; }
.lead-card.is-done .lead-form { display: none; }
.lead-card.is-done .lead-success { display: block; animation: pop .4s var(--ease) both; }
.lead-success .check { width: 60px; height: 60px; margin: 0 auto 1rem; }
.lead-success h2 { font-size: var(--step-2); }
.lead-success p { color: var(--muted); margin-top: .5rem; }

@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
}

/* flat locale badge on the card */
.savings-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .7rem; margin-bottom: 1rem; font-size: .82rem; font-weight: 600;
}
.savings-chip svg { color: var(--forest-2); }

/* ---------- trust band ---------- */
.band {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper-2); padding-block: 1.05rem; overflow: hidden;
}
.band-inner { display: flex; align-items: center; gap: 1.6rem 2.2rem; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.band-label { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--ink); flex: none; }
.band-inner .pt { display: inline-flex; align-items: center; gap: .45rem; }
.band-inner .pt svg { color: var(--forest-2); flex: none; }

/* ---------- section heads ---------- */
.section-head { max-width: 40rem; }
.section-head h2 { margin-top: .9rem; }
.section-head p { margin-top: 1rem; color: #3a463f; }
.section--center .section-head { margin-inline: auto; text-align: center; }
.section--center .eyebrow { justify-content: center; }

/* ---------- steps (flat) ---------- */
.steps { display: grid; gap: 1.1rem; margin-top: 2.6rem; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.4rem 1.5rem;
  transition: border-color .2s var(--ease);
}
.step:hover { border-color: var(--line-strong); }
.step .num {
  counter-increment: step; font-family: var(--font-display); font-weight: 600;
  font-size: 2.4rem; color: var(--gold); line-height: 1;
}
.step .num::before { content: "0" counter(step); }
.step h3 { font-size: var(--step-1); margin-top: .7rem; }
.step p { margin-top: .5rem; color: var(--muted); font-size: .95rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- problem / savings split ---------- */
.split { display: grid; gap: clamp(2rem,5vw,3.5rem); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }

/* flat solid colored block */
.figure-card {
  background: var(--ink);
  color: var(--paper); border-radius: var(--radius-lg); padding: clamp(1.8rem, 5vw, 2.6rem);
  position: relative;
}
.figure-card .big {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1; color: #fff; letter-spacing: -.02em;
}
.figure-card .big small { font-size: .35em; color: var(--gold-soft); vertical-align: top; font-weight: 600; }
.figure-card .cap { color: rgba(250,245,234,.78); margin-top: .9rem; font-size: 1rem; max-width: 26rem; }
.figure-card .ledger { margin-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.16); padding-top: 1.2rem; display: grid; gap: .8rem; }
.ledger-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; gap: 1rem; }
.ledger-row span:first-child { color: rgba(250,245,234,.75); }
.ledger-row b { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.ledger-row.save { border-top: 1px solid rgba(255,255,255,.16); padding-top: .8rem; }
.ledger-row.save b { color: var(--gold-soft); }
.figure-note { color: rgba(250,245,234,.55); font-size: .76rem; margin-top: 1.1rem; }

.checklist { list-style: none; margin-top: 1.4rem; display: grid; gap: .85rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; font-size: 1rem; }
.checklist li svg { flex: none; margin-top: .2rem; color: var(--forest-2); }

/* ---------- early-adopter / honesty block ---------- */
.founder {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 5vw, 2.8rem); display: grid; gap: 1.4rem;
}
@media (min-width: 760px) { .founder { grid-template-columns: auto 1fr; align-items: start; gap: 2rem; } }
.founder .badge {
  width: 72px; height: 72px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line);
  display: grid; place-items: center; flex: none;
}
.founder h2 { font-size: var(--step-2); }
.founder p { margin-top: .9rem; color: #2c3a33; }
.founder .sign { margin-top: 1.2rem; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--forest); }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; margin-top: 2.4rem; }
.faq details { border-bottom: 1px solid var(--line-strong); padding: .3rem 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem .2rem 1.15rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 520; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { flex: none; width: 26px; height: 26px; position: relative; }
.faq summary .icon::before, .faq summary .icon::after { content:""; position:absolute; inset:0; margin:auto; background: var(--gold); border-radius:2px; }
.faq summary .icon::before { width: 16px; height: 2.5px; }
.faq summary .icon::after { width: 2.5px; height: 16px; transition: transform .25s var(--ease); }
.faq details[open] summary .icon::after { transform: rotate(90deg); }
.faq .answer { padding: 0 .2rem 1.3rem; color: #3a463f; max-width: 44rem; }

/* ---------- final CTA (flat) ---------- */
.cta-band { text-align: center; }
.cta-band .inner {
  background: var(--paper-2);
  border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 7vw, 4.5rem) var(--gutter); position: relative;
}
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band p { max-width: 46ch; margin: 1.1rem auto 0; color: #3a463f; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.8rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(250,245,234,.75); padding-block: clamp(2.5rem,6vw,4rem) 2rem; margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer .brand { color: var(--paper); }
.site-footer .blurb { margin-top: 1rem; max-width: 32ch; font-size: .92rem; line-height: 1.6; }
.foot-col h4 { font-family: var(--font-body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); font-weight: 700; }
.foot-col ul { list-style: none; margin-top: 1rem; display: grid; gap: .7rem; }
.foot-col a { font-size: .95rem; color: rgba(250,245,234,.8); transition: color .2s; }
.foot-col a:hover { color: #fff; }
.foot-bottom { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .82rem; color: rgba(250,245,234,.55); }
.foot-bottom span { max-width: 60ch; }

/* ---------- scroll reveal (only hidden when JS is present to reveal them) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }

/* ---------- hero entrance ---------- */
.js .hero [data-anim] { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) forwards; }
.hero [data-anim="1"] { animation-delay: .04s; }
.hero [data-anim="2"] { animation-delay: .12s; }
.hero [data-anim="3"] { animation-delay: .2s; }
.hero [data-anim="4"] { animation-delay: .28s; }
.hero [data-anim="5"] { animation-delay: .4s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ========================================================================
   BLOG
   ======================================================================== */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem,4vw,2.5rem); }
.page-hero h1 { font-size: var(--step-4); max-width: 18ch; }
.page-hero p { margin-top: 1rem; max-width: 52ch; color: #3a463f; }

.post-grid { display: grid; gap: 1.4rem; margin-top: 2.5rem; }
@media (min-width: 680px) { .post-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3,1fr); } }

.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s var(--ease);
}
.post-card:hover { border-color: var(--line-strong); }
.post-card .thumb { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.post-card .thumb svg { width: 100%; height: 100%; }
.post-card .body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.post-card h3 { font-size: var(--step-1); margin-top: .6rem; letter-spacing: -.01em; }
.post-card p { margin-top: .6rem; font-size: .94rem; color: var(--muted); line-height: 1.55; }
.post-card .readmore { margin-top: auto; padding-top: 1.1rem; font-weight: 650; font-size: .9rem; color: var(--forest-2); display: inline-flex; align-items: center; gap: .4rem; }
.post-card:hover .readmore { gap: .7rem; }
.post-card .readmore::after { content: "→"; transition: transform .2s var(--ease); }

/* article */
.article { padding-block: clamp(2rem,5vw,3.5rem) clamp(3rem,7vw,5rem); }
.article-head { max-width: 46rem; margin-inline: auto; text-align: center; }
.article-head .post-meta { color: var(--gold); }
.article-head h1 { font-size: var(--step-4); margin-top: 1rem; letter-spacing: -.02em; }
.article-head .by { margin-top: 1.3rem; font-size: .9rem; color: var(--muted); }
.prose { max-width: 42rem; margin: clamp(2rem,5vw,3rem) auto 0; font-size: 1.08rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.3rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.6rem; }
.prose h3 { font-size: var(--step-1); margin-top: 2rem; }
.prose p { color: #28332d; }
.prose a { color: var(--forest-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: var(--forest-2); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .6rem; }
.prose li::marker { color: var(--gold); }
.prose blockquote {
  border-left: 3px solid var(--gold); padding: .3rem 0 .3rem 1.3rem; margin-block: 1.8rem;
  font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--forest);
}
.prose strong { font-weight: 700; }
.callout {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; margin-block: 2rem;
}
.callout b { color: var(--forest); }
.article-cta {
  max-width: 46rem; margin: 3rem auto 0; text-align: center;
  background: var(--ink); color: var(--paper); border-radius: var(--radius-lg);
  padding: clamp(2rem,5vw,3rem);
}
.article-cta h3 { color: #fff; font-size: var(--step-2); }
.article-cta p { color: rgba(250,245,234,.8); margin-top: .7rem; }
.article-cta .btn { margin-top: 1.4rem; }

.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; color: var(--forest-2); }
.back-link::before { content: "←"; }

/* utility */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; left:8px; top:-48px; background:var(--ink); color:var(--paper); padding:.6rem 1rem; border-radius:8px; z-index:100; transition: top .2s; }
.skip-link:focus { top:8px; }
