:root {
  --paper: #e7e1d4;
  --paper-2: #f6f3ec;
  --ink: #1c1916;
  --muted: #5e584e;
  --line: #d0c8b8;
  --rust: #8c3e22;
  --rust-dark: #6e301a;
  --white: #fffcf7;
  --shadow: 0 18px 50px rgba(48, 36, 22, 0.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 380;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.wrap { width: min(1120px, calc(100% - 2.4rem)); margin: 0 auto; }
.narrow { width: min(720px, 100%); }

.nav {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(231, 225, 212, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.2rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { text-decoration: none; font-size: 0.98rem; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.28rem; }

.button, .nav-cta {
  display: inline-block;
  background: var(--rust);
  color: white;
  text-decoration: none;
  border: 0;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  font-weight: 600;
}
.button:hover, .nav-cta:hover { background: var(--rust-dark); }
.button:disabled { opacity: 0.55; cursor: wait; }
.button.ghost, a.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.button.ghost:hover { background: var(--ink); color: var(--paper); }
.button.small { padding: 0.45rem 0.7rem; font-size: 0.92rem; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  min-height: calc(100vh - 4.2rem);
  background: var(--ink);
}
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 22rem; }
.hero-copy {
  background: var(--paper);
  padding: clamp(1.5rem, 4vw, 3.2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
}
.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rust);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.02; }
h1 { font-size: clamp(3rem, 6vw, 5.3rem); margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0 0 0.8rem; }
h3 { font-size: 1.7rem; margin: 0 0 0.4rem; }
.lede { font-size: 1.15rem; margin: 0; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 0.4rem; }
.price-note { margin: 0; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.facts p { margin: 0; padding: 1.1rem 1.2rem; border-right: 1px solid var(--line); }
.facts p:last-child { border-right: 0; }
.facts strong { display: block; font-weight: 600; margin-bottom: 0.25rem; }

.section { padding: 4.2rem 0; }
.section-head { max-width: 38rem; margin-bottom: 2rem; }
.section-head p { margin: 0; color: var(--muted); }

.base-row {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}
.base-row.reverse .base-copy { order: -1; }
.base-row img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.base-copy p { margin: 0 0 0.8rem; }
.build-line { color: var(--muted); font-size: 0.95rem; }

.wood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
.wood-card {
  background: var(--paper-2);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid transparent;
}
.wood-card:hover { border-color: var(--ink); }
.wood-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.wood-card div { padding: 0.85rem 0.9rem 1rem; }
.wood-card p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem; }
.wood-card strong { font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.step { background: var(--paper-2); padding: 1.2rem 1.15rem 1.3rem; }
.step span { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--rust); margin-bottom: 0.4rem; }
.step p { margin: 0.35rem 0 0; }

.how-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
.how-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li { margin: 0.45rem 0; }
.fine, .caption, .spec { color: var(--muted); }
.fine { font-size: 0.92rem; }

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 2rem;
  align-items: start;
  padding: 1.4rem 0 4rem;
}
.stage { position: sticky; top: 5rem; }
.stage img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #d9d3c6; }
.stage figure { margin: 0; }
.caption { margin: 0.55rem 0 0.9rem; font-size: 0.92rem; }

.group { margin: 0 0 1.5rem; }
.group h2 { font-size: 1.65rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.choice {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.75rem 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 4.4rem;
}
.choice:hover { border-color: var(--ink); }
.choice.is-on { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.choice-name { font-weight: 600; }
.choice-detail { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.choice.is-on .choice-detail { color: rgba(246, 243, 236, 0.76); }
.spec { margin: 0.55rem 0 0; font-size: 0.92rem; }

.slider { display: block; margin: 0.85rem 0; }
.slider span { display: flex; justify-content: space-between; font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--ink); margin-top: 0.45rem; }

.fields { display: grid; gap: 0.7rem; }
.field { display: flex; flex-direction: column; gap: 0.28rem; font-size: 0.92rem; font-weight: 600; }
.field input, .field textarea {
  font-weight: 380;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.72rem 0.75rem;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.form-error { color: var(--rust); min-height: 1.3rem; margin: 0.2rem 0; font-weight: 600; }
.options .button { width: 100%; margin-top: 0.3rem; }

.quote {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.quote h2 { font-size: 1.45rem; margin-bottom: 0.15rem; }
.quote-size { margin: 0 0 0.8rem; color: var(--muted); }
.quote-line, .quote-total, .quote-due {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.28rem 0;
}
.quote-line span:first-child,
.quote-total span:first-child,
.quote-due span:first-child { min-width: 0; }
.quote-line span:last-child,
.quote-total span:last-child,
.quote-due span:last-child { white-space: nowrap; flex: 0 0 auto; }
.quote-total { border-top: 1px solid var(--line); margin-top: 0.7rem; padding-top: 0.7rem; font-weight: 600; font-size: 1.12rem; }
.quote-due { color: var(--muted); font-size: 0.95rem; }
.quote-error { margin: 0; color: var(--rust); }

.quote-bar { display: none; }

.thanks { padding: 3rem 0 4rem; }
.thanks-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.3rem 1.2rem 1.4rem;
  margin-top: 1.2rem;
}

.shop-gate, .order-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.1rem;
  margin: 0.8rem 0;
}
.order-top, .order-actions { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.pill {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.pill.new { background: var(--ink); color: var(--paper); }
.order-card h3 { margin-top: 0.35rem; }
.order-card a { font-weight: 600; }
.order-card p { margin: 0.25rem 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0.2rem 0; }

:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

@media (max-width: 860px) {
  .hero, .facts, .base-row, .base-row.reverse, .steps, .how-grid, .builder, .choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .wood-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage, .options, .quote, img { min-width: 0; }
  .facts p { border-right: 0; border-bottom: 1px solid var(--line); }
  .base-row.reverse .base-copy { order: 0; }
  .stage { position: static; }
  .nav-inner { flex-wrap: wrap; row-gap: 0.45rem; }
  .nav-links { flex: 1 1 100%; justify-content: flex-start; gap: 0.7rem 0.9rem; }
  .nav-cta { padding: 0.55rem 0.7rem; }
  body[data-view="build"] .quote-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 7rem;
    z-index: 7;
    background: var(--ink);
    color: var(--paper-2);
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
  }
  body[data-view="build"] .quote-bar span:last-child { white-space: nowrap; }
}

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