/* Plumbers Advise — customer landing page
   Mobile-first: designed for 375–412px phones, scales up on desktop. */

:root {
  --ink: #1c2b28;
  --ink-soft: #41544f;
  --teal: #0e4d43;
  --teal-dark: #0a3a33;
  --teal-soft: #e3efec;
  --bg: #f6f8f7;
  --card: #ffffff;
  --line: #d5e0dd;
  --warn-bg: #fdf3e3;
  --warn-line: #e4c58f;
  --error: #a1332a;
  --focus: #b45309;
  --radius: 12px;
  --tap: 48px;
}

* { box-sizing: border-box; }

/* .btn sets display, which would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

html {
  /* keep tap targets 48px+ even if the user zooms out small */
  font-size: 17px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem; /* >=16px */
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word; /* no horizontal scroll from long words */
  max-width: 100%;
}

img, video { max-width: 100%; }

/* ---------- layout ---------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 0.95rem; /* >= 16px at base 17px */
  color: var(--ink-soft);
}

section { margin-top: 2.25rem; }

h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

p { margin: 0 0 0.75rem; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}
.skip-link:focus { left: 0.5rem; }

/* ---------- hero ---------- */
.hero {
  margin-top: 0.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--teal);
  color: #f2f8f6;
  border-radius: var(--radius);
}

.hero h1 { color: #ffffff; }

.hero-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: #d7ece6;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: grid;
  gap: 0.75rem;
}

.hero-note {
  font-size: 0.95rem;
  color: #b9d6cf;
  margin: 1rem 0 0;
}

/* ---------- buttons (min 48px tap target) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.7rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background: #f5b942;
  border-color: #f5b942;
  color: #33260a;
}
.btn-primary:active { background: #e0a52c; }

.btn-secondary {
  background: transparent;
  border-color: #9cc8bf;
  color: #eafaf5;
}
.btn-secondary:active { background: rgba(255, 255, 255, 0.08); }
/* Outline button for light backgrounds (plumber, offer and admin pages). */
.btn-outline {
  background: var(--card);
  border-color: var(--teal);
  color: var(--teal);
}
.btn-outline:active { background: var(--teal-soft); }
.btn-outline[aria-pressed="true"] { background: var(--teal); color: #fff; }

.btn-block { width: 100%; }

a.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- how it works ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0.75rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 3.25rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 800;
  border-radius: 50%;
}

.steps li p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- pricing ---------- */
.price-card {
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--teal);
  margin: 0;
  line-height: 1.1;
}

.price-detail { margin: 0.25rem 0 0.75rem; font-weight: 600; }

.price-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.price-list li { margin-bottom: 0.35rem; }

/* ---------- why local ---------- */
.local-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.local-list li { margin-bottom: 0.35rem; }

/* ---------- test hours ---------- */
.hours {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.placeholder-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- FAQ ---------- */
details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 1rem;
  margin-bottom: 0.6rem;
}

summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.85rem 0;
  list-style: none;
  min-height: calc(var(--tap) - 1.7rem); /* keep the whole row tappable */
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  float: right;
  font-weight: 800;
  color: var(--teal);
}

details[open] summary::after { content: "\2013"; }

details p {
  padding: 0 0 1rem;
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- request form ---------- */
.request {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
}

.request-lede { color: var(--ink-soft); }

#request { scroll-margin-top: 1rem; }

form { margin-top: 0.5rem; }

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}

legend {
  font-weight: 700;
  padding: 0;
  margin-bottom: 0.5rem;
}

.mode-fieldset .mode-option,
.agree {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: var(--tap);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.mode-option { justify-content: center; }

.mode-fieldset .mode-option { width: 100%; }

.mode-option:has(input:checked),
.agree:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}

/* radios/checkboxes: visible + large tap area */
input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 2px solid var(--ink-soft);
  background: #fff;
  cursor: pointer;
  position: relative;
  margin-top: 0.1rem;
}

input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: 6px; }

input[type="radio"]:checked {
  border-color: var(--teal);
  border-width: 8px; /* fat dot */
}

input[type="checkbox"]:checked {
  background: var(--teal);
  border-color: var(--teal);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.agree { align-items: flex-start; }
.agree span { font-size: 0.95rem; }

.field { margin-bottom: 1.1rem; }

.field label,
.field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  min-height: var(--tap);
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input::placeholder { color: #8aa09a; }

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 480px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* photo picker + thumbnails */
.field input[type="file"] {
  width: 100%;
  min-height: var(--tap);
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink-soft);
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fbfdfc;
  overflow: hidden; /* long file names don't stretch the box */
}

.hint {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0.45rem 0 0;
}

.thumbs {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.thumb img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.thumb button {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 77, 67, 0.85);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

/* disclaimer near form */
.disclaimer {
  font-size: 0.95rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  margin: 1.1rem 0;
}

.form-error {
  color: var(--error);
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}

/* ---------- thanks page ---------- */
.thanks-hero {
  margin-top: 0.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--teal);
  color: #f2f8f6;
  border-radius: var(--radius);
}

.thanks-hero h1 { color: #fff; }

.thanks-sub {
  font-size: 1.05rem;
  color: #d7ece6;
  margin: 0;
}

.tip {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.thanks-actions { margin-top: 2rem; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-footer p { margin: 0 0 0.6rem; }

.site-footer .disclaimer {
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.8rem;
}

/* ---------- desktop: still fine, just wider columns ---------- */
@media (min-width: 720px) {
  html { font-size: 18px; }
  main { padding: 0 2rem 3rem; }
  .hero { padding: 2.5rem 2.25rem; }
  .hero-actions { grid-template-columns: 1fr 1fr; max-width: 480px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li { padding: 1.1rem 1.1rem 1.1rem 3.4rem; }
  .request { max-width: 560px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

html { scroll-behavior: smooth; }

/* Profile: the plumber a customer is matched with (call page, signup preview) */
.plumber-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
}
.plumber-card img {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--teal-soft);
}
.plumber-card h2,
.plumber-card h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.plumber-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; overflow-wrap: anywhere; }
.field textarea { min-height: 6.5rem; resize: vertical; }
.counter { font-size: 0.85rem; color: var(--ink-soft); text-align: right; margin: 0.2rem 0 0; }

.site-nav { display: flex; gap: 1rem; font-size: 0.95rem; font-weight: 600; }
.site-nav a { color: var(--teal); }

/* Booking calendar (index.html): a month grid, then the day's open 15-minute starts as chips */
.picker { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.hint-inline { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.cal-title { margin: 0; font-size: 1.05rem; }
.cal-nav { min-width: var(--tap); min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.cal-dow span { text-align: center; font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; padding: 0.2rem 0; }
.cal-day { min-height: 42px; border: 1px solid transparent; border-radius: 10px; background: var(--teal-soft); color: var(--ink);
  font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.cal-day:disabled { background: transparent; color: #b4c2be; font-weight: 400; cursor: default; }
.cal-day[aria-pressed="true"] { background: var(--teal); color: #fff; }
.cal-day.today { border-color: var(--teal); }
.cal-day:focus-visible, .chip-slot:focus-visible, .cal-nav:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.slot-group { margin-top: 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.slot-group summary { padding: 0.6rem 0.75rem; font-weight: 700; cursor: pointer; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 0.75rem 0.75rem; }
.chip-slot { min-height: 44px; min-width: 5.2rem; padding: 0.4rem 0.7rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.chip-slot[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }

.footer-signup { display: inline-flex; width: auto; min-height: 40px; padding: 0.3rem 1rem; font-size: 0.95rem; }
