/* ==========================================================================
   Westbay NAPA Auto Parts — landing page
   Display: Barlow Condensed · Body: Barlow
   ========================================================================== */

:root {
  --navy-900: #08192b;
  --navy-800: #0f2740;
  --navy-700: #17385a;
  --yellow:   #ffc72c;
  --yellow-d: #e5ad12;

  --bg:            #f4f6f9;
  --surface:       #ffffff;
  --surface-alt:   #eef2f7;
  --fg:            #0d1a29;
  --fg-muted:      #53627a;
  --fg-inv-muted:  #a9bdd4;
  --border:        #d9e1ea;
  --border-strong: #bcc9d8;
  --link:          #0b4f9e;
  --danger:        #a3271f;
  --ring:          #1a6fd4;

  --shadow-sm: 0 1px 2px rgba(8,25,43,.06), 0 1px 3px rgba(8,25,43,.05);
  --shadow-md: 0 2px 4px rgba(8,25,43,.05), 0 6px 16px rgba(8,25,43,.08);
  --shadow-lg: 0 4px 8px rgba(8,25,43,.06), 0 16px 40px rgba(8,25,43,.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --dur: 200ms;
  --ease: cubic-bezier(.2,.7,.3,1);

  --container: 1160px;
  --header-h: 66px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #070f19;
    --surface:       #0e1b2b;
    --surface-alt:   #142438;
    --fg:            #e9f0f8;
    --fg-muted:      #9fb2c8;
    --border:        #23364d;
    --border-strong: #33495f;
    --link:          #78b6ff;
    --danger:        #ff9a92;
    --ring:          #78b6ff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 2px 6px rgba(0,0,0,.45);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 6.5vw, 4.4rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4vw, 2.7rem); text-transform: uppercase; letter-spacing: .01em; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 var(--space-4); max-width: 66ch; }
a { color: var(--link); text-underline-offset: 2px; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--yellow); color: #08192b; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 1000;
  background: var(--yellow); color: #08192b; font-weight: 700;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 50px; padding: var(--space-3) var(--space-5);
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn--primary { background: var(--yellow); color: #08192b; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--yellow-d); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn--outline { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--outline:hover { border-color: var(--fg); }
.btn--sm { min-height: 44px; padding: var(--space-2) var(--space-4); font-size: .98rem; }
.btn--block { width: 100%; }
.btn .icon { width: 20px; height: 20px; flex: none; }

/* ---------- Utility bar ---------- */
.utility-bar { background: var(--navy-900); color: var(--fg-inv-muted); font-size: .93rem; }
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 40px; }
.utility-bar__note { display: none; }
@media (min-width: 640px) { .utility-bar__note { display: block; } }
.utility-bar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.utility-bar a:hover { color: var(--yellow); text-decoration: underline; }
.utility-bar .icon { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface); border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] { box-shadow: var(--shadow-md); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.32rem;
  line-height: 1.05; text-transform: uppercase; letter-spacing: .01em;
}
.brand__napa { color: var(--navy-700); }
@media (prefers-color-scheme: dark) { .brand__napa { color: var(--yellow); } }

.nav { display: none; }
@media (min-width: 1000px) { .nav { display: block; } }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--fg);
  text-decoration: none; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); border-bottom: 3px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav__link:hover { background: var(--surface-alt); border-bottom-color: var(--yellow); }
.nav__link .chev { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.nav__item:hover .chev, .nav__item:focus-within .chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav__item:hover > .nav__menu, .nav__item:focus-within > .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu a {
  display: flex; align-items: center; min-height: 44px;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--fg); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav__menu a:hover { background: var(--surface-alt); color: var(--link); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: none;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--fg); cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-alt); border-color: var(--border-strong); }
.icon-btn .icon { width: 22px; height: 22px; }
@media (min-width: 1000px) { .nav-toggle { display: none; } }

