/* Warmworth — main stylesheet
 * Mobile-first, system font, calm warm/green palette.
 */

:root {
  --green-900: #0b4d2a;
  --green-700: #0e6b3a;
  --green-500: #1f9d5a;
  --green-50:  #e6f6ec;
  --warm-900: #2a1f12;
  --warm-700: #6b4a2b;
  --warm-500: #c47d40;
  --warm-50:  #fdf3e7;
  --ink:       #11181c;
  --ink-soft:  #4a5560;
  --line:      #e4e7eb;
  --bg:        #fcfaf6;
  --white:     #ffffff;
  --error:     #c0392b;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 6px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.06);
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; margin-top: 0; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; color: var(--ink); font-size: 1.15rem;
  text-decoration: none;
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--green-700); color: var(--white);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
}
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { color: var(--ink-soft); font-weight: 500; }
.site-nav a.btn { color: var(--white); }
.header-tag { color: var(--ink-soft); font-size: .9rem; }
@media (max-width: 640px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--white);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-900); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(900px 400px at 90% -10%, var(--green-50), transparent 60%),
    radial-gradient(700px 300px at -10% 110%, var(--warm-50), transparent 60%);
}
.hero-inner {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1.2fr 1fr; }
}
.eyebrow {
  display: inline-block;
  background: var(--green-50);
  color: var(--green-900);
  font-size: .82rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  letter-spacing: .02em;
}
.hero h1 em { color: var(--green-700); font-style: normal; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 38em; }
.trust-row {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 1rem .9rem;
  padding: 0; margin: 1.5rem 0 0;
  color: var(--ink-soft); font-size: .92rem;
}

/* Floating grant cards visual */
.grant-card-stack {
  position: relative;
  height: 320px;
}
.grant-mini {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  min-width: 200px;
}
.grant-mini .grant-amount { font-size: 1.65rem; font-weight: 800; color: var(--green-700); line-height: 1; }
.grant-mini .grant-label { color: var(--ink-soft); font-size: .92rem; margin-top: .3rem; }
.grant-mini--1 { top: 10%; left: 0; transform: rotate(-3deg); }
.grant-mini--2 { top: 35%; left: 38%; transform: rotate(2deg); z-index: 2; }
.grant-mini--3 { top: 65%; left: 10%; transform: rotate(-2deg); }

/* ---------- How it works ---------- */
.how { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.steps { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--green-50); color: var(--green-900);
  border-radius: 999px; font-weight: 800; margin-bottom: .8rem;
}

/* ---------- Grants preview ---------- */
.grants-preview { padding: clamp(2.5rem, 5vw, 4rem) 0; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grants-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 640px) { .grants-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grants-grid { grid-template-columns: repeat(3, 1fr); } }
.grant-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; background: var(--white);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.grant-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--green-500); }
.grant-card-amount {
  display: inline-block;
  font-size: 1.4rem; font-weight: 800;
  color: var(--green-700);
  margin-bottom: .5rem;
}
.grant-card h3 { margin: 0 0 .35rem; }
.grant-card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.cta-row { margin-top: 2rem; text-align: center; }

/* ---------- Trust band ---------- */
.trust-band {
  background: var(--warm-50);
  padding: 2rem 0;
  text-align: center;
}
.trust-band p { max-width: 760px; margin: 0 auto; color: var(--warm-900); }

/* ---------- Footer ---------- */
.site-footer { padding: 2rem 0; background: var(--ink); color: rgba(255,255,255,.75); }
.site-footer a { color: rgba(255,255,255,.85); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-nav { display: flex; gap: 1.25rem; }

/* ---------- Quiz ---------- */
.quiz-body { background: var(--bg); }
.quiz-main { padding: 2rem 0 4rem; }
.quiz-container { max-width: 720px; }

.progress {
  height: 8px; background: var(--line);
  border-radius: 999px; overflow: hidden;
  margin-bottom: .5rem;
}
.progress-fill { height: 100%; background: var(--green-500); transition: width .35s ease; border-radius: 999px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.5rem; }

.quiz-form { position: relative; }
.step-card {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-sm);
  margin: 0; padding: clamp(1.4rem, 4vw, 2.4rem);
}
.step-card.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.q-label {
  font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  font-weight: 700; line-height: 1.3;
  margin: 0 0 .4rem;
  padding: 0;
  display: block;
}
.q-help { color: var(--ink-soft); margin: 0 0 1.2rem; font-size: .96rem; }
.q-error { color: var(--error); font-size: .9rem; margin-top: .5rem; }

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: .85rem 1rem;
  font-size: 1.05rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus {
  outline: none; border-color: var(--green-500); background: var(--white);
}

