:root {
  --bg: #1c1917;
  --surface: #292524;
  --line: #3d3733;
  --ink: #f5f0e8;
  --muted: #b8ad9e;
  --accent: #e9a23b;
  --accent-hi: #f2b75e;
  --sage: #7aa095;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 22px;
  --r-ctl: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--bg); padding: .6rem 1rem; border-radius: var(--r-ctl); z-index: 10; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }

/* Header */
.site-header { padding-block: 1.25rem; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: block; border-radius: 6px; }
.brand svg { width: 150px; }
@media (min-width: 720px) { .brand svg { width: 172px; } }
.site-header ul { display: none; list-style: none; margin: 0; padding: 0; gap: 2rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { color: var(--ink); }
@media (min-width: 760px) { .site-header ul { display: flex; } }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  padding: 1.05rem 1.6rem;
  border-radius: 999px;
  transition: background-color .2s ease;
}
.btn:hover { background: var(--accent-hi); color: var(--bg); }
.btn-block { display: block; text-align: center; }
.btn-quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-quiet:hover { background: rgba(233, 162, 59, .1); color: var(--accent-hi); }

/* Hero: warmth rising from the floor */
.hero {
  position: relative;
  padding: clamp(3.5rem, 10vw, 7.5rem) 0 clamp(4rem, 9vw, 7rem);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 30% 0 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 72%, rgba(233, 162, 59, .26), rgba(233, 162, 59, 0) 70%),
    radial-gradient(90% 40% at 50% 100%, rgba(196, 110, 40, .18), rgba(196, 110, 40, 0) 70%);
  pointer-events: none;
}
.hero-inner { text-align: center; max-width: 46rem; }
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  line-height: 1.02;
}
.lede {
  color: var(--muted);
  max-width: 34rem;
  margin: 1.6rem auto 2.2rem;
  font-size: 1.0625em;
}

/* Calculator card */
.calc {
  position: relative;
  max-width: 44rem;
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(1.4rem, 5vw, 3rem);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px -30px rgba(233, 162, 59, .35);
}
.calc:focus { outline: none; }
.calc-head { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; }
.calc-head h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.15; }
.calc-head p { color: var(--muted); margin-top: .4rem; font-size: .95em; }

.fields { display: grid; gap: 1.4rem 1.25rem; }
@media (min-width: 620px) { .fields { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-size: .9rem; font-weight: 500; color: var(--ink); padding: 0; }
.field legend { margin-bottom: .6rem; }

select, input[type="number"] {
  width: 100%;
  font: 400 1rem/1.3 var(--sans);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #4a433d;
  border-radius: var(--r-ctl);
  padding: .85rem 1rem;
  appearance: none;
  -webkit-appearance: none;
}
select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23b8ad9e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
}
select:hover, input[type="number"]:hover { border-color: #6a6058; }
select:focus-visible, input[type="number"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="number"]::placeholder { color: #8f8578; }
.unit { position: relative; }
.unit input { padding-right: 3rem; -moz-appearance: textfield; }
.unit input::-webkit-inner-spin-button, .unit input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit span { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid #4a433d;
  color: var(--muted);
  font-size: .95rem;
  transition: border-color .15s, color .15s, background-color .15s;
}
.chips label:hover span { border-color: #6a6058; color: var(--ink); }
.chips input:checked + span { border-color: var(--accent); color: var(--ink); background: rgba(233, 162, 59, .12); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; align-items: center; gap: .75rem; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); flex: none; }
.check label { font-weight: 400; color: var(--muted); font-size: .98rem; }

.calc-foot { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.gets { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .8rem; }
@media (min-width: 620px) { .gets { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.gets li { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; line-height: 1.4; color: var(--ink); }
.gets svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fine { margin-top: .9rem; color: var(--muted); font-size: .85rem; text-align: center; }

/* One-sentence sections */
.block { padding-block: clamp(4.5rem, 11vw, 8.5rem); }
.block + .block:not(.block-surface) { border-top: 1px solid #2c2724; }
.block-surface { background: var(--surface); }
.col { max-width: 70rem; }
.col > * { max-width: 36rem; }
@media (min-width: 960px) { .col > * { margin-left: 16.666%; } }
.block h2 { font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.08; }
.block h2 + p { margin-top: 1.25rem; color: var(--muted); max-width: 33rem; }
.block .btn { margin-top: 2rem; }

.few { margin: 2.75rem 0 0; }
.few svg { width: 100%; max-width: 330px; }
.few figcaption { margin-top: .8rem; color: var(--sage); font-size: .9rem; }

.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: s; display: grid; gap: 1.9rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: .9rem; }
.steps li::before {
  content: counter(s);
  grid-row: span 2;
  font: 400 2rem/1 var(--serif);
  color: var(--accent);
}
.steps h3 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.steps p { color: var(--muted); font-size: .97rem; margin-top: .2rem; }

.coast { margin-top: 2.5rem; width: 100%; max-width: 520px; }

.mail {
  display: inline-block;
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 6.2vw, 2.4rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
}

/* Footer */
.site-footer { border-top: 1px solid #2c2724; padding-block: 2.5rem 3rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; color: var(--muted); font-size: .9rem; }
.foot img { width: 40px; }
.foot p:last-child { margin-left: auto; }
@media (max-width: 600px) { .foot p:last-child { margin-left: 0; width: 100%; } }

/* The one moment of motion: the ember under the calculator breathes */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: ember 9s ease-in-out infinite alternate; }
  @keyframes ember { from { opacity: .75; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
