:root {
  --snow: #fffaf0;
  --ice: #e1f5f1;
  --aqua: #f25b2a;
  --aqua-dark: #bd1e2d;
  --evergreen: #163f2e;
  --pine: #235b42;
  --sky: #47b8d8;
  --graphite: #211b16;
  --muted: #695f54;
  --line: #ead8c2;
  --warm: #ffd447;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(61, 46, 18, 0.17);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--graphite);
  background: var(--snow);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(225, 245, 241, 0.92), rgba(255, 250, 240, 0.94) 45%, rgba(255, 255, 255, 0.95)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1800&q=70");
  background-attachment: fixed;
  background-size: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(215, 229, 231, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--evergreen);
  color: var(--white);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  margin-top: 3px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--evergreen);
  font-size: 0.92rem;
  font-weight: 700;
}

.header-cta {
  justify-self: end;
  border: 1px solid var(--evergreen);
  background: linear-gradient(135deg, var(--evergreen), var(--pine));
  color: var(--white);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 800;
}

.estimator-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 68px) clamp(16px, 4vw, 56px) 34px;
}

.intro-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 0.74fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 26px;
}

.intro-copy h1 {
  margin: 0;
  max-width: 820px;
  color: var(--evergreen);
  font-size: clamp(2.25rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro-copy p {
  margin: 0 0 10px;
  color: #405b4d;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.55;
}

.estimator-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  gap: 18px;
  align-items: start;
  min-height: 690px;
}

.map-stage,
.estimate-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 229, 231, 0.96);
  box-shadow: var(--shadow);
}

.map-stage {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 760px;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.search-bar input,
.booking-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--white);
  color: var(--graphite);
  font-size: 1.08rem;
  outline: none;
}

.search-bar input:focus,
.booking-form input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(242, 91, 42, 0.16);
}

.search-bar button,
.booking-form button {
  border: 0;
  border-radius: 8px;
  background: var(--aqua-dark);
  color: var(--white);
  padding: 0 18px;
  min-height: 56px;
  font-size: 1.04rem;
  font-weight: 850;
  cursor: pointer;
}

.map-toolbar,
.map-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--evergreen);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
}

.map-toolbar {
  position: sticky;
  top: 78px;
  z-index: 500;
  align-items: center;
  padding: 14px 16px;
  background: #fffaf0;
  border-bottom: 1px solid var(--line);
}

.map-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-toolbar button {
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--evergreen);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 850;
  cursor: pointer;
}

.map-toolbar .primary-map-action {
  border-color: var(--aqua);
  background: var(--aqua);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(189, 30, 45, 0.2);
}

.map-canvas {
  height: 100%;
  min-height: 460px;
  background: var(--ice);
}

.map-footer {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--evergreen), #2e6b4d);
  color: #f6fff4;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-draw-toolbar a {
  background-size: 300px 30px;
}

.leaflet-draw-toolbar {
  display: none;
}

.estimate-panel {
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading p,
.area-readout span,
.booking-form span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel-heading strong {
  color: var(--evergreen);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.area-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff4ec, #ffffff);
  border: 1px solid var(--line);
}

.area-readout strong {
  color: var(--aqua-dark);
  font-size: 1.3rem;
}

.sections-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.sections-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--evergreen);
}

.sections-heading strong {
  font-size: 1rem;
}

.sections-heading span {
  color: var(--aqua-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

.sections-list {
  display: grid;
  gap: 8px;
}

.empty-sections {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--graphite);
  text-align: left;
  cursor: pointer;
}

.section-row.active {
  border-color: var(--warm);
  background: #fff7cf;
  box-shadow: 0 10px 24px rgba(255, 212, 71, 0.18);
}

.section-row strong,
.section-row small {
  display: block;
}

.section-row strong {
  color: var(--evergreen);
  font-size: 1.02rem;
}

.section-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.section-actions b,
.section-actions i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.section-actions b {
  background: var(--evergreen);
  color: var(--white);
}

.section-actions i {
  background: #fff0ed;
  color: var(--aqua-dark);
}

.job-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff4ec;
}

.job-type button {
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
}

.job-type button.active {
  background: var(--evergreen);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(61, 46, 18, 0.16);
}

.garage-control {
  display: none;
  grid-template-columns: 1fr 86px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.garage-control.visible {
  display: grid;
}

.garage-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.garage-control input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--graphite);
  font-weight: 850;
  text-align: center;
}

.package-stack {
  display: grid;
  gap: 10px;
}

.package-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
  cursor: pointer;
  color: var(--graphite);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.package-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 91, 42, 0.55);
}

.package-card.active {
  border-color: var(--aqua);
  background: #fff4ec;
  box-shadow: 0 14px 30px rgba(242, 91, 42, 0.14);
}

.package-card strong {
  display: block;
  font-size: 1.12rem;
}

.package-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 750;
}

.package-card em {
  display: block;
  max-width: 250px;
  margin-top: 8px;
  color: #5f4c3f;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.package-card b {
  color: var(--evergreen);
  font-size: 1.28rem;
  white-space: nowrap;
}

.scope-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.scope-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.scope-list div:last-child {
  border-bottom: 0;
}

.scope-list dt,
.scope-list dd {
  margin: 0;
  font-size: 1rem;
}

.scope-list dt {
  color: var(--muted);
  font-weight: 750;
}

.scope-list dd {
  color: var(--graphite);
  font-weight: 850;
}

.booking-form {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.booking-form label {
  display: grid;
  gap: 7px;
}

.booking-form button {
  margin-top: 2px;
  background: linear-gradient(135deg, var(--evergreen), var(--pine));
}

#booking-status {
  min-height: 20px;
  margin: 0;
  color: var(--aqua-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.process-band {
  width: min(1328px, calc(100% - 32px));
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: linear-gradient(135deg, var(--evergreen), #2e6b4d);
  color: var(--white);
  border-radius: 8px;
}

.process-band h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.2vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.process-band p {
  max-width: 720px;
  margin: 0;
  color: #dff6e8;
  line-height: 1.55;
}

.process-band ol {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.process-band li {
  min-width: 126px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.process-band li strong {
  color: var(--warm);
}

.process-band li span {
  font-size: 0.92rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .intro-copy,
  .estimator-app,
  .process-band {
    grid-template-columns: 1fr;
  }

  .estimator-app {
    min-height: 0;
  }

  .map-stage {
    min-height: 0;
  }

  .map-canvas {
    min-height: 520px;
  }

  .process-band ol {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .site-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .brand small,
  .header-cta {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .estimator-shell {
    padding: 24px 12px;
  }

  .intro-copy {
    gap: 14px;
    margin-bottom: 18px;
  }

  .intro-copy h1 {
    font-size: 2.55rem;
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

  .search-bar button {
    width: 100%;
  }

  .map-toolbar,
  .map-footer,
  .scope-list div {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .map-toolbar button {
    width: 100%;
  }

  .section-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
  }

  .section-actions b,
  .section-actions i {
    flex: 1;
  }

  .map-canvas {
    min-height: 420px;
  }

  .estimate-panel {
    padding: 16px;
  }

  .panel-heading strong {
    font-size: 2.65rem;
  }

  .process-band {
    width: calc(100% - 24px);
    padding: 20px;
    margin-bottom: 30px;
  }

  .process-band ol {
    display: grid;
    grid-template-columns: 1fr;
  }
}