/* ---------- Mobile drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,12,22,.55);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.drawer-scrim[data-open="true"] { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 101;
  width: min(340px, 88vw); background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform var(--dur) var(--ease);
  display: flex; flex-direction: column; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer[data-open="true"] { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border-bottom: 1px solid var(--border); }
.drawer__title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .07em; }
.drawer nav { padding: var(--space-3); }
.drawer__group { border-bottom: 1px solid var(--border); padding-block: var(--space-1); }
.drawer__link {
  display: flex; align-items: center; min-height: 52px; padding: var(--space-2) var(--space-3);
  font-family: var(--font-display); font-size: 1.18rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--fg); text-decoration: none; border-radius: var(--radius-sm);
}
.drawer__link:hover { background: var(--surface-alt); }
.drawer__sub { margin-bottom: var(--space-2); padding-left: var(--space-3); }
.drawer__sub a {
  display: flex; align-items: center; min-height: 46px; padding: var(--space-1) var(--space-3);
  color: var(--fg-muted); text-decoration: none; font-weight: 500;
  border-left: 2px solid var(--border);
}
.drawer__sub a:hover { color: var(--link); border-left-color: var(--yellow); }
.drawer__foot { margin-top: auto; padding: var(--space-4); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-900); color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(8,25,43,.95) 0%, rgba(8,25,43,.86) 48%, rgba(8,25,43,.6) 100%);
}
.hero__inner { padding-block: var(--space-8); }
@media (min-width: 768px) { .hero__inner { padding-block: var(--space-9); } }
.hero h1 { color: #fff; margin-bottom: var(--space-4); }
.hero__lede { font-size: 1.2rem; color: #d3e0ef; max-width: 50ch; margin-bottom: var(--space-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Legal pages ---------- */
.page-head { background: var(--navy-900); color: #fff; padding-block: var(--space-7); }
.page-head h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: var(--space-3); }
.page-head p { color: #c2d3e6; max-width: 60ch; margin: 0; font-size: 1.1rem; }
.page-head__meta { color: #93a9c2 !important; font-size: .95rem !important; margin-top: var(--space-3) !important; }

.legal { max-width: 78ch; padding-block: var(--space-8); }
.legal h2 {
  font-size: 1.75rem; margin-top: var(--space-8); margin-bottom: var(--space-4);
  padding-bottom: var(--space-2); border-bottom: 2px solid var(--yellow);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.3rem; margin-top: var(--space-6); margin-bottom: var(--space-3); }
.legal p { margin-bottom: var(--space-4); max-width: none; }
.legal a { font-weight: 600; }

.bullets { list-style: disc; padding-left: 1.35em; margin-bottom: var(--space-5); display: grid; gap: var(--space-2); }
.bullets li { max-width: none; }

.callout {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--yellow); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); margin-block: var(--space-5);
}
.callout p:last-child { margin-bottom: 0; }

.spec {
  width: 100%; border-collapse: collapse; margin-block: var(--space-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.spec th, .spec td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th {
  width: 34%; white-space: nowrap;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted);
}
@media (max-width: 560px) {
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: auto; }
  .spec th { border-bottom: 0; padding-bottom: 0; white-space: normal; }
  .spec td { padding-top: var(--space-1); }
}

.contact-block {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-4) var(--space-5);
  line-height: 1.9;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--fg-inv-muted); padding-block: var(--space-8) var(--space-5); }
.footer-grid { display: grid; gap: var(--space-6); margin-bottom: var(--space-7); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr; gap: var(--space-7); } }
.site-footer h3 { color: #fff; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--space-4); }
.site-footer p { color: var(--fg-inv-muted); font-size: .97rem; }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-brand img { width: 54px; height: 54px; border-radius: var(--radius-sm); }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__napa { color: var(--yellow); }
.footer-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-inv-muted); text-decoration: none; }
.footer-list a:hover { color: var(--yellow); text-decoration: underline; }
.footer-contact { display: grid; gap: var(--space-3); }
.footer-contact li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: .97rem; }
.footer-contact .icon { width: 19px; height: 19px; color: var(--yellow); flex: none; margin-top: 3px; }
.footer-contact a {
  display: inline-flex; align-items: center; min-height: 44px; margin-block: -9px;
  color: #fff; text-decoration: none; font-weight: 600; word-break: break-word;
}
.footer-contact a:hover { color: var(--yellow); text-decoration: underline; }
.social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.social a {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.24); border-radius: var(--radius-md); color: #fff;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.social a:hover { background: var(--yellow); border-color: var(--yellow); color: #08192b; }
.social .icon { width: 21px; height: 21px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); padding-top: var(--space-5); font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5);
  justify-content: space-between; align-items: center;
}
.footer-bottom p { margin: 0; max-width: none; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-bottom a { color: var(--fg-inv-muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-bottom a:hover { color: var(--yellow); text-decoration: underline; }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; left: var(--space-4); right: var(--space-4);
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  z-index: 1000; max-width: 540px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--space-5); display: none;
}
.cookie[data-show="true"] { display: block; animation: cookie-in var(--dur) var(--ease); }
@keyframes cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cookie h3 { font-size: 1.15rem; margin-bottom: var(--space-2); }
.cookie p { font-size: .95rem; color: var(--fg-muted); margin-bottom: var(--space-4); }
.cookie__actions { display: flex; gap: var(--space-3); }
.cookie__actions .btn { flex: 1; }

/* ---------- Print ---------- */
@media print {
  .utility-bar, .site-header, .drawer, .drawer-scrim, .cookie, .hero__actions { display: none !important; }
  .legal { max-width: none; }
  .callout, .spec { break-inside: avoid; }
  body { background: #fff; color: #000; font-size: 12pt; }
}
