/* Headwater Dispatch: shared styles
   Palette: floodwater navy at night, safety amber (the hazard light on a work truck), cool concrete. */
:root {
  --navy: #12304A;        /* floodwater at night: hero band, headings on light */
  --navy-deep: #0C2236;   /* footer */
  --amber: #F2A900;       /* safety amber: call buttons only */
  --amber-ink: #3A2A00;   /* text on amber */
  --ink: #1B2430;         /* body text */
  --slate: #566476;       /* secondary text */
  --concrete: #EEF2F4;    /* alternate section surface */
  --line: #CFD8DF;        /* rules and borders */
  --white: #FFFFFF;
  --focus: #F2A900;

  --wide: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 66ch;
  --radius-sm: 6px;
  --radius-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--wide);
  font-variation-settings: 'wdth' 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.prose { max-width: var(--measure); }

/* Headings: Archivo stretched wide, like lettering on a truck door */
h1, h2, h3 {
  font-family: var(--wide);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; font-variation-settings: 'wdth' 125; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.25rem); font-weight: 800; font-variation-settings: 'wdth' 118; color: var(--navy); }
h3 { font-size: 1.15rem; font-weight: 700; font-variation-settings: 'wdth' 108; }
p { margin: 0 0 1em; }

/* Header */
.site-header { background: var(--navy); color: var(--white); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white); text-decoration: none; font-weight: 800; font-variation-settings: 'wdth' 120; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; }
.header-link { color: #D6E2EC; font-size: 0.95rem; text-decoration: none; }
.header-link:hover { color: var(--white); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; font-variation-settings: 'wdth' 110;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-call { background: var(--amber); color: var(--amber-ink); }
.btn-call:hover { background: #FFB914; }
.btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.55); background: transparent; }
.btn-ghost:hover { border-color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-deep); }

