/* Design tokens taken from the source design. */
:root {
  --sand: #F5F3EC;
  --sand-dim: #EEECE2;
  --sage: #E7ECD9;
  --ink: #1A2114;
  --ink-soft: #4A5142;
  --ink-muted: #6B7161;
  --ink-label: #5C6353;
  --green: #5A8D2B;
  --green-dark: #3F651C;
  --green-hover: #4B7A22;
  --green-deep: #33501A;
  --line: #E3E0D4;
  --line-soft: #DDDACD;
  --line-sage: #CFD6BC;
  --line-cool: #CBD1BC;
  --forest: #1E2A12;
  --forest-text: #F0EFE6;
  --forest-muted: #C7CDBB;
  --forest-accent: #A8C77E;
  --forest-dot: #8FBB55;
  --clay: #A55A28;
  --footer: #161E10;
  --footer-text: #9BA391;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --section-y: clamp(48px, 7vw, 104px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep anchor targets clear of the sticky header. */
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }

input, button, select, textarea { font: inherit; color: inherit; }

/* Visible keyboard focus - the source design had no focus styling at all. */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- shared type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  font-size: clamp(28px, 3.6vw, 44px);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
}

.lede { font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; color: var(--ink-soft); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.pill--primary { padding: 16px 28px; background: var(--ink); color: var(--sand); font-size: 16px; }
.pill--primary:hover { background: var(--green-deep); color: var(--sand); }

.pill--ghost { padding: 16px 26px; border: 1px solid var(--line-cool); color: var(--ink); font-size: 16px; font-weight: 500; }
.pill--ghost:hover { border-color: var(--green); color: var(--green-dark); }

.pill--compact { padding: 10px 18px; background: var(--green); color: #FFFFFF; font-size: 14px; }
.pill--compact:hover { background: var(--green-hover); color: #FFFFFF; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(245, 243, 236, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__identity { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-header__name { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.site-header__role { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }

/* The design hides this outright because inline styles cannot carry a media
   query. Shown from tablet up, where there is room for it. */
.site-header__phone { display: none; font-size: 14px; }
@media (min-width: 720px) { .site-header__phone { display: inline; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(24px, 4vw, 56px);
  background: radial-gradient(120% 90% at 85% 40%, var(--sage) 0%, var(--sand) 62%);
}

.hero__copy { max-width: 640px; position: relative; z-index: 2; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-sage);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  font-weight: 600;
}

.hero__title {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero__text { margin: 22px 0 0; max-width: 52ch; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.62; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__figure { position: relative; min-height: clamp(360px, 52vw, 620px); display: flex; justify-content: center; align-items: flex-end; }

.hero__glow {
  position: absolute;
  bottom: 6%;
  width: min(78%, 420px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(90, 141, 43, 0.22) 0%, rgba(90, 141, 43, 0) 70%);
}

.hero__portrait {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  height: clamp(360px, 52vw, 620px);
  object-fit: cover;
  object-position: 50% 18%;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 68%, transparent 99%),
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 68%, transparent 99%),
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

/* ---------- stats ---------- */

.stats { padding: clamp(8px, 2vw, 20px) var(--gutter) clamp(48px, 6vw, 80px); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(28px, 4vw, 44px);
}

.stat__value { font-family: var(--serif); font-size: clamp(34px, 4.4vw, 52px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.stat__label { margin-top: 8px; font-size: 14px; color: var(--ink-muted); line-height: 1.5; }

/* ---------- generic band ---------- */

.band { padding: var(--section-y) var(--gutter); }
.band--tinted { background: var(--sand-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band--tinted-open { background: var(--sand-dim); border-top: 1px solid var(--line); }

.band__split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}

.band__inner { max-width: 1240px; margin: 0 auto; }

.map-copy { display: flex; flex-direction: column; gap: 18px; max-width: 58ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { padding: 8px 14px; border-radius: 999px; background: #FFFFFF; border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }

.compare {
  margin-top: 8px;
  padding: 4px 20px 16px;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}

.compare__list { list-style: none; margin: 0; padding: 0; }

.compare__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.compare__what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.compare__name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.compare__detail { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }

.compare__price {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-left: auto;
}

.compare__price--low { color: var(--clay); }

.compare__note { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.compare__note strong { color: var(--ink); }

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}

.about__figure { position: relative; display: flex; justify-content: center; }
.about__figure::before { content: ''; position: absolute; inset: auto 0 0; height: 70%; border-radius: 20px; background: var(--sage); }
.about__portrait { position: relative; width: min(100%, 360px); aspect-ratio: 1; object-fit: cover; border-radius: 20px; }
.about__copy { max-width: 58ch; }
.about__title { margin-top: 16px; }
.about__para { margin: 20px 0 0; }
.about__para + .about__para { margin-top: 16px; }
.about__signature { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-family: var(--serif); font-size: 18px; }

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(28px, 4vw, 48px);
}

.step { padding: 28px 26px 30px; background: var(--sand); border: 1px solid var(--line-soft); border-radius: 18px; }
.step__number { font-family: var(--serif); font-size: 34px; color: var(--green); line-height: 1; }
.step__title { margin: 16px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.step__text { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- faq ---------- */

.faq__list { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__heading { margin: 0; }

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .2s ease;
}
.faq__question:hover { color: var(--green-dark); }

.faq__sign {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-cool);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--green);
}

.faq__answer { margin: 0; padding: 0 0 24px; max-width: 62ch; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

/* Collapsed only when scripting is available, so a no-JS visitor reads every
   answer. app.js drives max-height inline; these rules are the resting states. */
.faq__panel { overflow: hidden; }

.js .faq__panel {
  max-height: 0;
  opacity: 0;
  transition: max-height .42s cubic-bezier(.22, .61, .36, 1), opacity .28s ease;
}

.js .faq__panel.is-open { max-height: none; opacity: 1; }

/* ---------- estimate / chat ---------- */

.estimate { padding: var(--section-y) var(--gutter); background: var(--forest); color: var(--forest-text); }

.estimate__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 5vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
  align-items: start;
}

.estimate__intro { max-width: 46ch; }
@media (min-width: 900px) { .estimate__intro { position: sticky; top: 96px; } }

.estimate__eyebrow { color: var(--forest-accent); }
.estimate__title { margin: 16px 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.8vw, 46px); line-height: 1.1; letter-spacing: -0.02em; color: #FFFFFF; }
.estimate__text { margin: 20px 0 0; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; color: var(--forest-muted); }

.estimate__points { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; font-size: 15px; color: var(--forest-muted); list-style: none; padding: 0; }
.estimate__point { display: flex; align-items: center; gap: 10px; }
.estimate__point::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 999px; background: var(--forest-dot); }

.chat {
  display: flex;
  flex-direction: column;
  background: var(--sand);
  color: var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.chat__header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.chat__avatar { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: none; }
.chat__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat__name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.chat__status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.chat__status::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--green); }

.chat__progress { height: 3px; background: var(--line); }
.chat__progress-bar { height: 100%; background: var(--green); transition: width .45s ease; width: 0; }

.chat__log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  min-height: clamp(320px, 42vh, 420px);
  max-height: 520px;
  overflow-y: auto;
}

.msg { display: flex; gap: 10px; animation: bubbleIn .32s ease both; }
.msg__avatar { flex: none; width: 30px; height: 30px; border-radius: 999px; object-fit: cover; align-self: flex-end; }

.msg__bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.55;
}

.msg--user { }
.msg--user .msg__bubble {
  margin-left: auto;
  border-radius: 18px 18px 6px 18px;
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
  font-weight: 500;
}

/* An answer Erik could not accept, so it reads as a correction not a rejection. */
.msg--error .msg__bubble { background: #FDF3F1; border-color: #E7C6BF; color: #8A3527; }

.typing { display: flex; gap: 10px; align-items: flex-end; }
.typing__dots { display: flex; gap: 5px; padding: 15px 16px; border-radius: 18px 18px 18px 6px; background: #FFFFFF; border: 1px solid var(--line); }
.typing__dot { width: 6px; height: 6px; border-radius: 999px; background: #8A9179; animation: dotPulse 1.2s infinite; }
.typing__dot:nth-child(2) { animation-delay: .18s; }
.typing__dot:nth-child(3) { animation-delay: .36s; }

.chat__controls { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: #FFFFFF; }

.chat__options { display: flex; flex-wrap: wrap; gap: 8px; }

.option {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-cool);
  background: var(--sand);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.option:hover { border-color: var(--green); background: var(--sage); color: var(--green-deep); }

.chat__composer { display: flex; gap: 10px; align-items: center; }

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--sand);
  font-size: 15px;
  outline: none;
  min-height: 48px;
  transition: border-color .2s ease, background-color .2s ease;
}
.chat__input:focus { border-color: var(--green); background: #FFFFFF; }

.chat__send {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: var(--green);
  color: #FFFFFF;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease;
}
.chat__send:hover { background: var(--green-hover); }
.chat__send[disabled] { opacity: .55; cursor: not-allowed; }

.chat__done { display: flex; flex-direction: column; gap: 12px; }

.summary { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: var(--sage); border: 1px solid var(--line-sage); }
.summary__title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-dark); font-weight: 600; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 1.5; }
.summary__label { color: var(--ink-label); }
.summary__value { font-weight: 600; text-align: right; }

.noscript-note { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

.link-button { align-self: flex-start; padding: 10px 0; background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--green-dark); text-decoration: underline; }

/* Visually hidden but announced by screen readers - used for the composer
   label, which is redundant next to Erik's question for a sighted visitor. */
.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;
}

/* Honeypot: reachable to a DOM-parsing bot, unreachable to a person. Positioned
   off-screen rather than display:none, because some bots skip hidden fields. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--gutter);
  background: var(--footer);
  color: var(--footer-text);
  font-size: 14px;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer__links a { color: var(--forest-muted); }
.site-footer__links a:hover { color: #FFFFFF; }

/* ---------- motion ---------- */

@keyframes dotPulse {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

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

/* Scoped to .js so that a failed or blocked script leaves the page fully
   readable instead of invisible. The class is set by an inline script in head. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* Nothing here is load-bearing, so drop all of it when motion is unwelcome. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
