/* Brand colours (--ink, --red, --gold, --contrast, --blue) come from /brand.css, generated by scripts/build.mjs */
:root {
  --bg: var(--ink);
  --bg-alt: #12121b;
  --card: #181823;
  --line: #272734;
  --text: #f4f4f7;
  --muted: #a6a6b4;
  --btn: #d9040b;
  --gold-text: var(--gold);
  --shadow: #000c;
  --stripes: linear-gradient(90deg, var(--red) 0 25%, var(--gold) 0 50%, var(--contrast) 0 75%, var(--blue) 0);
  --radius: 14px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f7f9;
  --bg-alt: #eeeef3;
  --card: #fff;
  --line: #e0e0e8;
  --text: var(--ink);
  --muted: #565664;
  --shadow: #0003;
  --gold-text: #7a6640; /* the light-mode gold is too pale for small text */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Jost, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Theme-specific logo files */
[data-theme="light"] .logo-dark, :root:not([data-theme="light"]) .logo-light { display: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7em;
  text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; font-weight: 500;
  color: var(--muted); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 36px; height: 4px; background: var(--stripes); transform: skewX(-30deg); }
.accent { color: var(--gold-text); }

.btn {
  display: inline-block; padding: .85em 1.6em; border-radius: 999px;
  background: var(--btn); color: #fff; text-decoration: none; font-weight: 500;
  border: 1px solid var(--btn); transition: transform .15s, filter .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(.9); }
.btn-ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); filter: none; }
.btn-small { padding: .5em 1.2em; font-size: .95rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 68px; }
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
.theme-toggle:hover { border-color: var(--red); }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="light"] .icon-sun, :root:not([data-theme="light"]) .icon-moon { display: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: clamp(48px, 8vw, 110px) 0 64px;
  background:
    radial-gradient(600px 400px at 85% 30%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%),
    radial-gradient(500px 400px at 100% 90%, color-mix(in srgb, var(--red) 12%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-media { margin: 0; position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 30px 80px var(--shadow); }
.hero-media::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: -14px; height: 6px;
  background: var(--stripes); transform: skewX(-30deg);
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.stats div { padding: 24px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: 2.2rem; font-weight: 600; color: var(--gold-text); }
.stats span { color: var(--muted); font-size: .95rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin-bottom: 3rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--red); transform: translateY(-3px); }
.card ul, .values, .badges, .contact-list, .panel-list ul { list-style: none; margin: 0; padding: 0; }
.card li { color: var(--muted); padding: .35em 0 .35em 1.2em; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .95em; width: 8px; height: 2px; background: var(--red); }

.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.badges li {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 20px; font-weight: 500;
}
.badges span {
  display: block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: .3em;
}
.panel-list { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 20px; }
.panel-list summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.panel-list summary:hover { color: var(--text); }
.panel-list ul { columns: 3; column-gap: 32px; margin-top: 20px; color: var(--muted); }
.panel-list li { padding: .3em 0; break-inside: avoid; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about > div p { color: var(--muted); font-size: 1.1rem; }
.values { display: grid; gap: 16px; }
.values li { border-left: 3px solid var(--red); padding: 6px 0 6px 20px; }
.values li:nth-child(2) { border-color: var(--gold); }
.values li:nth-child(3) { border-color: var(--contrast); }
.values li:nth-child(4) { border-color: var(--blue); }
.values p { color: var(--muted); margin: 0; }

.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: stretch; }
address { font-style: normal; font-size: 1.2rem; margin-bottom: 1.5rem; }
.contact-list { margin-bottom: 2rem; }
.contact-list li { display: flex; gap: 1rem; padding: .5em 0; border-bottom: 1px solid var(--line); }
.contact-list span { width: 100px; color: var(--muted); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold-text); }
.map { width: 100%; min-height: 380px; border: 0; border-radius: var(--radius); }
:root:not([data-theme="light"]) .map { filter: grayscale(1) invert(.92) contrast(.9); }

.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer::before { content: ""; display: block; height: 4px; background: var(--stripes); margin-top: -41px; margin-bottom: 36px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer img { height: 40px; width: auto; }
.footer p { color: var(--muted); margin: 0; font-size: .9rem; }
.footer p a:hover { color: var(--gold-text); }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 20;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 30px var(--shadow);
}
.wa-float svg { width: 30px; height: 30px; }

.not-found { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1rem; }
/* Standalone pages (404, brand) */
.page-logo img { width: min(340px, 75vw); margin-bottom: 2rem; }
.page > .theme-toggle { position: fixed; top: 16px; right: 16px; }

/* Brand assets page */
.brand h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.swatches { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.swatches li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: .9rem; color: var(--muted); }
.swatches span { display: block; height: 64px; border-radius: 8px; margin-bottom: 12px; border: 1px solid var(--line); }
.swatches b { display: block; font-size: 1rem; color: var(--text); }
.note { color: var(--muted); font-size: .9rem; }
.brand-logos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.brand-logos figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.brand-logos figure div { padding: 24px; border-radius: 8px; margin-bottom: 12px; border: 1px solid var(--line); }
.brand-logos img { width: 100%; max-height: 128px; object-fit: contain; }
.brand-logos figcaption { color: var(--muted); font-size: .9rem; }
.brand-logos a { color: var(--gold-text); }

.nav-links .nav-accident { color: var(--red); }
.hero-accident, .card-link { display: inline-block; margin-top: 1.2rem; color: var(--gold-text); font-weight: 500; text-decoration: none; }
.hero-accident:hover, .card-link:hover { text-decoration: underline; }

/* Quote form */
.quote { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote-form label { display: grid; gap: 6px; font-size: .95rem; color: var(--muted); }
.quote-form .wide { grid-column: 1 / -1; }
.quote-form input, .quote-form select, .quote-form textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .7em .9em; width: 100%;
}
.quote-form :focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.quote-note { color: var(--muted); font-size: .9rem; margin: 0; }
.quote-form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 500; }

