/* ==========================================================================
   Clyde Valley Plumbing & Heating — Instant Quote Calculator
   Clean trades-business design: Deep Navy + Warm Amber on White
   Mobile-first responsive layout
   ========================================================================== */

:root {
  --navy-950: #091826;
  --navy-900: #0F2537;
  --navy-800: #18364F;
  --navy-700: #234968;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-100: #FEF3C7;
  --amber-50: #FFFBEB;

  --white: #FFFFFF;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0F172A;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(15, 37, 55, 0.06), 0 6px 20px rgba(15, 37, 55, 0.05);
  --shadow-navy: 0 12px 32px rgba(9, 24, 38, 0.18);
  --transition: 150ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* Room for mobile sticky bar */
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--navy-900);
  color: var(--white);
  border-bottom: 3px solid var(--amber-500);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-meta {
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.25;
  margin-top: 2px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FDE68A;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.header-phone:hover,
.header-phone:focus-visible {
  background: var(--amber-500);
  color: var(--navy-950);
  outline: none;
}

/* Main / Hero */
.main-content {
  padding: 20px 0 32px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 220px);
}

.hero-intro {
  margin-bottom: 18px;
}

.hero-intro h1 {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--slate-600);
}

/* Calculator Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Job Type Selector */
.job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.job-btn {
  appearance: none;
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  min-height: 82px;
  border-radius: var(--radius-md);
  border: 2px solid var(--slate-200);
  background: var(--white);
  color: var(--navy-900);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.job-btn:hover {
  border-color: var(--navy-700);
  background: var(--slate-50);
}

.job-btn:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
}

.job-btn[aria-checked="true"] {
  border-color: var(--amber-500);
  background: var(--amber-50);
  box-shadow: 0 0 0 1px var(--amber-500);
}

.job-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--navy-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition), color var(--transition);
}

.job-btn[aria-checked="true"] .job-btn-icon {
  background: var(--navy-900);
  color: var(--amber-500);
}

.job-btn-label {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Last odd job button spans full width on 2-col mobile grid */
.job-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 62px;
}

/* Dynamic Questions */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.question-block {
  border: none;
  margin: 0;
  padding: 0;
}

.question-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 9px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.option-btn {
  appearance: none;
  font-family: inherit;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-900);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}

.option-btn:hover {
  border-color: var(--navy-800);
  background: var(--slate-50);
}

.option-btn:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
}

.option-btn[aria-checked="true"] {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: var(--white);
}

.option-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate-500);
}

.option-btn[aria-checked="true"] .option-sub {
  color: #CBD5E1;
}

/* Estimate Card */
.estimate-card {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-navy);
  border: 1px solid var(--navy-800);
}

.estimate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.estimate-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #CBD5E1;
}

.estimate-job-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #FDE68A;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.estimate-price-wrap {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.estimate-price {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--white);
  transition: transform 140ms ease;
}

.estimate-price.pulse {
  transform: scale(1.02);
}

.estimate-vat {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #CBD5E1;
}

.estimate-includes {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.includes-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #FDE68A;
  margin-bottom: 4px;
}

.estimate-includes p {
  margin: 0;
  font-size: 0.9rem;
  color: #E2E8F0;
  line-height: 1.45;
}

.estimate-summary-list {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.estimate-summary-list li {
  font-size: 0.8rem;
  font-weight: 500;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.cta-button {
  appearance: none;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--amber-500);
  color: var(--navy-950);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.cta-button:hover {
  background: #FBBF24;
}

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

.cta-button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.estimate-note {
  margin: 12px 0 0;
  font-size: 0.84rem;
  color: #CBD5E1;
  text-align: center;
  line-height: 1.4;
}

/* Booking Confirmation / Call-Us Panel */
.book-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--amber-50);
  color: var(--navy-950);
  border: 2px solid var(--amber-500);
}

.book-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.book-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--navy-900);
  font-size: 1.35rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 6px;
}

.book-close:hover {
  background: rgba(15, 37, 55, 0.1);
}

.book-panel-copy {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--slate-900);
}

.book-phone-highlight {
  display: inline-block;
  font-weight: 800;
  color: var(--navy-900);
  background: var(--amber-100);
  padding: 1px 6px;
  border-radius: 4px;
}

.book-panel-demo {
  margin: 0;
  font-size: 0.8rem;
  color: var(--slate-600);
}

/* Mobile Sticky Price Bar */
.mobile-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--navy-950);
  color: var(--white);
  border-top: 2px solid var(--amber-500);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(9, 24, 38, 0.2);
}

.mobile-sticky-info {
  display: flex;
  flex-direction: column;
}

.mobile-sticky-label {
  font-size: 0.74rem;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-sticky-price {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
}

.mobile-sticky-btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--amber-500);
  color: var(--navy-950);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 18px 0;
}

.footer-inner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate-600);
  text-align: center;
}

/* Small phones (390px and below) refinements */
@media (max-width: 420px) {
  .brand-name {
    font-size: 0.88rem;
  }

  .brand-meta {
    font-size: 0.74rem;
  }

  .header-phone span {
    font-size: 0.8rem;
  }

  .header-phone {
    padding: 7px 9px;
  }

  .estimate-price {
    font-size: 2.1rem;
  }
}

/* Tablet & Desktop: Hero calculator fits cleanly above the fold */
@media (min-width: 880px) {
  body {
    padding-bottom: 0;
  }

  .mobile-sticky-bar {
    display: none;
  }

  .container {
    padding: 0 24px;
  }

  .main-content {
    padding: 22px 0 36px;
  }

  .hero-intro {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
  }

  .hero-intro h1 {
    font-size: 1.85rem;
    margin: 0;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .calculator-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
    gap: 22px;
  }

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

  .job-btn {
    min-height: 92px;
    padding: 12px;
  }

  .job-btn:last-child:nth-child(odd) {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
    min-height: 92px;
  }

  .job-btn-label {
    font-size: 0.88rem;
  }

  .card {
    padding: 20px;
  }

  .estimate-column {
    position: sticky;
    top: 20px;
  }

  .estimate-card {
    padding: 24px;
  }

  .estimate-price {
    font-size: 2.55rem;
  }
}
