/* SPDX-License-Identifier: Apache-2.0 */
/* Gray Duck Locks — one hand-written stylesheet, mobile first. Draft look; Eric approves the design (phase 1 task C1). */

:root {
  --ink: #1f2328;
  --ink-soft: #4a525c;
  --paper: #ffffff;
  --paper-alt: #f3f4f6;
  --slate: #2b3036;
  --slate-ink: #e8eaed;
  --accent: #e07a1f;          /* call-to-action orange */
  --accent-ink: #1f1300;
  --accent-hover: #c96a12;
  --link: #0b5cad;
  --line: #d6d9de;
  --zone-rapid: #ecc6a4;      /* accent 38% over paper-alt */
  --map-water: #a9cbe8;
  --map-road: #7a828c;
  --zone-standard: #f0decf;   /* accent 18% over paper-alt */
  --zone-extended: #c0d3e6;   /* link 22% over paper-alt */
  --radius: 10px;
  --wrap: 68rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed;
    --ink-soft: #b4bac2;
    --paper: #16191c;
    --paper-alt: #20252a;
    --link: #7db8f5;
    --line: #3a4048;
    --zone-rapid: #8f5a2b;
    --map-water: #23415c;
    --map-road: #8c949e;
    --zone-standard: #433428;
    --zone-extended: #344557;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: 4.5rem; /* room for the mobile call bar */
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.8rem); margin: 2rem 0 .75rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }

.site-header { background: var(--slate); color: var(--slate-ink); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand img { display: block; width: 140px; height: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-nav a { color: var(--slate-ink); text-decoration: none; font-weight: 600; padding: .35rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.site-header .header-call { display: none; margin-left: auto; }

.btn {
  display: inline-block; padding: .8rem 1.25rem; border-radius: var(--radius);
  font-weight: 700; text-decoration: none; border: 2px solid transparent; text-align: center;
}
.btn-call { background: var(--accent); color: var(--accent-ink); }
.btn-call:hover { background: var(--accent-hover); }
.btn-secondary { border-color: currentColor; color: inherit; }

.hero { background: var(--slate); color: var(--slate-ink); padding: 2rem 0 2.5rem; }
.hero p { color: var(--slate-ink); max-width: 40rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.hero .btn-secondary { color: var(--slate-ink); }

.section { padding: 1.5rem 0; }
.section-alt { background: var(--paper-alt); }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 0; list-style: none; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--paper); }
.card h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.makes { columns: 2 10rem; padding-left: 1.1rem; }
.notice { border-left: 4px solid var(--accent); background: var(--paper-alt); padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }

.site-footer { background: var(--slate); color: var(--slate-ink); padding: 1.5rem 0; margin-top: 2rem; font-size: .95rem; }
.site-footer a { color: var(--slate-ink); }
.tagline { font-weight: 700; }

.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--accent); color: var(--accent-ink); text-align: center;
  font-weight: 800; font-size: 1.15rem; padding: .95rem 1rem; text-decoration: none;
  box-shadow: 0 -2px 8px rgb(0 0 0 / .2);
}

@media (min-width: 52rem) {
  body { padding-bottom: 0; }
  .call-bar { display: none; }
  .site-header .header-call { display: inline-block; }
  .brand img { width: 180px; }
  .hero { padding: 3.5rem 0 4rem; }
}

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

