/* Heartland Partners site styles.
   Direction C: pine green on white, with black panels.
   Change colors and fonts only through the tokens in :root.

   Typeface: Allo by Josh Puckett, SIL Open Font License 1.1 (fonts/OFL.txt).
   This file has roundness fixed at 50, the font's "Friendly" setting.
   Optical size is automatic: large headings get the tighter Display cut. */

@font-face {
  font-family: 'Allo';
  src: url('../fonts/AlloVariableFriendly.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #1D4436;
  --ink: #121512;
  --body: #313531;
  --muted: #5E635E;
  --bg: #F1F2EE;
  --line: #E1E3DD;
  --tile: #D5D8D0;
  --field: #878A84;
  --dark2: #222622;
  --on-dark: #D3D6D2;
  --on-dark-muted: #A0A49F;
  --white: #FFFFFF;
  --focus: #5E8A6E;
  --error: #9B2C1F;
  --shadow: rgba(18, 21, 18, 0.25);
  --tile-shade: linear-gradient(180deg, rgba(18, 21, 18, 0) 40%, rgba(18, 21, 18, 0.8) 100%);
  --display: 'Allo', system-ui, 'Segoe UI', Arial, sans-serif;
  --text: 'Allo', system-ui, 'Segoe UI', Arial, sans-serif;
  --wrap: 1240px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }
input[type=range] { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #6F7570; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
section[id], main[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; padding: 12px 16px; background: var(--ink); color: var(--white); z-index: 10; }
.skip:focus { left: 12px; top: 12px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Type */
.eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-feature-settings: 'case' 1; color: var(--muted); }
.h2 { margin: 0; font-family: var(--display); font-size: clamp(36px, 4.6vw, 66px); line-height: 1; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; text-wrap: balance; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--body); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--white); font-size: 16px; font-weight: 600; text-decoration: none; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--ink { background: var(--ink); }
.btn--line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__name { font-family: var(--display); font-size: 25px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.nav { display: flex; gap: 26px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 88px; }
.hero__copy { flex: 1.1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.pill { align-self: flex-start; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 600; color: var(--body); }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(46px, 6.5vw, 96px); line-height: 0.98; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; text-wrap: balance; }
.hero h1 span { color: var(--accent); }
.hero__lede { margin: 0; max-width: 30em; font-size: 21px; line-height: 1.5; color: var(--body); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: var(--body); }
.checks li { display: flex; align-items: center; gap: 8px; }
.hero__art { flex: 1 1 440px; min-width: 0; position: relative; height: 600px; border-radius: 32px; overflow: hidden; background: var(--tile); }
.hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offer-card { position: absolute; left: 20px; right: 20px; bottom: 20px; max-width: 360px; padding: 22px; background: var(--white); border-radius: 22px; box-shadow: 0 20px 50px var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.offer-card__label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-feature-settings: 'case' 1; color: var(--accent); }
.offer-card__rows { display: flex; flex-direction: column; font-size: 16px; }
.offer-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.offer-card__row:last-child { padding-bottom: 0; }
.offer-card__row span:first-child { color: var(--muted); }
.offer-card__row span:last-child { font-weight: 600; }
.offer-card__row .price { font-family: var(--display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Section shells */
.band { background: var(--bg); }
.band__in { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.head__main { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.head__main--wide { max-width: 860px; }
.head__side { margin: 0; max-width: 400px; font-size: 18px; line-height: 1.55; color: var(--body); }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }

/* Land we buy */
.tiles { flex: 1.2 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-content: stretch; gap: 12px; }
.tile { position: relative; display: block; min-height: 210px; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--tile); text-align: left; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__shade { position: absolute; inset: 0; background: var(--tile-shade); }
.tile__ring { position: absolute; inset: 0; border-radius: 20px; border: 4px solid transparent; }
.tile[aria-pressed="true"] .tile__ring { border-color: var(--accent); }
.tile__flag { position: absolute; top: 12px; right: 12px; padding: 5px 11px; border-radius: 999px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 600; display: none; }
.tile[aria-pressed="true"] .tile__flag { display: block; }
.tile__name { position: absolute; left: 16px; right: 16px; bottom: 14px; color: var(--white); font-family: var(--display); font-size: 24px; line-height: 1.05; font-weight: 700; letter-spacing: 0; }
.land-panel { flex: 1 1 380px; min-width: 0; padding: 30px; border-radius: 24px; background: var(--white); display: flex; flex-direction: column; gap: 16px; }
.land-panel h3 { margin: 0; font-family: var(--display); font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; }
.land-panel p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--body); }
.land-panel .label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-feature-settings: 'case' 1; color: var(--muted); line-height: 1.4; }
.land-panel ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.5; }
.land-panel .btn { margin-top: auto; align-self: flex-start; min-height: 50px; padding: 0 22px; }

/* Offer form */
.offer { background: var(--accent); color: var(--white); }
.offer__in { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.offer__copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.offer__copy h2, .offer__copy h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 4.1vw, 58px); line-height: 1.02; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; text-wrap: balance; }
.offer__copy p { margin: 0; font-size: 18px; line-height: 1.55; }
.offer__form { flex: 1.2 1 480px; min-width: 0; }
.card-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; padding: 24px; background: var(--white); color: var(--ink); border-radius: 24px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 16px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea { width: 100%; min-height: 52px; padding: 0 16px; font-size: 17px; color: var(--ink); background: var(--white); border: 1px solid var(--field); border-radius: 14px; }
.field textarea { padding: 14px 16px; min-height: 120px; line-height: 1.5; resize: vertical; }
.field input[name=land] { font-feature-settings: 'cv01' 1, 'cv03' 1, 'cv04' 1; }
.field .hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--bg); font-size: 14px; line-height: 1.5; color: var(--body); }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.consent a { color: var(--ink); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-foot p { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.form-foot a { color: var(--body); }
.form-error { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 12px; background: #FBEDEA; color: var(--error); font-size: 15px; line-height: 1.5; }
.form-done { margin: 0; padding: 24px; background: var(--white); color: var(--ink); border-radius: 24px; font-size: 18px; line-height: 1.5; }

/* Calculator */
.calc-in { flex: 1.25 1 520px; min-width: 0; padding: 28px; background: var(--white); border: 1px solid var(--tile); border-radius: 24px; display: flex; flex-direction: column; gap: 20px; }
.calc-in > p { margin: 0; font-size: 15px; color: var(--muted); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 24px; }
.money { position: relative; }
.money span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--muted); }
.field .money input[type=text] { padding: 0 18px 0 34px; font-variant-numeric: tabular-nums; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-head output { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.field input[type=range] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); }
.calc-out { flex: 1 1 420px; min-width: 0; padding: 28px; background: var(--ink); color: var(--white); border-radius: 24px; display: flex; flex-direction: column; gap: 18px; }
.calc-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.calc-box { min-width: 0; padding: 20px; border-radius: 18px; background: var(--dark2); display: flex; flex-direction: column; gap: 6px; }
.calc-box__label { margin: 0; font-size: 14px; font-weight: 600; color: var(--on-dark); }
.calc-box__amt { margin: 0; font-family: var(--display); font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.calc-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--on-dark); }
.calc-rows span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-sum { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 500; }
.calc-note { margin: 0; font-size: 16px; line-height: 1.5; color: var(--on-dark); }
.calc-out .btn { margin-top: auto; align-self: flex-start; }
.calc-fine { margin: 0; font-size: 13px; line-height: 1.5; color: var(--on-dark-muted); }

