/* Precision Home Services — public quote builder.
   Brand: deep teal #008490, orange #EA661E, mid teal #30A2AE,
   light teal #5AC0C6, gold #FCB412. Headings in Montserrat 800/900. */

:root {
  --teal: #008490;
  --teal-mid: #30A2AE;
  --teal-light: #5AC0C6;
  --orange: #EA661E;
  --gold: #FCB412;
  --ink: #15333a;
  --muted: #5b7177;
  --bg: #f4f8f9;
  --panel: #ffffff;
  --line: #dce8ea;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 78, 88, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1 { font-weight: 900; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; margin: .3em 0; color: var(--teal); }
h2 { font-weight: 800; font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--teal); margin: 0 0 .35em; }
a { color: var(--teal); }

/* ---------- chrome ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--panel);
  border-bottom: 3px solid var(--teal); box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 10;
}
.logo { height: 64px; width: auto; }
.phone { font-weight: 800; text-decoration: none; color: var(--orange); font-size: 1.05rem; }

.progress { height: 6px; background: var(--line); position: sticky; top: 91px; z-index: 9; }
.progress-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-light));
  transition: width .35s ease;
}

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 28px 16px 36px; }

/* ---------- steps ---------- */
#app { max-width: 1020px; margin: 0 auto; padding: 28px 18px 40px; }
.step { display: none; animation: fade .three; }
.step.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { text-align: center; max-width: 640px; margin: 6vh auto 0; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--panel); background: var(--orange);
  padding: 5px 14px; border-radius: 999px;
}
.lede { font-size: 1.08rem; line-height: 1.55; color: var(--muted); }
.bigcheck {
  width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 2.6rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.hint { color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.field-label { display: block; font-weight: 700; margin: 22px 0 8px; }
.fineprint { font-size: .78rem; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.center { text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- buttons & chips ---------- */
.btn {
  font: inherit; font-weight: 800; border: 0; border-radius: 999px;
  padding: 13px 26px; cursor: pointer; transition: transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 3px 10px rgba(234,102,30,.35); }
.btn-primary:hover { box-shadow: 0 5px 16px rgba(234,102,30,.45); }
.btn-big { font-size: 1.1rem; padding: 16px 34px; }
.btn-ghost { background: transparent; color: var(--teal); }
.btn[disabled] { opacity: .55; cursor: wait; }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--panel); color: var(--ink);
  cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--teal-light); }
.chip.selected { background: var(--teal); border-color: var(--teal); color: #fff; }

.text-input {
  font: inherit; width: 100%; max-width: 420px; display: block;
  padding: 12px 14px; margin-top: 10px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--panel); color: var(--ink);
}
.text-input:focus { outline: none; border-color: var(--teal-mid); }
/* Google Places autocomplete dropdown */
.pac-container { z-index: 100000; font-family: inherit; border-radius: 10px; margin-top: 2px; box-shadow: var(--shadow); }
.pac-item { padding: 6px 12px; font-size: .9rem; cursor: pointer; }
textarea.text-input { resize: vertical; }

/* ---------- load cards & steppers ---------- */
.load-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px; margin-bottom: 22px;
}
.load-card {
  font: inherit; font-weight: 600; font-size: .9rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--panel); color: var(--ink);
  cursor: pointer; text-align: center; font-size: 1.5rem; transition: all .12s;
}
.load-card span { font-size: .88rem; line-height: 1.3; }
.load-card:hover { border-color: var(--teal-light); }
.load-card.selected { border-color: var(--teal); background: #e8f5f6; box-shadow: inset 0 0 0 1px var(--teal); }

.steppers { display: grid; gap: 10px; max-width: 460px; }
.stepper-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px;
}
.stepper-row.has-qty { border-color: var(--teal); background: #e8f5f6; }
.stepper-label { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 9px; }
.unit-icon { width: 30px; height: 30px; flex: none; vertical-align: middle; }
.note-callout {
  background: #fff7e6; border: 1px solid var(--gold); border-radius: 10px;
  padding: 10px 14px; margin-top: 10px;
}
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 18px; text-align: center; font-size: 1.05rem; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.2rem; font-weight: 800; color: #fff; background: var(--teal-mid);
}
.stepper button:hover { background: var(--teal); }

/* per-unit tonnage rows (one per A/C / heat-pump unit) */
.unit-size {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 8px 2px;
}
.unit-label { font-weight: 700; font-size: .85rem; min-width: 84px; color: var(--teal); }
.ton-chips { gap: 6px; }
.ton-chips .chip.ton {
  padding: 7px 12px; font-size: .85rem; min-width: 44px; text-align: center;
}

/* ---------- results ---------- */
.rec-banner {
  text-align: center; margin-bottom: 26px;
}
.rec-banner .size {
  font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 900; color: var(--teal);
}
.rec-banner .drivers { color: var(--muted); font-size: .88rem; max-width: 640px; margin: 8px auto 0; line-height: 1.55; }
.rec-note {
  max-width: 560px; margin: 12px auto 0; font-size: .85rem; color: var(--ink);
  background: #fff7e6; border: 1px solid var(--gold); border-radius: 10px; padding: 10px 14px;
}

