/* ==========================================================================
   Unique Auto Panel & Paint — shared stylesheet
   Palette (design-language.md): deep oxblood on a warm-white ground, editorial
   serif headings. Light default with a dark graphite override.

   Token roles are kept separate on purpose:
     --brand-*        : the oxblood accent (remapped brighter in dark mode)
     --on-brand       : text/icons that sit ON a saturated brand/ink background
                        (nav, footer, hero overlay, primary buttons) — stays
                        near-white in BOTH themes, never flips with the surface
     --surface        : card / panel fill — DOES flip dark in dark mode
     --bg / --text    : the page's own swappable ground + body text
   ========================================================================== */

:root {
  /* Brand */
  --brand: #8E2434;          /* deep oxblood */
  --brand-strong: #74192a;   /* hover / pressed */
  --brand-soft: #f3e3e5;     /* faint tint for chips/backgrounds */

  /* Ground + ink (light) */
  --bg: #FBF9F7;             /* warm white */
  --bg-alt: #EFECE8;         /* light grey band */
  --surface: #ffffff;        /* card fill */
  --surface-2: #f5f2ef;      /* nested / inset fill */
  --text: #1A1B1D;           /* graphite ink */
  --text-muted: #6c6c68;     /* readable muted */
  --steel: #9A9A96;          /* captions, hairlines */
  --border: #e2ded9;

  /* Fixed-role tokens (do NOT remap in dark mode) */
  --ink: #1A1B1D;            /* nav/footer ground — dark in both themes */
  --on-brand: #FBF9F7;       /* text on brand/ink surfaces — light in both */
  --on-brand-muted: #cfc9c4;

  --shadow: 0 1px 3px rgba(26, 27, 29, .08), 0 8px 24px rgba(26, 27, 29, .06);
  --shadow-lg: 0 8px 40px rgba(26, 27, 29, .14);

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1160px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --brand: #C4485A;          /* oxblood nudged brighter for a dark base */
  --brand-strong: #d7677a;
  --brand-soft: #34232a;

  --bg: #161719;             /* graphite ground */
  --bg-alt: #1F2123;
  --surface: #1F2123;        /* card fill flips dark */
  --surface-2: #26282b;
  --text: #F0EDE9;           /* warm off-white */
  --text-muted: #b4b0aa;
  --steel: #8b8b86;
  --border: #33363a;

  /* --ink and --on-brand deliberately unchanged: nav/footer stay dark
     graphite, and text on them stays warm off-white in both themes. */
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}

/* --------------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--text);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 .75rem;
}
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: var(--on-brand);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.4rem; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); }
.btn--wa { background: #25D366; color: #08331b; }
.btn--wa:hover { background: #1eb457; }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: var(--on-brand); }
.btn--ghost-on-brand { background: rgba(255,255,255,.12); color: var(--on-brand); border-color: rgba(255,255,255,.5); }
.btn--ghost-on-brand:hover { background: rgba(255,255,255,.22); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --------------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem; max-width: var(--maxw); margin: 0 auto;
}
.brand {
  display: flex; align-items: baseline; gap: .1rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.28rem;
  color: var(--on-brand); text-decoration: none; line-height: 1; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .amp { color: var(--brand); }
.brand small {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-brand-muted); margin-top: .2rem;
}
.nav-links {
  display: flex; gap: .3rem; margin-left: auto; align-items: center;
  list-style: none; padding: 0;
}
.nav-links a {
  color: var(--on-brand); font-weight: 500; font-size: .95rem;
  padding: .5rem .8rem; border-radius: var(--radius-sm); text-decoration: none;
}
.nav-links a:hover { background: rgba(255,255,255,.1); }
/* Active link sits on the always-dark --ink header, so keep the text at full
   on-brand contrast and carry the "current page" cue with a brand underline
   rather than tinting the text (dark oxblood on near-black fails AA). */
.nav-links a[aria-current="page"] {
  color: var(--on-brand);
  text-decoration: underline;
  text-decoration-color: var(--brand-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
[data-theme="dark"] .nav-links a[aria-current="page"] { text-decoration-color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-call {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--on-brand); font-weight: 600; font-size: .95rem;
  padding: .5rem .9rem; border-radius: var(--radius-sm);
  background: var(--brand); text-decoration: none;
}
.nav-call:hover { background: var(--brand-strong); text-decoration: none; }

/* theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: var(--on-brand); cursor: pointer; flex: none;
}
.theme-toggle:hover { background: rgba(255,255,255,.2); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* mobile nav */
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: var(--on-brand); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 300px);
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--ink); padding: 5rem 1.25rem 2rem;
    transform: translateX(100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg); margin-left: 0;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: .8rem 1rem; font-size: 1.05rem; }
  .nav-call span.full { display: none; }
  .brand { font-size: 1.05rem; }
}
@media (max-width: 400px) {
  .brand { font-size: .92rem; }
}