/* Google reviews */
.stars { color: var(--gold); letter-spacing: .1em; }
/* Masonry columns, so short reviews stack instead of leaving gaps */
.reviews-list { list-style: none; margin: 2rem 0 0; padding: 0; columns: 3 280px; column-gap: 20px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; break-inside: avoid; margin-bottom: 20px; }
.review-text { color: var(--muted); margin: 0; }
.review-author { font-weight: 500; }
.reviews-credit { margin-top: 1.5rem; }
.reviews-credit a { color: var(--gold-text); font-weight: 500; text-decoration: none; }

/* Accident page */
.accident h1 { max-width: 14em; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 4rem 0; display: grid; gap: 28px; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding-left: 72px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -4px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: 1.3rem; background: var(--red); color: #fff;
}
.steps h2 { font-size: 1.35rem; margin-bottom: .3em; }
.steps p { color: var(--muted); margin: 0; }
.steps a, .checklist a { color: var(--gold-text); }
.checklist { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 28px; max-width: 760px; }
.checklist h2 { font-size: 1.35rem; }
.checklist ul { color: var(--muted); padding-left: 1.2em; }
.checklist p { margin: 0; }

/* Link preview card (1200x630), screenshotted by build.ts */
.og {
  width: 1200px; height: 630px; overflow: hidden; position: relative;
  display: grid; grid-template-columns: 1fr 520px; align-items: center;
}
.og::after { content: ""; position: absolute; inset: auto 0 0; height: 10px; background: var(--stripes); }
.og-text { padding: 0 48px 0 64px; }
.og-text img { width: 360px; margin-bottom: 40px; }
.og h1 { font-size: 3.4rem; }
.og-services { color: var(--muted); font-size: 1.25rem; margin-bottom: .6em; }
.og-contact { font-size: 1.35rem; font-weight: 500; color: var(--gold-text); margin: 0; }
.og-photo {
  height: 100%; width: 100%; object-fit: cover; object-position: 35% center;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

@media (max-width: 900px) {
  .hero-inner, .about, .contact, .quote { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .panel-list ul { columns: 2; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .nav-logo img { height: 26px; }
  .grid, .panel-list ul { grid-template-columns: 1fr; columns: 1; }
  .quote-form { grid-template-columns: 1fr; }
}