.packages {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px; align-items: stretch;
}
.pkg {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 2px solid var(--line); padding: 22px 20px; display: flex; flex-direction: column;
  position: relative;
}
.pkg.popular { border-color: var(--orange); }
.pkg .ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-weight: 800; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
  white-space: nowrap;
}
.pkg h3 { margin: 0; font-weight: 900; font-size: 1.25rem; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.pkg .kw { color: var(--orange); font-weight: 800; font-size: .95rem; margin: 2px 0 10px; }
.pkg img.genphoto { width: 100%; height: 150px; object-fit: contain; margin: 4px 0 10px; }
.pkg .blurb { color: var(--muted); font-size: .86rem; line-height: 1.5; margin: 0 0 12px; min-height: 3.6em; }
.pkg .was { color: var(--muted); text-decoration: line-through; font-weight: 700; font-size: 1.05rem; }
.pkg .savings {
  display: inline-block; background: var(--gold); color: #5b4000;
  font-weight: 800; font-size: .78rem; padding: 3px 10px; border-radius: 999px;
  margin: 2px 0 4px;
}
.pkg .price { font-size: 1.9rem; font-weight: 900; color: var(--ink); }
.pkg .price small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.pkg .monthly { color: var(--teal); font-weight: 700; font-size: .9rem; margin: 2px 0 14px; }
.pkg ul.treats { list-style: none; margin: 0 0 16px; padding: 0; flex: 1; }
.pkg ul.treats li {
  font-size: .84rem; line-height: 1.45; padding: 4px 0 4px 26px; position: relative;
}
.pkg ul.treats li::before {
  content: "✓"; position: absolute; left: 2px; top: 4px;
  color: var(--teal); font-weight: 900;
}
.span-opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 2px dashed var(--teal-light); border-radius: 12px;
  padding: 10px 12px; margin: 0 0 14px; transition: all .12s;
}
.span-opt:hover { border-color: var(--teal); background: #eef9fa; }
.pkg.span-on .span-opt { border-style: solid; border-color: var(--orange); background: #fff7f2; }
.span-opt input { width: 20px; height: 20px; flex: none; accent-color: var(--orange); }
.span-thumb { width: 34px; height: 50px; object-fit: contain; flex: none; }
.addon-head { font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.span-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.span-info b { font-size: .9rem; color: var(--teal); }
.span-info small { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.span-add { font-weight: 800; color: var(--orange); white-space: nowrap; }
.span-doc { display: inline-block; margin: -6px 0 14px; font-size: .82rem; font-weight: 700; color: var(--teal); text-decoration: none; }
.span-doc:hover { text-decoration: underline; }

.pkg details { margin: 0 0 16px; font-size: .82rem; }
.pkg details summary { cursor: pointer; color: var(--teal); font-weight: 700; }
.pkg details li { margin: 6px 0; color: var(--muted); }
.pkg .choose { width: 100%; }

/* ---------- photo uploads ---------- */
.optional { font-weight: 600; color: var(--muted); font-size: .82rem; }
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; max-width: 640px;
}
.photo-tile {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; min-height: 110px; padding: 12px 8px;
  border: 2px dashed var(--teal-light); border-radius: var(--radius);
  background: var(--panel); cursor: pointer; text-align: center;
  transition: all .12s; overflow: hidden;
  background-size: cover; background-position: center;
}
.photo-tile:hover { border-color: var(--teal); background-color: #e8f5f6; }
.photo-tile .tile-icon { font-size: 1.6rem; }
.photo-tile .tile-text { font-weight: 600; font-size: .8rem; line-height: 1.3; }
.photo-tile.uploading { opacity: .6; cursor: wait; }
.photo-tile.done { border-style: solid; border-color: var(--teal); }
.photo-tile.done .tile-icon { display: none; }
.photo-tile.done .tile-text {
  background: rgba(0, 78, 88, .78); color: #fff; border-radius: 8px;
  padding: 3px 8px; align-self: stretch; margin-top: auto;
}
.photo-tile .remove {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff;
  font-weight: 800; cursor: pointer; line-height: 1; display: none;
}
.photo-tile.done .remove { display: block; }

/* ---------- proposal review: sign panel + accepted card ---------- */
.sign-panel {
  max-width: 560px; margin: 26px auto 0; background: var(--panel);
  border: 2px solid var(--orange); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 18px;
}
.sign-panel h2 { margin-top: 0; }
.accepted-card {
  max-width: 460px; margin: 18px auto; background: var(--panel);
  border: 2px solid var(--teal); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.accepted-card h3 { margin: 0 0 6px; color: var(--teal); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.accepted-card .acc-line { color: var(--muted); font-weight: 600; font-size: .9rem; }
.accepted-card .acc-total { font-size: 1.8rem; font-weight: 900; color: var(--ink); margin-top: 8px; }
.accepted-card .acc-total small { font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---------- form ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error {
  color: #b3261e; background: #fde9e7; border: 1px solid #f3b6b1;
  border-radius: 10px; padding: 10px 14px; font-size: .9rem; font-weight: 600;
}

@media (max-width: 640px) {
  .logo { height: 50px; }
  .progress { top: 77px; }
  #app { padding: 20px 14px 32px; }
  .pkg .ribbon { font-size: .66rem; }
}
