:root {
  color-scheme: light;
  --ink: #1d201b;
  --muted: #66695f;
  --paper: #f2efe7;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: #d7d2c6;
  --line-dark: #aaa69b;
  --accent: #b9672b;
  --accent-dark: color-mix(in srgb, var(--accent), var(--ink) 30%);
  --accent-soft: color-mix(in srgb, var(--accent), var(--surface) 82%);
  --success: #3f6448;
  --shadow: 0 30px 80px -44px rgba(49, 41, 29, 0.52);
  --radius-large: 28px;
  --radius-medium: 16px;
  --font-sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(29, 32, 27, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 32, 27, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  font-family: var(--font-sans);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 72%);
  outline-offset: 3px;
}

.site-header,
.hero,
.sales-band,
footer {
  width: min(100% - 48px, 1380px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: -0.06em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.availability > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: breathe 2.4s ease-in-out infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(560px, 1.18fr);
  gap: clamp(56px, 8vw, 128px);
  align-items: start;
  min-height: calc(100dvh - 84px);
  padding-block: clamp(64px, 8vw, 112px);
}

.hero-copy {
  position: sticky;
  top: 48px;
  max-width: 570px;
  padding-top: clamp(20px, 5vw, 72px);
  animation: enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow,
.kicker {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.4rem, 6.2vw, 6.8rem);
  font-weight: 620;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.hero-lede {
  max-width: 52ch;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.65;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 52px 0 0;
  border-block: 1px solid var(--line);
}

.value-list > div {
  padding: 22px 18px 20px 0;
}

.value-list > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.value-list dt {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.value-list dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.sample-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  max-width: 470px;
  margin-top: 42px;
}

.sample-index {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.sample-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.estimator {
  overflow: hidden;
  border: 1px solid rgba(129, 120, 104, 0.38);
  border-radius: var(--radius-large);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow);
  animation: enter 0.7s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.estimator-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 38px;
  border-bottom: 1px solid var(--line);
}

.estimator-heading .kicker {
  margin-bottom: 8px;
}

.estimator-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.private-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #c6d3c6;
  border-radius: 999px;
  color: var(--success);
  background: #eef3ec;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

#estimate-form {
  padding: 0 38px 38px;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 34px 0 36px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section legend {
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  margin-bottom: 22px;
  padding: 0;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.form-section legend span {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 88px;
  padding: 18px 18px 16px 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.choice-card:hover {
  border-color: var(--line-dark);
  transform: translateY(-1px);
}

.choice-card:active {
  transform: translateY(1px);
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-card input {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.choice-title {
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-detail {
  color: var(--muted);
  font-size: 0.72rem;
}

.choice-card.compact {
  min-height: 78px;
  padding: 16px 10px 14px 40px;
}

.choice-card.compact input {
  top: 18px;
  left: 15px;
}

.range-field {
  margin-bottom: 28px;
}

.field-heading,
.range-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-heading {
  margin-bottom: 12px;
}

.field-heading label,
.input-group > label,
.field-label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.field-heading output {
  display: grid;
  width: 36px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--surface);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--accent) var(--range-progress, 14%), #d9d5cc var(--range-progress, 14%));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  appearance: none;
  background: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.range-labels {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.input-group {
  display: grid;
  gap: 8px;
}

.input-group + .input-group {
  margin-top: 26px;
}

.input-group label span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-strong);
}

select {
  padding: 0 42px 0 14px;
}

input[type="text"] {
  padding: 0 14px;
}

select:hover,
input[type="text"]:hover {
  border-color: var(--line-dark);
}

.helper-text,
.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.check-row:hover,
.check-row:has(input:checked) {
  border-color: var(--accent);
}

.check-row:has(input:checked) {
  background: var(--accent-soft);
}

.check-row input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--accent-dark);
}

.check-row span {
  font-size: 0.73rem;
  line-height: 1.35;
}

.two-column-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.two-column-fields .input-group + .input-group {
  margin-top: 0;
}

.optional-section {
  border-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button-primary {
  color: var(--surface);
  background: var(--ink);
}

.button-primary:hover {
  background: #30342d;
}

.button-secondary,
.button-quiet {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: var(--line-dark);
  background: var(--surface-strong);
}

.button-small {
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.submit-button {
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  background: var(--accent-dark);
}

.submit-button:hover {
  background: #733813;
}

.privacy-note {
  margin-top: 12px;
  text-align: center;
}

.form-error {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #d5aaa1;
  border-radius: 10px;
  color: #803327;
  background: #fae9e5;
  font-size: 0.74rem;
}

.result {
  min-height: 640px;
  padding: 42px 38px 38px;
  animation: result-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.result-topline .kicker {
  margin: 0;
}

.text-button {
  padding: 2px;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  cursor: pointer;
}

.result-amount {
  margin-top: 34px;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
  font-weight: 640;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.result-caption {
  max-width: 48ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 36px;
  border-block: 1px solid var(--line);
}

.result-metrics > div {
  display: grid;
  gap: 5px;
  padding: 20px 0;
}

.result-metrics > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.result-metrics span {
  color: var(--muted);
  font-size: 0.68rem;
}

.result-metrics strong {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.breakdown {
  margin-top: 30px;
}

.breakdown h3 {
  margin: 0 0 12px;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

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

.breakdown li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.breakdown li strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.estimate-note {
  margin: 24px 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 0.7rem;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-top: 24px;
}

.sales-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr auto;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  margin-bottom: 40px;
  padding: clamp(34px, 5vw, 64px);
  border-radius: var(--radius-large);
  color: var(--surface);
  background: var(--ink);
}

.sales-band .eyebrow {
  color: #dfad87;
}

.sales-band h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.sales-band > p {
  max-width: 42ch;
  margin: 0;
  color: #c9c9c1;
  font-size: 0.9rem;
  line-height: 1.7;
}

.sales-band .button {
  color: var(--ink);
  background: var(--surface);
  white-space: nowrap;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 38px;
  color: var(--muted);
  font-size: 0.68rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.74rem;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[hidden] {
  display: none !important;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-copy {
    position: static;
    max-width: 720px;
    padding-top: 20px;
  }

  h1 {
    max-width: 12ch;
  }

  .estimator {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
  }

  .sales-band {
    grid-template-columns: 1fr auto;
  }

  .sales-band > p {
    grid-column: 1;
  }

  .sales-band .button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .sales-band,
  footer {
    width: min(100% - 32px, 1380px);
  }

  .site-header {
    min-height: 72px;
  }

  .availability {
    display: none;
  }

  .header-actions .button {
    display: none;
  }

  .hero {
    gap: 42px;
    min-height: auto;
    padding-block: 48px 68px;
  }

  .hero-copy {
    padding-top: 0;
  }

  h1 {
    font-size: clamp(3.35rem, 17vw, 5rem);
  }

  .hero-lede {
    margin-top: 24px;
    font-size: 1rem;
  }

  .value-list {
    margin-top: 36px;
  }

  .value-list > div {
    padding-right: 10px;
  }

  .value-list > div + div {
    padding-left: 10px;
  }

  .value-list dt {
    font-size: 0.76rem;
  }

  .value-list dd {
    font-size: 0.64rem;
  }

  .estimator-heading,
  #estimate-form,
  .result {
    padding-inline: 22px;
  }

  .estimator-heading {
    padding-block: 26px;
  }

  #estimate-form {
    padding-bottom: 24px;
  }

  .form-section {
    padding-block: 28px;
  }

  .project-grid,
  .feature-grid,
  .two-column-fields {
    grid-template-columns: 1fr;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .choice-card.compact {
    min-height: 68px;
  }

  .result {
    min-height: 0;
    padding-block: 34px 28px;
  }

  .result-amount {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .result-actions {
    grid-template-columns: 1fr 1fr;
  }

  .result-actions .button:first-child {
    grid-column: 1 / -1;
  }

  .sales-band {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 26px;
  }

  .sales-band .button,
  .sales-band > p {
    grid-column: 1;
    grid-row: auto;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  #result,
  #result * {
    visibility: visible;
  }

  #result {
    position: absolute;
    inset: 0;
    display: block !important;
    padding: 0;
    color: #1d201b;
    background: #ffffff;
  }

  .result-actions,
  .result-topline .text-button {
    display: none;
  }
}
