/* =========================================================================
   Rainbow Beach 4WD Parts & Repairs
   Design system — rugged coastal trade. Cobalt (logo) + Rainbow-sand amber.
   ========================================================================= */

:root {
  /* Brand */
  --blue-900: #0f3054;
  --blue-800: #143f6e;
  --blue-700: #1a5290;
  --blue-600: #1c5a99;   /* logo cobalt */
  --blue-500: #2f74b8;
  --blue-100: #e3edf6;
  --blue-050: #f1f6fb;

  --sand-600: #c9761a;
  --sand-500: #e08a1e;   /* rainbow-sand amber accent */
  --sand-400: #f2a341;
  --sand-100: #fbecd6;

  --ink: #16202b;
  --ink-soft: #3f4b58;
  --muted: #6a7683;
  --line: #dbe2e9;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #eef2f6;

  --ok: #1f8a4c;
  --err: #c23a2b;

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --wrap: 1180px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 48, 84, .08), 0 2px 8px rgba(15, 48, 84, .06);
  --shadow-md: 0 6px 24px rgba(15, 48, 84, .12);
  --header-h: 76px;
}

/* ---- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0 0 .4em; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); text-transform: uppercase; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--surface-2); }
.section--blue { background: var(--blue-800); color: #fff; }
.section--blue h2, .section--blue h3 { color: #fff; }
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em;
  font-weight: 600; font-size: .82rem; color: var(--sand-600); margin-bottom: .6rem;
}
.section--blue .eyebrow { color: var(--sand-400); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--blue-800); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.05rem; line-height: 1;
  padding: .85rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--sand-500); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--sand-400); }
.btn--phone { background: var(--blue-600); color: #fff; }
.btn--phone:hover { background: var(--blue-500); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--outline { background: transparent; color: var(--blue-700); border-color: var(--blue-600); }
.btn--outline:hover { background: var(--blue-050); }
.btn--lg { font-size: 1.2rem; padding: 1rem 1.9rem; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.site-header__bar { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--font-display); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand__name { display: none; line-height: 1; text-transform: uppercase; color: var(--blue-800); font-size: 1.1rem; letter-spacing: .02em; }
.brand__name span { display: block; color: var(--sand-600); font-size: .72rem; letter-spacing: .16em; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .03em;
  color: var(--ink); padding: .5rem .7rem; border-radius: 4px; font-size: 1.02rem;
}
.nav__link:hover { text-decoration: none; background: var(--surface-3); color: var(--blue-700); }
.nav__link[aria-current="page"] { color: var(--blue-700); box-shadow: inset 0 -3px 0 var(--sand-500); }
.header-cta { margin-left: .6rem; }

/* Mobile nav */
.nav-toggle {
  display: none; margin-left: auto; background: var(--blue-800); border: 0; color: #fff;
  width: 46px; height: 46px; border-radius: 6px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; fill: #fff; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; margin: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .22s ease; visibility: hidden;
  }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; padding: .6rem var(--gap) 1.2rem; gap: .1rem; }
  .nav__link { padding: .85rem .6rem; font-size: 1.15rem; border-bottom: 1px solid var(--surface-3); border-radius: 0; }
  .nav__link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sand-500); }
  .header-cta { display: none; }
}

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; color: #fff; background: var(--blue-900); }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .38; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, var(--blue-900) 12%, rgba(15,48,84,.72) 55%, rgba(15,48,84,.35) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: clamp(3.5rem, 9vw, 7rem); max-width: 760px; }
.hero h1 { margin-bottom: .3em; }
.hero h1 .accent { color: var(--sand-400); }
.hero__sub { font-size: 1.25rem; color: #e7eef5; max-width: 54ch; margin-bottom: 1.8rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.8rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: #cddbe9; font-size: .95rem; }
.hero__badges span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__badges svg { width: 1.1em; height: 1.1em; fill: var(--sand-400); }

/* ---- Trust strip -------------------------------------------------------- */
.trust { background: var(--blue-800); color: #fff; }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); }
.trust__item { background: var(--blue-800); padding: 1.3rem 1rem; text-align: center; }
.trust__item strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--sand-400); line-height: 1; }
.trust__item span { font-size: .92rem; color: #cddbe9; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 720px) { .trust__grid { grid-template-columns: repeat(2, 1fr); } }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); position: relative;
  border-top: 4px solid var(--blue-600); transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon { width: 46px; height: 46px; margin-bottom: .9rem; color: var(--blue-600); }
.card__icon svg { width: 100%; height: 100%; fill: none; stroke: var(--blue-600); stroke-width: 1.8; }
.card h3 { text-transform: uppercase; color: var(--blue-800); margin-bottom: .4rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card--link h3 a { color: inherit; }
.card__more { display: inline-block; margin-top: .9rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--sand-600); }

/* ---- Split feature ------------------------------------------------------ */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split--flip .split__media { order: -1; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--flip .split__media { order: 0; } }

/* ---- Content prose (service pages) -------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding: .35rem 0 .35rem 1.9rem; border-bottom: 1px solid var(--surface-3); }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .7rem; width: 20px; height: 20px;
  background: var(--sand-500);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; }
@media (max-width: 620px) { .checklist { grid-template-columns: 1fr; } }

.callout {
  background: var(--blue-050); border-left: 4px solid var(--sand-500); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 1.6rem 0;
}
.callout strong { color: var(--blue-800); }

/* ---- Page header (interior pages) --------------------------------------- */
.page-head { background: var(--blue-800); color: #fff; padding-block: clamp(2.4rem, 6vw, 4rem); }
.page-head .eyebrow { color: var(--sand-400); }
.page-head h1 { color: #fff; }
.page-head p { color: #dbe6f0; max-width: 60ch; margin-bottom: 0; }
.crumbs { font-size: .9rem; color: #bcd0e2; margin-bottom: .8rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; }
.crumbs a { color: #bcd0e2; }
.crumbs a:hover { color: #fff; }

/* ---- Reviews / testimonials --------------------------------------------- */
.quote {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.quote__stars { color: var(--sand-500); letter-spacing: .15em; margin-bottom: .6rem; font-size: 1.1rem; }
.quote p { font-style: italic; color: var(--ink); }
.quote__who { margin-top: auto; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-size: .95rem; }

/* ---- Reviews summary (branded rating band) ------------------------------ */
.rating-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem 2rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: clamp(1.4rem, 3vw, 2rem); border-top: 4px solid var(--sand-500);
}
.rating-hero__score { text-align: center; padding-right: 2rem; border-right: 1px solid var(--line); }
.rating-hero__num { font-family: var(--font-display); font-weight: 700; font-size: 3.6rem; line-height: 1; color: var(--blue-800); }
.rating-hero__stars { color: var(--sand-500); font-size: 1.35rem; letter-spacing: .1em; margin: .2rem 0; }
.rating-hero__count { font-size: .95rem; color: var(--muted); }
.rating-hero__count svg { width: 1em; height: 1em; vertical-align: -2px; margin-right: .2rem; }
.rating-hero__body h2 { margin-bottom: .3rem; }
.rating-hero__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
@media (max-width: 620px) {
  .rating-hero { grid-template-columns: 1fr; text-align: center; }
  .rating-hero__score { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 1.2rem; }
  .rating-hero__actions { justify-content: center; }
}
.stars { color: var(--sand-500); letter-spacing: .12em; }
.stars--muted { color: var(--line); }

/* ---- Suppliers ---------------------------------------------------------- */
.suppliers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 620px) { .suppliers { grid-template-columns: repeat(2, 1fr); } }
.supplier {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.supplier img { max-height: 100%; width: auto; object-fit: contain; }

/* ---- Contact ------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.info-list svg { flex: 0 0 auto; width: 24px; height: 24px; fill: none; stroke: var(--blue-600); stroke-width: 1.8; margin-top: 2px; }
.info-list strong { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--blue-800); }
.info-list a { color: var(--ink); }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { text-align: left; padding: .55rem .2rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
.hours-table th { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.hours-table td { color: var(--ink-soft); text-align: right; }
.hours-table tr.today th, .hours-table tr.today td { color: var(--blue-700); font-weight: 700; }

/* ---- Form --------------------------------------------------------------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; color: var(--ink); background: var(--surface-2); transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100); background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: .88rem; color: var(--muted); margin-top: .3rem; }
.form-status { padding: .9rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; display: none; font-weight: 500; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f5ec; color: var(--ok); border: 1px solid #b6e0c4; }
.form-status.err { background: #fbeae8; color: var(--err); border: 1px solid #f0c4bd; }

/* ---- Map --------------------------------------------------------------- */
.map-embed { border: 0; width: 100%; height: 340px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { background: var(--sand-500); color: var(--ink); text-align: center; }
.cta-band h2 { color: var(--ink); }
.cta-band .btn--phone { background: var(--blue-800); }
.cta-band .btn--phone:hover { background: var(--blue-900); }
.cta-band__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--blue-900); color: #c4d3e2; padding-block: 3rem 1.5rem; font-size: .96rem; }
.site-footer a { color: #dbe6f0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer-brand img { height: 64px; margin-bottom: .8rem; background: #fff; border-radius: 8px; padding: 6px; }
.footer-col h4 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: #fff; font-size: 1.05rem; margin-bottom: .8rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .45rem; }
.footer-social { display: inline-flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.footer-social svg { width: 22px; height: 22px; fill: currentColor; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; color: #9fb4c8; font-size: .88rem; }

/* ---- Utilities ---------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