/* Plain answers */
.answers { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.faq article { padding: 26px; border-radius: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.faq h3 { margin: 0; font-family: var(--display); font-size: 23px; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.faq p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }

/* Newsletter */
.letter { padding-bottom: 96px; }
.letter__in { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; padding: 44px; border-radius: 28px; background: var(--ink); color: var(--white); }
.letter__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.letter__copy .eyebrow { color: var(--on-dark); }
.letter__copy h2 { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.02; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; text-wrap: balance; }
.letter__copy p:last-child { margin: 0; font-size: 17px; line-height: 1.55; color: var(--on-dark); }
.letter__form { flex: 1 1 380px; min-width: 0; }
.letter__form form { display: flex; flex-wrap: wrap; gap: 10px; }
.letter__form label { flex: 1 1 100%; font-size: 15px; font-weight: 600; }
.letter__form input[type=email] { flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 16px; font-size: 17px; color: var(--ink); background: var(--white); border: 0; border-radius: 14px; }
.letter__form p { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--on-dark-muted); }
.letter__form .form-error { background: #3A1F1B; color: #F3C9C2; }
.letter__done { margin: 0; padding: 20px 22px; border-radius: 18px; background: var(--dark2); font-size: 17px; line-height: 1.5; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__in { padding-top: 40px; padding-bottom: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.site-footer__brand { display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.site-footer__name { font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.site-footer nav { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; max-width: 520px; }
.site-footer a { color: var(--body); }

/* Simple pages: builders, legal, not found */
.page-top { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 16px; }
.page-top h1 { margin: 0; max-width: 16em; font-family: var(--display); font-size: clamp(38px, 5vw, 70px); line-height: 1; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; text-wrap: balance; }
.page-top p { margin: 0; max-width: 34em; font-size: 20px; line-height: 1.5; color: var(--body); }
.page-top .pill { font-size: 14px; line-height: 1.5; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-top: 64px; padding-bottom: 96px; }
.cards article { padding: 26px; border-radius: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.cards h2 { margin: 0; font-family: var(--display); font-size: 23px; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.cards p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }
.legal { max-width: 800px; margin: 0 auto; padding: 64px var(--gutter) 96px; }
.legal h1 { margin: 0 0 8px; font-family: var(--display); font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; font-weight: 800; letter-spacing: -0.015em; word-spacing: 0.06em; }
.legal .date { margin: 0 0 32px; font-size: 15px; color: var(--muted); }
.legal h2 { margin: 36px 0 10px; font-family: var(--display); font-size: 25px; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: var(--body); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--ink); }

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .site-header__in { padding-top: 12px; padding-bottom: 12px; }
  .logo__name { font-size: 21px; }
  .nav { order: 3; flex: 1 1 100%; gap: 18px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; white-space: nowrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 160px; }
  .tile__name { font-size: 21px; left: 14px; right: 14px; bottom: 12px; }
  .tile__flag { top: 10px; right: 10px; }
  .hero { padding-top: 40px; padding-bottom: 56px; gap: 32px; }
  .hero__lede { font-size: 19px; }
  .hero__art { height: 440px; border-radius: 24px; }
  .band__in, .answers { padding-top: 64px; padding-bottom: 64px; }
  .offer__in { padding-top: 56px; padding-bottom: 56px; }
  .letter { padding-bottom: 64px; }
  .letter__in { padding: 28px; }
  .card-form { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .land-panel h3 { font-size: 32px; }
  .calc-in, .calc-out, .land-panel { padding: 22px; }
  .cards { padding-top: 48px; padding-bottom: 64px; }
  section[id], main[id] { scroll-margin-top: 120px; }
}

.only-narrow { display: none; }
@media (max-width: 520px) {
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .logo__name { font-size: 20px; }
  .site-header .btn--sm { min-height: 40px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