.option-grid {
  display: grid; gap: .6rem;
  grid-template-columns: 1fr;
  margin: 0 0 1rem;
}
.option-grid--cols-2 { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .option-grid--cols-2 { grid-template-columns: 1fr 1fr; }
}

.opt {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all .12s ease;
  user-select: none;
}
.opt:hover { border-color: var(--green-500); background: var(--white); }
.opt input { accent-color: var(--green-700); transform: scale(1.15); }
.opt input:checked + span { font-weight: 600; color: var(--green-900); }
.opt:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }

.q-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1.6rem;
}
.q-nav .btn-primary { margin-left: auto; }

/* ---------- Results ---------- */
.results { margin-top: 1.5rem; }
.results-summary { text-align: center; margin-bottom: 2rem; padding: 0 .5rem; }
.results-summary h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }

.results-list {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
.result-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.result-card-header { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.result-amount {
  font-size: 1.3rem; font-weight: 800; color: var(--green-700);
  background: var(--green-50);
  padding: .15rem .65rem;
  border-radius: var(--radius-sm);
}
.result-card h3 { margin: 0; flex: 1; min-width: 0; }
.result-tagline { width: 100%; color: var(--ink-soft); font-size: .94rem; margin: .2rem 0 0; }
.result-summary { color: var(--ink); margin: .6rem 0 1rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.results-lead-capture {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.lead-form {
  display: grid; gap: .8rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .lead-form { grid-template-columns: 1fr 1fr; } }
.lead-form input[type="email"], .lead-form input[type="tel"], .lead-form input[type="text"] { grid-column: span 1; }
@media (max-width: 639px) { .lead-form input { grid-column: 1 / -1; } }
.lead-form button { grid-column: 1 / -1; }
.lead-form .q-help { grid-column: 1 / -1; margin: 0; font-size: .88rem; }

/* ---------- Article pages ---------- */
.article-body { padding: 2rem 0 4rem; }
.container--narrow { max-width: 780px; }
.article-body h2 { margin-top: 2.5rem; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.article-body h3 { margin-top: 1.8rem; font-size: 1.15rem; }
.article-body p, .article-body ul, .article-body ol { font-size: 1.05rem; line-height: 1.7; color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { color: var(--ink); }

.breadcrumbs {
  font-size: .92rem; color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--green-700); }

.article-header {
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.article-header h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top: .5rem; }
.byline { color: var(--ink-soft); font-size: .95rem; margin: .5rem 0 0; }

.callout {
  background: var(--green-50);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}
.callout--tldr h2 { margin-top: 0; color: var(--green-900); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; }
.callout--tldr ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.callout--tldr li { margin-bottom: .4rem; }
.callout--warning { background: var(--warm-50); border-left-color: var(--warm-500); }
.callout--warning h3 { margin: 0 0 .5rem; color: var(--warm-900); }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: .96rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table thead th {
  background: var(--bg);
  text-align: left;
  padding: .85rem 1rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
}
.data-table tbody td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .row-closed td { color: var(--ink-soft); font-style: italic; }
.data-table a { text-decoration: none; color: var(--green-700); font-weight: 500; }
.data-table a:hover { text-decoration: underline; }

.cta-inline {
  background: var(--white);
  border: 1.5px solid var(--green-500);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
}
.cta-inline p { margin: 0; flex: 1 1 260px; }
.cta-inline--final { background: var(--green-50); border-color: var(--green-700); padding: 2rem 1.6rem; text-align: center; flex-direction: column; }
.cta-inline--final h3 { margin: 0; font-size: 1.4rem; }

.faq h3 { font-weight: 600; }
.faq h3::before { content: "Q. "; color: var(--green-700); font-weight: 800; }

.sources-list { padding-left: 1.5rem; }
.sources-list li { margin-bottom: .35rem; font-size: .95rem; }
.sources-list a { word-break: break-word; }

.changelog {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.4rem;
  list-style: none;
  font-size: .94rem;
  color: var(--ink-soft);
}
.changelog li { margin-bottom: .5rem; }
.changelog li:last-child { margin-bottom: 0; }
