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

/* Harbor: deep navy + warm copper */
:root {
  --primary: #12324a;
  --primary-2: #1d4e6b;
  --primary-soft: #e6eef4;
  --accent: #c8692f;
  --accent-dark: #a5531f;
  /* Button copper: white text on it is 5.1:1 (WCAG AA); the lighter brand copper is 3.8:1. */
  --accent-btn: #ad5520;
  --accent-btn-dark: #8a4319;
  --on-accent: #fff;
  --on-primary-soft: #d6e4ee;
  --on-primary-muted: #a9c0d1;
  --ink: #172331;
  --ink-soft: #4b5b6a;
  --bg: #f4f1ec;
  --card: #ffffff;
  --line: #e2dcd2;
  --warn-bg: #fff7ea;
  --warn-line: #e4c58f;
  --error: #b3261e;
  --focus: #c8692f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --tap: 48px;
  /* header/footer bands span the page; their content lines up with main */
  --band-pad: max(1rem, calc((100% - 720px) / 2 + 1rem));
}

* { 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: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0;
  padding: 0.85rem var(--band-pad);
  background: var(--primary);
}

.brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand img { display: block; height: 40px; width: auto; }

.tagline {
  font-size: 0.95rem; /* >= 16px at base 17px */
  color: rgba(255, 255, 255, 0.75);
}

section { margin-top: 2.25rem; }

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

h1, h2 { letter-spacing: -0.015em; }

h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
  color: var(--primary);
}

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(--primary);
  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: 0 -1rem;
  padding: 1.75rem 1.25rem 1.5rem;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
}

.hero h1 { color: #ffffff; }

.hero-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--on-primary-soft);
  margin-bottom: 1.25rem;
}

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

.hero-note {
  font-size: 0.95rem;
  color: var(--on-primary-muted);
  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: var(--accent-btn);
  border-color: var(--accent-btn);
  color: var(--on-accent);
  box-shadow: 0 2px 0 var(--accent-btn-dark);
}
.btn-primary:active { background: var(--accent-btn-dark); border-color: var(--accent-btn-dark); }

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.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(--primary);
  color: var(--primary);
}
.btn-outline:active { background: var(--primary-soft); }
.btn-outline[aria-pressed="true"] { background: var(--primary); 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);
  box-shadow: var(--shadow);
  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(--primary-soft);
  color: var(--primary);
  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(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  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: var(--radius);
  box-shadow: var(--shadow);
  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(--primary);
}

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);
  box-shadow: var(--shadow);
  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: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  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(--primary);
  background: var(--primary-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(--primary);
  border-width: 8px; /* fat dot */
}

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

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; }
.notice {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary-2);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin: 0 0 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: #8b96a1; }

.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: #fcfbf9;
  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(18, 50, 74, 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;
}

.turnstile-box { margin: 0.75rem 0; min-height: 65px; }

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

/* ---------- thanks page ---------- */
.thanks-hero {
  margin: 0 -1rem;
  padding: 1.75rem 1.25rem 1.5rem;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
}