/* --------------------------------------------------------------------- hero */
.hero { position: relative; color: var(--on-brand); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(20,10,12,.9) 0%, rgba(26,27,29,.78) 42%, rgba(142,36,52,.55) 100%);
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) 1.25rem;
}
.hero-content { max-width: 40rem; }
.hero h1 { color: var(--on-brand); }
.hero .eyebrow { color: #f0b8c0; }
.hero p { color: var(--on-brand-muted); font-size: 1.2rem; max-width: 36rem; }
.hero .btn-row { margin-top: 1.75rem; }

/* --------------------------------------------------------------- trust strip */
.trust {
  background: var(--brand); color: var(--on-brand);
}
.trust ul {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .5rem 1.5rem; list-style: none; margin: 0; padding: 1rem 1.25rem;
  max-width: var(--maxw); margin: 0 auto; font-weight: 600; font-size: .95rem;
}
.trust li { display: inline-flex; align-items: center; gap: .5rem; }
.trust li::before { content: "✓"; font-weight: 700; opacity: .9; }
.trust li + li { position: relative; }

/* --------------------------------------------------------------------- grid */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  height: 100%;
}
.card h3 { margin-top: 0; }
.card .card-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 1rem;
  background: var(--brand-soft); color: var(--brand);
}
.card .card-icon svg { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }
.card a.card-link { font-weight: 600; }

/* service detail blocks */
.svc-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.svc-block h3 { display: flex; align-items: center; gap: .6rem; }
.svc-block ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.svc-block ul li { margin-bottom: .35rem; }

/* two-column feature (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* work strip */
.work-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 780px) { .work-strip { grid-template-columns: 1fr 1fr; } }
.work-strip figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.work-strip img { width: 100%; height: 240px; object-fit: cover; }
.work-strip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem .9rem;
  background: linear-gradient(transparent, rgba(20,10,12,.82));
  color: var(--on-brand); font-size: .9rem; font-weight: 500;
}

/* callout / notice */
.notice {
  background: var(--brand-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; color: var(--text); font-size: .95rem;
}
[data-theme="dark"] .notice { color: var(--text); }
.notice strong { color: var(--brand); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--on-brand); text-align: center; }
.cta-band h2 { color: var(--on-brand); }
.cta-band p { color: var(--on-brand-muted); max-width: 46ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 1.5rem; }

/* --------------------------------------------------------------- gallery */
.work-strip--gallery { grid-template-columns: repeat(3, 1fr); }
.work-strip--gallery img { height: 260px; }
@media (max-width: 900px) { .work-strip--gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .work-strip--gallery { grid-template-columns: 1fr; } }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: 1fr; } }
.ba-pair { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ba-images { display: grid; grid-template-columns: 1fr 1fr; }
.ba-images figure { margin: 0; position: relative; }
.ba-images img { width: 100%; height: 220px; object-fit: cover; }
.ba-images figure::before {
  content: attr(data-label); position: absolute; top: .6rem; left: .6rem; z-index: 1;
  background: var(--ink); color: var(--on-brand); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 4px;
}
.ba-images figure + figure::before { background: var(--brand); }
.ba-caption { padding: 1rem 1.2rem; }
.ba-caption h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.ba-caption p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .85rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ic { color: var(--brand); flex: none; margin-top: .1rem; }
.info-list .ic svg { width: 22px; height: 22px; }
.info-list .lbl { font-weight: 600; display: block; }
.info-list a { color: var(--text); }
.info-list a:hover { color: var(--brand); }

/* form */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .8rem; font-family: inherit; font-size: 1rem;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem 1rem; margin: 0 0 1rem; }
fieldset legend { font-weight: 600; font-size: .92rem; padding: 0 .4rem; }
.radio-row { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; margin: 0; }
.radio-row input { width: auto; }
.form-hint { font-size: .88rem; color: var(--text-muted); margin-top: .25rem; }

/* map */
.map-embed { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* --------------------------------------------------------------- press list */
.press-list { list-style: none; padding: 0; margin: 0; }
.press-list li { padding: .9rem 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; }
.press-list li:last-child { border-bottom: 0; }
.press-list .yr { font-family: var(--font-head); color: var(--brand); font-weight: 600; min-width: 3.5rem; }
.press-list .pub { font-weight: 600; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--on-brand-muted); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h4 { color: var(--on-brand); font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .9rem; }
.site-footer a { color: var(--on-brand-muted); }
.site-footer a:hover { color: var(--on-brand); }
.footer-brand .brand { margin-bottom: .8rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-note { font-size: .8rem; color: var(--steel); max-width: 60ch; margin-top: .6rem; }

/* --------------------------------------------------- sticky mobile call bar */
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem; font-weight: 700; text-decoration: none; font-size: 1rem; }
  .mobile-bar .mb-call { background: var(--brand); color: var(--on-brand); }
  .mobile-bar .mb-wa { background: #25D366; color: #08331b; }
  .mobile-bar svg { width: 20px; height: 20px; }
  body { padding-bottom: 3.4rem; }
}

/* utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head.center { margin-inline: auto; }
