/* Gig Harbor Dumpster Rental — site styles. Mobile-first, no framework. */
:root {
  --ink: #14212b;
  --ink-soft: #3d4c57;
  --muted: #5b6a75;
  --line: #d5dde2;
  --bg: #ffffff;
  --bg-soft: #f2f5f6;
  --bg-tint: #e7eff1;
  --harbor: #0e4a5c;
  --harbor-dark: #0a3644;
  --accent: #e0661b;
  --accent-dark: #b54d0e;
  --accent-button: #bf5410; /* white text 4.7:1 (WCAG AA); --accent (3.45:1) is for borders and focus rings only */
  --ok: #1d6b3a;
  --ok-bg: #e6f3ea;
  --warn: #8a4b00;
  --warn-bg: #fff3e0;
  --danger: #a3221c;
  --danger-bg: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 33, 43, 0.06), 0 4px 14px rgba(20, 33, 43, 0.06);
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-offset, 88px); }
@media (min-width: 980px) { html { scroll-padding-top: var(--header-offset, 136px); } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--harbor); text-underline-offset: 2px; }
a:hover { color: var(--harbor-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.85rem, 5.5vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.95rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
table { border-collapse: collapse; width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section.soft { background: var(--bg-soft); }
.section.tint { background: var(--bg-tint); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; }
.fine { font-size: 0.9rem; color: var(--muted); }
.measure { max-width: 46em; }
.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;
}
.skip-link { position: absolute; left: 8px; top: 0; transform: translateY(-120%); background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { transform: translateY(8px); color: #fff; } /* hidden at any text size, not a fixed -60px */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  min-height: 48px; padding: 0.7em 1.2em; border-radius: 8px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-call { background: var(--accent-button); color: #fff; }
.btn-call:hover { background: var(--accent-dark); color: #fff; }
.btn-primary { background: var(--harbor); color: #fff; }
.btn-primary:hover { background: var(--harbor-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--harbor); border-color: var(--harbor); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.btn-row .btn { flex: 1 1 200px; }
@media (min-width: 640px) { .btn-row .btn { flex: 0 0 auto; } }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; line-height: 1.15; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 0.78rem; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-call { min-height: 44px; padding: 0.5em 0.8em; font-size: 0.95rem; white-space: nowrap; }
.nav-toggle {
  min-height: 44px; min-width: 44px; border: 2px solid var(--line); background: #fff; border-radius: 8px;
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 0 10px;
}
.site-nav { display: none; border-top: 1px solid var(--line); }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: 12px 16px; text-decoration: none; color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--harbor); box-shadow: inset 4px 0 0 var(--accent); }
/* No-JS fallback (menu always open) lives in a <noscript> style in <head>, so it never applies
   to JS visitors and the header doesn't shrink after the first paint (layout shift). */
.brand { min-width: 0; flex: 1 1 auto; }
.header-actions { flex: 0 0 auto; }
@media (max-width: 559px) {
  .brand { font-size: 0.98rem; }
  .brand small { display: none; }
  .header-call { padding: 0.5em 0.7em; }
}
@media (max-width: 429px) {
  .header-call .call-number { display: none; }
  .header-call::after { content: "Call"; }
}
@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; border-top: 0; }
  .site-nav ul { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 0 8px; }
  .site-nav a { padding: 8px 10px; border-radius: 6px; font-size: 0.95rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 6px 6px 0 0; }
}

/* Breadcrumbs */
.crumbs { font-size: 0.9rem; color: var(--muted); padding-top: 16px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted); }

/* Hero */
.hero { padding: 32px 0 40px; background: linear-gradient(180deg, var(--bg-tint), #fff); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.hero-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-photo figcaption { font-size: 0.85rem; color: var(--muted); padding: 8px 12px; background: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 0.8rem; color: var(--accent-dark); margin-bottom: 0.4em; }
.fact-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 1.2em 0 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .fact-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact-strip li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; font-size: 0.92rem; }
.fact-strip strong { display: block; font-size: 1.15rem; color: var(--harbor); }

/* Cards & grids */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card a.card-link { font-weight: 700; }

/* Price cards */
.price-card { display: flex; flex-direction: column; }
.price-card .size { font-size: 1.5rem; font-weight: 800; color: var(--harbor); margin: 0; }
.price-card .price { font-size: 2.1rem; font-weight: 800; margin: 2px 0 0; line-height: 1.1; }
.price-card .price-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8em; }
.price-card dl { margin: 0 0 0.8em; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.95rem; }
.price-card dt { color: var(--muted); }
.price-card dd { margin: 0; font-weight: 600; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table-scroll:focus-visible { outline-offset: 0; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--bg-soft); font-size: 0.9rem; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table .num { text-align: right; white-space: nowrap; }
@media (max-width: 639px) {
  .stack-table, .stack-table tbody { display: block; width: 100%; }
  .stack-table thead { display: none; }
  .stack-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .stack-table th, .stack-table td { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; border: 0; padding: 4px 12px; text-align: right; }
  .stack-table th { font-size: 1.05rem; }
  .stack-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .stack-table .num { text-align: right; }
}

/* Notices */
.notice { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line); background: var(--bg-soft); margin: 1em 0; }
.notice strong:first-child { display: block; margin-bottom: 0.2em; }
.notice.warn { background: var(--warn-bg); border-color: #f0c88a; }
.notice.info { background: var(--bg-tint); border-color: #b7cfd6; }
.notice.danger { background: var(--danger-bg); border-color: #f0b4ae; }
.notice.ok { background: var(--ok-bg); border-color: #a9d4b6; }
.answer { border-left: 5px solid var(--accent); background: #fff; padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); margin: 0 0 1.4em; }
.answer p:last-child { margin: 0; }

/* Materials lists */
.mat-list { list-style: none; padding: 0; }
.mat-list li { padding-left: 1.8em; position: relative; }
.mat-list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.mat-yes li::before { content: "✓"; color: var(--ok); }
.mat-no li::before { content: "✕"; color: var(--danger); }
.mat-ask li::before { content: "?"; color: var(--warn); }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-tint); color: var(--harbor-dark); vertical-align: middle; }

/* Forms (calculator + quote) */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .panel { padding: 24px; } }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 4px; }
.field .hint { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="number"],
.field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid #aab7bf; border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--harbor); outline: 3px solid rgba(224, 102, 27, 0.35); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.92rem; font-weight: 600; margin-top: 4px; }
.field-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; }
.form-status:empty { display: none; }
.req { color: var(--danger); }

/* Calculator results */
.calc-result { margin-top: 18px; }
.calc-result:empty { display: none; }
.result-weight { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 0.8em; }
.result-weight div { min-width: 0; }
.result-weight .big { font-size: 1.9rem; font-weight: 800; color: var(--harbor); line-height: 1.1; display: block; }
.status-banner { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 1em; }
.status-banner .icon { font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
.status-banner.ok { background: var(--ok-bg); color: var(--ok); }
.status-banner.near { background: var(--warn-bg); color: var(--warn); border: 2px solid #f0c88a; }
.status-banner.over { background: var(--danger-bg); color: var(--danger); border: 2px solid #f0b4ae; }
.status-banner a { color: inherit; font-weight: 800; }

/* CTA band */
.cta-band { background: var(--harbor); color: #fff; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band a:not(.btn) { color: #fff; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* Photos */
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { font-size: 0.85rem; color: var(--muted); padding: 8px 12px; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style-position: outside; min-height: 48px; }
.faq details > div { padding: 0 16px 14px; }

/* Footer */
.site-footer { background: var(--ink); color: #d8e0e5; padding: 40px 0 110px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.05rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } .site-footer { padding-bottom: 40px; } }
.footer-links { list-style: none; padding: 0; }
.footer-links a { display: inline-block; padding: 4px 0; }
.footer-phone { font-size: 1.3rem; font-weight: 800; }
.disclosure { border-top: 1px solid #33444f; margin-top: 24px; padding-top: 16px; color: #b9c5cc; font-size: 0.88rem; }

/* Sticky mobile action bar */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(20, 33, 43, 0.08);
}
.mobile-bar .btn { min-height: 50px; padding: 0.5em; font-size: 0.98rem; }
@media (min-width: 760px) { .mobile-bar { display: none; } }

/* Mobile usability fixes (mobile QA, tests/browser/run-mobile-qa.mjs) */
/* Focused fields and in-page links stop above the sticky call bar, not underneath it. */
@media (max-width: 759px) { html { scroll-padding-bottom: 88px; } }
/* Stand-alone links and the site name are comfortable tap targets (>= 44px tall). */
.card a.card-link { display: inline-flex; align-items: center; min-height: 44px; }
.brand { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; }
.footer-links a { padding: 10px 0; min-width: 44px; }
/* Stand-alone links (footer phone and quote link, 404 recovery list): 44px tap height. */
.footer-phone a, .site-footer a.footer-cta, .link-list a { display: inline-block; padding-block: 10px; min-height: 44px; }
.footer-phone a { padding-block: 6px; }
.footer-phone { margin: 0.4em 0; }
.link-list li { margin: 0; }
.crumbs a { display: inline-block; padding: 12px 8px 12px 0; margin: -12px -8px -12px 0; } /* >= 44px target, same visual layout */
/* Large text / browser zoom: long words wrap instead of widening the page, and the header row
   wraps instead of squeezing the site name into a single column. */
h1, h2, h3, .eyebrow { overflow-wrap: anywhere; }
.header-bar { flex-wrap: wrap; row-gap: 6px; padding-block: 6px; }
.brand { flex: 1 1 9em; }
.header-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
/* When enlarged text makes the header very tall, stop pinning it so it can't cover content. */
.site-header.header-tall { position: static; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .mobile-bar, .site-footer, .cta-band { display: none; } }

/* Quote form beside opening copy, with mobile stacking. */
.quote-hero { align-items: start; }
.quote-hero .hero-photo { margin-top: 24px; }
.hero-quote { min-width: 0; }
.hero-quote .lead { font-size: 1rem; margin-bottom: 14px; }
.hero-quote h2 { font-size: 1.5rem; }
.hero-quote .panel { padding: 18px; }
.hero-quote .form-grid { gap: 10px; }
.hero-quote .field textarea { min-height: 80px; }
@media (min-width: 900px) {
  .quote-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-quote .form-grid.two { grid-template-columns: 1fr 1fr; }
}

/* Roofing page: calculator under the short intro (left), quote form (right). */
.roof-tool { min-width: 0; }
.roof-tool .lead { margin-bottom: 1.2em; }
.roof-tool .panel h2 { font-size: 1.5rem; }
.calc-result { scroll-margin-top: 12px; }
.roof-why { align-items: center; }
@media (max-width: 1099px) { .roof-tool .form-grid.two { grid-template-columns: 1fr; } }
@media (min-width: 700px) and (max-width: 899px) { .roof-tool .form-grid.two { grid-template-columns: 1fr 1fr; } }