.thanks-hero h1 { color: #fff; }
.thanks-hero .hint { color: var(--on-primary-soft); }

.thanks-sub {
  font-size: 1.05rem;
  color: var(--on-primary-soft);
  margin: 0;
}

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

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

/* ---------- footer ---------- */
.site-footer {
  margin: 2rem 0 0;
  padding: 1.5rem var(--band-pad) 2.5rem;
  background: var(--primary);
  font-size: 0.95rem;
  color: var(--on-primary-soft);
}

.site-footer p { margin: 0 0 0.6rem; }
.site-footer a { color: #fff; }
main .site-footer { border-radius: var(--radius); }

.site-footer .disclaimer {
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
}

/* ---------- desktop: still fine, just wider columns ---------- */
@media (min-width: 720px) {
  html { font-size: 18px; }
  main { padding: 0 2rem 3rem; }
  .hero, .thanks-hero { margin: 1.25rem 0 0; padding: 2.5rem 2.25rem; border-radius: var(--radius); }
  .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(--primary-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: #fff; }

/* 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); box-shadow: var(--shadow); 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(--primary-soft); color: var(--ink);
  font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.cal-day:disabled { background: transparent; color: #b3b9bf; font-weight: 400; cursor: default; }
.cal-day[aria-pressed="true"] { background: var(--primary); color: #fff; }
.cal-day.today { border-color: var(--accent); }
.cal-day:focus-visible, .chip-slot:focus-visible, .cal-nav:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.slot-group { margin-top: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.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(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

.footer-signup { display: inline-flex; width: auto; min-height: 40px; padding: 0.3rem 1rem; font-size: 0.95rem; }
.site-footer .footer-signup { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #fff; }

/* Refund promise next to the price and the request button */
.refund-promise { display: block; background: #eaf5ee; border: 1px solid #b7dcc4; border-radius: 10px;
  padding: 0.6rem 0.75rem; margin: 0.75rem 0; font-weight: 600; color: #1d4a30; }
.refund-promise::before { content: "\2713"; font-weight: 800; margin-right: 0.45rem; }
.refund-promise a { color: inherit; }
.hero .refund-promise { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); color: #fff; }

/* About page */
.about-hero h1 { margin-bottom: 0.4rem; }
.about-hero p { font-size: 1.1rem; color: var(--on-primary-soft); margin: 0; }
.purpose-list, .save-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.purpose-list li, .save-list li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.9rem 1rem; }
.purpose-list h3, .save-list h3 { color: var(--primary); }
.purpose-list p, .save-list p { margin: 0; }
.promise { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.promise h2 { color: #fff; }
.promise p { color: var(--on-primary-soft); }
.promise p strong { color: #fff; }
.promise a { color: #fff; }
@media (min-width: 720px) { .purpose-list { grid-template-columns: repeat(3, 1fr); } }

/* Plumber write-up and earnings */
.status { font-weight: 700; }
.call-summary, .item-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; margin-bottom: 0.75rem; }
.call-summary p, .item-card p { margin: 0.2rem 0; }
.notes-text { white-space: pre-wrap; }
.rating { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.rating-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.rating-row label { position: relative; }
.rating-row input { position: absolute; opacity: 0; inset: 0; }
.rating-row span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); font-weight: 700; cursor: pointer; }
.rating-row input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.rating-row input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.rating-ends { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
.btn-danger { background: var(--card); border-color: var(--error); color: var(--error); }
.btn-danger:active { background: #fdecea; }
.money { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; }
.money div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.6rem; }
.money strong { display: block; font-size: 1.3rem; color: var(--primary); }
.money span { font-size: 0.85rem; color: var(--ink-soft); }
@media (min-width: 720px) { .money { grid-template-columns: repeat(4, 1fr); } }
.ledger { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.ledger li { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.ledger .refunded { color: var(--ink-soft); }

/* Price with Hawaii GET */
.price-tax { margin: -0.25rem 0 0.5rem; color: var(--ink-soft); }
.price-tax strong { color: var(--ink); }
.price-line { margin: 0.75rem 0 0; }

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

/* Why Plumbers Advise page */
.why-kicker { margin: 0 0 0.4rem; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #f0b48a; }
.why-hero p:not(.why-kicker):not(.hero-price):not(.hero-note) { font-size: 1.05rem; color: var(--on-primary-soft); }
.why-list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.why-list li { padding: 0.6rem 0 0.6rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.why-list li::before { content: "\2713"; position: absolute; left: 0.2rem; color: var(--accent-dark); font-weight: 800; }
.why-list strong { color: var(--primary); }
.why-safety { font-size: 0.9rem; margin: 0.9rem 0 0; }
.save-money ul, .why-hero ~ section .save-list, .why-who { margin-bottom: 0.75rem; }
@media (min-width: 720px) { .why-who { grid-template-columns: repeat(2, 1fr); } }