/* Quote form */
.narrow { max-width: 42rem; }
.quote fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1rem; }
.quote legend { font-weight: 800; font-size: 1.2rem; padding: 0 .35rem; }
.quote label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
.quote .choice { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; margin: .55rem 0; cursor: pointer; }
.quote .choice input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; }
.quote .ack { background: var(--paper-alt); padding: .75rem; border-radius: var(--radius); }
.quote input:not([type=radio]):not([type=checkbox]), .quote select, .quote textarea {
  width: 100%; font: inherit; padding: .7rem .75rem; border: 1px solid var(--ink-soft);
  border-radius: 8px; background: var(--paper); color: var(--ink);
}
.quote [aria-invalid="true"] { border-color: #c62828; outline: 2px solid #c62828; }
.quote .hint { font-weight: 400; color: var(--ink-soft); }
.quote .row3 { display: grid; gap: 0 .75rem; grid-template-columns: 1fr; }
.quote .question { margin: .75rem 0 1rem; }
.quote .question-prompt { font-weight: 700; margin: .25rem 0; }
.quote .field-error { color: #c62828; font-weight: 700; margin: .4rem 0 0; }
.quote-progress { color: var(--ink-soft); margin: .25rem 0 .75rem; }
.quote-nav { display: flex; gap: .75rem; justify-content: space-between; margin-top: .5rem; }
.quote-nav [data-next], .quote-nav [data-submit] { margin-left: auto; }
.quote-status { min-height: 1.5em; font-weight: 600; }
.search-results { list-style: none; padding: 0; margin: .25rem 0 0; border: 1px solid var(--line); border-radius: 8px; }
.search-results button { width: 100%; text-align: left; font: inherit; padding: .6rem .75rem; background: none; border: 0; color: var(--link); cursor: pointer; }
.search-results li + li { border-top: 1px solid var(--line); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 40rem) { .quote .row3 { grid-template-columns: 2fr 2fr 1fr; } }
@media (prefers-color-scheme: dark) { .quote .field-error { color: #ff8a80; } }

.btn-small { padding: .5rem .9rem; font-size: .95rem; margin-top: .6rem; }

/* Make pages */
.table-wrap { overflow-x: auto; }
.key-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.key-table th, .key-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.key-table th { background: var(--paper-alt); }

/* Service-area map (inline SVG; solid fills so overlapping circles never darken) */
.sa-map { margin: 1.25rem 0; }
.sa-map svg { width: 100%; height: auto; display: block; background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); }
.sa-zone { fill-rule: evenodd; }
.sa-zone-extended { fill: var(--zone-extended); }
.sa-zone-standard { fill: var(--zone-standard); }
.sa-zone-rapid { fill: var(--zone-rapid); }
.sa-dot-rapid { fill: var(--accent-hover); }
.sa-dot-standard { fill: var(--accent); }
.sa-dot-extended { fill: var(--link); }
.sa-water { fill: var(--map-water); stroke: none; }
.sa-county { fill: none; stroke: var(--ink-soft); stroke-width: .6; stroke-dasharray: 3 3; opacity: .55; }
.sa-highway { fill: none; stroke: var(--map-road); stroke-width: 1; stroke-linejoin: round; }
.sa-interstate { fill: none; stroke: var(--map-road); stroke-width: 2.2; stroke-linejoin: round; }
.sa-label, .sa-halo { font: 600 13px var(--font); }
.sa-label { fill: var(--ink); }
.sa-halo { fill: none; stroke: var(--paper-alt); stroke-width: 3px; stroke-linejoin: round; }
.sa-map figcaption { color: var(--ink-soft); margin-top: .5rem; }
.sa-key { display: inline-block; width: .9em; height: .9em; border-radius: 50%; vertical-align: -.1em; margin: 0 .2em 0 .6em; }
.sa-key-rapid { background: var(--accent); }
.sa-key-standard { background: var(--zone-standard); border: 1px solid var(--accent); }
.sa-key-extended { background: var(--link); opacity: .6; }
.sa-cities { columns: 2 10rem; padding-left: 1.1rem; }

/* Key identification (phase 4) */
.key-id { margin-top: 1rem; }
.key-id label { display: block; font-weight: 700; margin: .9rem 0 .25rem; }
.photos { margin-top: 1rem; }
.photos .photo-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.photos .photo-buttons .btn { margin-top: 0; }
.photo-list { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.photo-list li { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.photo-list img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.photo-buttons input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
