:root {
  --bg: #f0f5fb;
  --bg-alt: #e8f0fb;
  --surface: #ffffff;
  --text: #15202e;
  --muted: #5a6678;
  --primary: #1560a8;
  --primary-dark: #0d487f;
  --border: #d0dff0;
  --border-strong: #b9cee8;
  --shadow-float: 0 12px 36px rgba(15, 40, 70, 0.09);
  --radius-card: 18px;
  --radius-input: 11px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 50%);
  line-height: 1.55;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, #0f3257, #1e6fb7);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 16px rgba(13, 72, 127, 0.28);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: -1;
}

.brand-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.25;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero {
  padding: 3.5rem 0 2.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  margin-bottom: 0.6rem;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

.estimate {
  padding: 0.5rem 0 2.5rem;
}

.carpentry-quote-section {
  padding: 0 0 2.75rem;
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.carpentry-quote-form h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.form-card {
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #43a5f5);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.estimate-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  padding: 1.4rem 1.45rem 1.5rem;
}

.estimate-form h3 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.field {
  margin-bottom: 0.95rem;
}

label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  padding: 0.68rem 0.82rem;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aac4e0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 96, 168, 0.2);
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.contact-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: var(--radius-input);
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
  transition: transform 0.06s ease, filter 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #2a82d9);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-light {
  background: #e8f1fb;
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-light:hover {
  background: #dce9f8;
}

.btn-full {
  width: 100%;
  margin-top: 0.2rem;
}

.results-wrap {
  padding: 0 0 3rem;
}

.result-card {
  background: linear-gradient(165deg, #ffffff 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  padding: 1.4rem 1.45rem 1.5rem;
}

.range {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 800;
  margin: 0.4rem 0 0.75rem;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.range.range--quote-only {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  line-height: 1.38;
}

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.tearoff-option-card {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #f4f9ff;
}

.tearoff-option-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  cursor: pointer;
}

.switch-row span:first-child {
  font-size: 0.92rem;
  color: var(--text);
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #b5c7db;
  transition: background-color 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
  background: var(--primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.tearoff-cost-hint {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.quote-follow-up {
  margin-top: 1.25rem;
}

.quote-follow-up-divider {
  height: 0;
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 0 1rem;
}

.post-estimate-heading {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.post-estimate-lead {
  margin-bottom: 1rem;
}

.follow-up-form {
  margin-top: 0.15rem;
}

.quote-success {
  margin: 1rem 0 0;
  padding: 0.88rem 1rem;
  border-radius: var(--radius-input);
  background: #e8f2fc;
  border: 1px solid #bfd8f0;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.45;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f5f9fd;
}

.footer-wrap {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 600px) {
  .container {
    width: min(1120px, 94vw);
  }

  .site-header {
    position: static;
  }

  .nav-wrap {
    min-height: 64px;
    padding: 0.45rem 0;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 0.74rem;
  }

  .brand-title {
    font-size: 0.98rem;
  }

  .brand-sub {
    font-size: 0.8rem;
  }

  .hero {
    padding: 2.25rem 0 1.5rem;
  }

  h1 {
    font-size: clamp(1.55rem, 7.5vw, 2.15rem);
    margin-bottom: 0.7rem;
  }

  .lead {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .estimate {
    padding: 0.25rem 0 1.65rem;
  }

  .carpentry-quote-section {
    padding: 0 0 1.9rem;
  }

  .estimate-form,
  .result-card {
    padding: 1.1rem 1rem 1.2rem;
    border-radius: 14px;
  }

  .estimate-form h3 {
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
  }

  .field {
    margin-bottom: 0.85rem;
  }

  label {
    font-size: 0.88rem;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    padding: 0.66rem 0.75rem;
    font-size: 16px;
  }

  textarea {
    min-height: 110px;
  }

  .btn {
    min-height: 46px;
    padding: 0.72rem 0.95rem;
  }

  .range {
    font-size: clamp(1.45rem, 7vw, 2rem);
    margin-bottom: 0.6rem;
  }

  .summary {
    font-size: 0.94rem;
  }

  .switch-row {
    align-items: center;
  }

  .switch-row span:first-child {
    font-size: 0.88rem;
  }

  .switch {
    width: 52px;
    height: 30px;
  }

  .switch-slider::before {
    width: 24px;
    height: 24px;
  }

  .switch input:checked + .switch-slider::before {
    transform: translateX(22px);
  }

  .quote-follow-up {
    margin-top: 1rem;
  }

  .quote-success {
    font-size: 0.9rem;
  }

  .footer-wrap {
    flex-direction: column;
    padding: 1rem 0;
    text-align: center;
    min-height: auto;
    gap: 0.45rem;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(1120px, 95vw);
  }

  .estimate-form,
  .result-card {
    padding-inline: 0.85rem;
  }

  .brand-title {
    font-size: 0.93rem;
  }

  .brand-sub {
    font-size: 0.76rem;
  }
}