/* Hero */
.hero { background: var(--navy); color: var(--white); padding-block: 2.5rem 4rem; overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } .hero { padding-block: 4rem 5.5rem; } }
.hero p.lede { font-size: 1.2rem; color: #D6E2EC; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-note { margin-top: 1rem; font-size: 0.95rem; color: #A9BDCE; }

/* The phone: the one memorable element */
.phone {
  justify-self: center;
  width: min(340px, 100%);
  background: #0A1A29;
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #23435F;
}
.phone-screen { background: #F4F6F8; border-radius: 24px; padding: 1.1rem 0.9rem 1.4rem; color: var(--ink); min-height: 420px; }
.phone-time { text-align: center; font-weight: 800; font-variation-settings: 'wdth' 125; font-size: 2.6rem; color: var(--navy); line-height: 1; margin: 0.6rem 0 0.2rem; }
.phone-date { text-align: center; font-size: 0.85rem; color: var(--slate); margin-bottom: 1.1rem; }
.sms {
  background: var(--white);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid var(--line);
}
.sms + .sms { margin-top: 0.6rem; }
.sms-from { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--slate); margin-bottom: 0.35rem; }
.sms-from strong { color: var(--ink); }
.sms-flag { display: inline-block; background: #FDECEA; color: #8A1C12; font-weight: 700; font-size: 0.78rem; border-radius: 4px; padding: 0.05rem 0.4rem; margin-bottom: 0.3rem; }
.sms-quiet { color: var(--slate); }
@media (prefers-reduced-motion: no-preference) {
  .sms.arrive { animation: arrive 700ms cubic-bezier(.2,.8,.2,1) 500ms both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
}

/* Sections */
section { padding-block: 4rem; }
.alt { background: var(--concrete); }
.section-intro { max-width: 60ch; color: var(--slate); font-size: 1.1rem; }

/* How it works: a real sequence, so it gets numbers */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.steps li { counter-increment: step; border-top: 3px solid var(--navy); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-weight: 800; font-variation-settings: 'wdth' 125; font-size: 2rem; color: var(--navy); line-height: 1; margin-bottom: 0.5rem; }
.steps p { color: var(--slate); margin: 0; }

/* Call log: what happens on each kind of call */
.calllog { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: 1rem; }
.calllog th, .calllog td { text-align: left; padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.calllog thead th { font-size: 0.9rem; color: var(--slate); font-weight: 600; border-bottom: 2px solid var(--navy); }
.calllog td:first-child { font-weight: 700; width: 38%; }
@media (max-width: 640px) {
  .calllog thead { position: absolute; left: -9999px; }
  .calllog, .calllog tbody, .calllog tr, .calllog td { display: block; width: 100%; }
  .calllog tr { border-bottom: 1px solid var(--line); padding-block: 0.6rem; }
  .calllog td { border: 0; padding: 0.2rem 0; }
  .calllog td:first-child { width: 100%; }
}

/* Report preview */
.report-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .report-grid { grid-template-columns: 1fr 1fr; } }
.report-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.report-card h3 { color: var(--navy); }
.report-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: 0; }
.report-row b { font-variation-settings: 'wdth' 115; }
.sample-tag { font-size: 0.85rem; color: var(--slate); margin-top: 0.75rem; }

/* Pricing */
.price-box { border: 2px solid var(--navy); border-radius: var(--radius-lg); padding: 2rem; max-width: 640px; background: var(--white); }
.price { font-weight: 800; font-variation-settings: 'wdth' 125; font-size: clamp(2.6rem, 6vw, 3.4rem); color: var(--navy); line-height: 1; }
.price span { font-size: 1.1rem; font-weight: 600; font-variation-settings: 'wdth' 100; color: var(--slate); }
.price-box ul { padding-left: 1.2rem; margin: 1.25rem 0 1.5rem; }
.price-box li { margin-bottom: 0.4rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding-block: 1rem; max-width: 760px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 800; color: var(--navy); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0.75rem 0 0; color: var(--ink); max-width: 66ch; }

/* Closing band */
.closing { background: var(--navy); color: var(--white); }
.closing h2 { color: var(--white); }
.closing p { color: #D6E2EC; max-width: 52ch; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #A9BDCE; padding-block: 2.5rem 6rem; font-size: 0.92rem; }
.site-footer a { color: #D6E2EC; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .site-footer { padding-bottom: 2.5rem; } }

/* Mobile call bar */
.callbar { position: fixed; inset: auto 0 0 0; background: var(--navy-deep); padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); display: flex; gap: 0.6rem; z-index: 10; box-shadow: 0 -6px 20px rgba(0,0,0,0.25); }
.callbar .btn { flex: 1; min-height: 48px; }
@media (min-width: 760px) { .callbar { display: none; } }

/* Legal and form pages */
.page-head { background: var(--navy); color: var(--white); padding-block: 2.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.page-head p { color: #D6E2EC; margin: 0; }
.legal { padding-block: 3rem 4rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal li { margin-bottom: 0.4rem; }

/* Onboarding form */
.form { display: grid; gap: 1.4rem; max-width: 720px; padding-block: 3rem 4rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.25rem 1.5rem; margin: 0; }
legend { font-weight: 800; font-variation-settings: 'wdth' 115; color: var(--navy); padding-inline: 0.4rem; font-size: 1.1rem; }
.field { display: grid; gap: 0.35rem; margin-top: 1rem; }
.field label, .check label { font-weight: 600; }
.hint { font-size: 0.9rem; color: var(--slate); margin: 0; }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  font: inherit; color: var(--ink); width: 100%;
  padding: 0.75rem 0.85rem; border: 1.5px solid #AEBBC6; border-radius: var(--radius-sm); background: var(--white);
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--navy); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 0.9rem; }
.check input { width: 22px; height: 22px; margin-top: 0.15rem; flex: none; accent-color: var(--navy); }
.check label { font-weight: 400; }
.consent { background: var(--concrete); border-color: var(--navy); }
.hidden { position: absolute; left: -9999px; }
