/* public/css/style.css — Town & Task brand system ("The Local Work Order").
   Owns: CSS custom properties for the locked brand palette, base typography,
   and every M1 screen's layout. One file, no build step, no preprocessor
   (per the build brief's "no bundler" constraint). Mobile-first, single
   column, sticky-bottom-CTA pattern for the post-flow wizard. */

:root {
  --town-navy: #17384D;
  --ledger-cream: #F5F0E6;
  --work-ink: #141C22;
  --signal-orange: #B8472A;   /* CTAs only */
  --maple-green: #356149;     /* verified / success only */
  --galvanized: #5F6F76;      /* muted */

  --font-heading: 'Barlow', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --max-width: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ledger-cream);
  color: var(--work-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--town-navy);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; }
.muted { color: var(--galvanized); }

a { color: var(--town-navy); }
a:hover { color: var(--signal-orange); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--town-navy);
  color: white;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header / footer ---------- */
.site-header {
  background: var(--town-navy);
  color: white;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}
.wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark--small { font-size: 1.1rem; color: var(--town-navy); }
.site-nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--ledger-cream); }

.site-footer {
  background: var(--work-ink);
  color: var(--ledger-cream);
  margin-top: 3rem;
  padding: 2.5rem 0;
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
}
.site-footer a { color: var(--ledger-cream); }
.site-footer h3 { color: var(--ledger-cream); font-size: 1rem; }
.site-footer .muted { color: #a9b3ad; }
.site-footer ol, .site-footer ul.link-list {
  padding-left: 1.1rem;
  margin: 0;
}
.link-list { list-style: none; padding-left: 0 !important; }
.link-list li { margin-bottom: 0.4rem; }
@media (min-width: 640px) {
  .site-footer__inner { grid-template-columns: 1fr 2fr; }
  .site-footer__links { display: flex; gap: 3rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--signal-orange);
  color: white;
}
.btn-primary:hover { background: #9c3a21; color: white; }
.btn-secondary {
  background: transparent;
  border-color: var(--town-navy);
  color: var(--town-navy);
}
.btn-secondary:hover { background: var(--town-navy); color: white; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- cards / tiles ---------- */
.tile-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
}
.tile {
  display: block;
  background: white;
  border: 1px solid #ddd3bd;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--work-ink);
}
.tile h3 { color: var(--town-navy); margin-bottom: 0.25rem; }
.tile:hover { border-color: var(--signal-orange); }

.card {
  background: white;
  border: 1px solid #ddd3bd;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--galvanized);
  color: white;
}
.badge-success { background: var(--maple-green); }
.badge-warn { background: var(--signal-orange); }

/* ---------- hero / sections ---------- */
.hero {
  background: var(--town-navy);
  color: white;
  padding: 3rem 0 2.5rem;
}
.hero h1 { color: white; font-size: 2.1rem; }
.hero .promise { color: #cfe0e8; font-size: 1.05rem; max-width: 46ch; }

.section { padding: 2.5rem 0; }
.section--alt { background: white; }

.ladder {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}
@media (min-width: 560px) {
  .ladder { grid-template-columns: 1fr 1fr; }
}
.ladder .card { text-align: center; }
.ladder .price { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--town-navy); }
.ladder .price small { display: block; font-size: 0.85rem; color: var(--galvanized); font-weight: 600; }

.band-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: white;
}
.band-table th, .band-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e8e0cf;
}
.band-table th { font-family: var(--font-heading); color: var(--town-navy); }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--galvanized);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- forms ---------- */
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1px solid #b8b0a0;
  border-radius: 8px;
  background: white;
  color: var(--work-ink);
}
textarea { min-height: 6rem; resize: vertical; }
.hint { color: var(--galvanized); font-size: 0.9rem; margin-top: 0.3rem; }
.error-banner {
  background: #f8e3dc;
  border: 1px solid var(--signal-orange);
  color: #7a2c17;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.checkbox-row { display: flex; gap: 0.6rem; align-items: flex-start; }
.checkbox-row input { margin-top: 0.3rem; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

/* chips (availability windows) */
.chip-grid { display: grid; gap: 0.6rem; grid-template-columns: 1fr 1fr; }
.chip {
  display: block;
  border: 2px solid #b8b0a0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  background: white;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { border-color: var(--signal-orange); background: #fbe9e2; }

/* service type tiles */
.service-grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .service-grid { grid-template-columns: 1fr 1fr; } }
.service-tile {
  display: block;
  background: white;
  border: 2px solid #ddd3bd;
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--town-navy);
  cursor: pointer;
}
.service-tile:hover { border-color: var(--signal-orange); }

/* wizard shell */
.wizard {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem;
}
.wizard-progress { color: var(--galvanized); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.sticky-cta {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--ledger-cream) 60%, transparent);
  padding: 1rem 0 1.25rem;
  margin-top: 1.5rem;
}

/* photo uploader */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 1rem 0; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #ddd3bd; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .progress { position: absolute; inset: 0; background: rgba(23,56,77,0.55); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.photo-thumb.failed .progress { background: rgba(184,71,42,0.75); }
.upload-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* timeline (admin) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 2px solid #ddd3bd; padding: 0 0 1rem 1rem; margin-left: 0.4rem; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--town-navy); }
.timeline time { display: block; font-size: 0.8rem; color: var(--galvanized); }

table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #e8e0cf; vertical-align: top; }
table.plain th { color: var(--town-navy); font-family: var(--font-heading); }

.placeholder-note { font-size: 0.85rem; color: var(--galvanized); font-style: italic; }
