﻿/* ═══════════════════════════════════════════════════════════════
   SPARK CUSTOM STORE — Professional B2B Navigation
   navbar.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* ── Colors ─────────────────────────────────────────── */
  --nav-red:            #D71920;
  --nav-red-hover:      #c91219;
  --nav-red-light:  rgba(187, 54, 58, 0.389); /* namespaced — was --nav-red-light, which leaked over home.css's brand token */
  --nav-red-glow:       rgba(229, 55, 61, 0.586);
  --nav-white:          #FFFFFF;
  --nav-black:          #0D0D0D;
  --nav-text:           #111111;
  --nav-text-muted:     #666666;
  --nav-text-light:     #999999;
  --nav-bg-light:       #F8F8F8;
  --nav-bg-sidebar:     #0F0F0F;
  --nav-border:         rgba(0, 0, 0, 0.12);
  --nav-border-sidebar: rgba(255, 255, 255, 0.07);

  /* ── Typography ─────────────────────────────────────── */
  --nav-font-heading:   'Montserrat', sans-serif;
  --nav-font-body:      'Montserrat', sans-serif;

  /* ── Spacing (8pt scale) ────────────────────────────── */
  --nav-space-1: 0.5rem;   /*  8px */
  --nav-space-2: 1rem;     /* 16px */
  --nav-space-3: 1.5rem;   /* 24px */
  --nav-space-4: 2rem;     /* 32px */
  --nav-space-5: 2.5rem;   /* 40px */
  --nav-space-6: 3rem;     /* 48px */
  --nav-space-8: 4rem;     /* 64px */

  /* ── Radius ─────────────────────────────────────────── */
  --nav-radius:         12px;
  --nav-radius-pill:    999px;

  /* ── Shadows (two levels + CTA) ─────────────────────── */
  --nav-shadow-sm:      0 1px 4px rgba(0,0,0,.05), 0 2px 10px rgba(0,0,0,.06);
  --nav-shadow-lg:      0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --nav-shadow-quote:   0 6px 20px rgba(215,25,32,.28);

  /* ── Motion ─────────────────────────────────────────── */
  --nav-easing:         cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-dur:    0.35s;

  /* ── Layout ─────────────────────────────────────────── */
  --header-h-desktop: 4.5rem;   /* 72px */
  --header-h-tablet:  4.125rem; /* 66px */
  --header-h-mobile:  3.75rem;  /* 60px */
  --topbar-h:         2.375rem; /* 38px */
  --sidebar-w:        clamp(22.5rem, 40vw, 48rem);  /* 360px floor → 40vw → 768px (≈40% on 1920) */
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
:root {
  --sidebar-w:        clamp(22.5rem, 53.3333vw, 48rem);
}
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--nav-font-body);
  color: var(--nav-text);
  background: var(--transparent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Account for fixed header height + iOS notch (env requires viewport-fit=cover) */
  padding-top: calc(var(--header-h-desktop) + env(safe-area-inset-top, 0px));
}
a { text-decoration: none; color: inherit; }
/* Remove iOS blue tap flash on all interactive elements */
a, button, [role="button"], label { -webkit-tap-highlight-color: transparent; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
svg { display: block; flex-shrink: 0; }



/* ─── HEADER ─────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  /* Push header below iPhone notch / Dynamic Island */
  padding-top: env(safe-area-inset-top, 0px);
  height: var(--header-h-desktop);
  /* GLASSMORPHISM (at top): frosted glass with a subtle white → brand-red tint
     and a soft red glow. Firmer opacity than before so the nav reads over the
     hero. The .is-scrolled state below firms it up further over page content. */
  background: linear-gradient(180deg,
    rgb(255, 255, 255) 0%,
    rgb(252, 252, 252) 55%,
    rgb(253, 253, 253) 100%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(215, 25, 32, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),   /* glass top-edge highlight */
    0 6px 26px rgba(215, 25, 32, 0.18);        /* soft red glow */
  will-change: transform;
  transition:
    background  0.3s var(--nav-easing),
    border-color 0.3s var(--nav-easing),
    transform   0.38s var(--nav-easing);
  animation: headerIn 0.45s var(--nav-easing) both;
}
.header.is-scrolled {
  /* More opaque once scrolled for legibility over busy content; border only */
  background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);
  border-bottom-color: rgba(17, 17, 17, 0.10);
  box-shadow: inset 0 1px 0 rgb(255, 255, 255); /* drop the float shadow when docked */
}
/* Auto-hide: slides the header above the viewport */
.header--hidden {
  transform: translateY(-100%); 
  box-shadow: none;
}
.header__inner {
  /* Matches the content shell up to 1520px, then goes full-bleed at >=1600px
     (see the large-screen block) so big displays use the whole width. */
  max-width: clamp(78.75rem, 88vw, 1520px);
  margin: 0 auto;
  padding: 0 2.8rem;     /* 44.8px */
  height: 100%;
  /* Logo left · nav centred · CTA right */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
.header__inner {
  max-width: clamp(78.75rem, 117.3333vw, 1520px);
}
}

/* ─── LOGO ───────────────────────────────────────────────────── */
.header__logo,
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem; /* 10px */
  flex-shrink: 0;
  text-decoration: none;
}

/* Header logo — left grid column. */
.header__logo {
  grid-column: 1;
  justify-self: start;
  flex-shrink: 0;
}

/* Logo image */
.logo__img {
  height: 3.6rem;  /* 58px — client: logo read small next to the links */
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  transition: filter 0.28s ease, transform 0.28s ease;
  filter: drop-shadow(0 2px 5px rgba(215,25,32,0.22));
}
.header__logo:hover .logo__img,
.sidebar__logo:hover .logo__img {
  filter: drop-shadow(0 4px 14px rgba(215,25,32,0.5));
  transform: scale(1.04);
}
.logo__img--sidebar {
  height: 2.875rem; /* 46px */
}

/* Brand name text */
.logo__name {
  font-family: var(--nav-font-heading);
  font-weight: 800;
  font-size: 1.0625rem; /* 17px */
  color: var(--nav-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.sidebar__logo .logo__name {
  color: var(--nav-white);
  font-size: 1rem; /* 16px */
}

.sidebar__menu,
.sidebar__submenu,
.sidebar__nested-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ─── PRIMARY NAVIGATION ─────────────────────────────────────── */
.primary-nav {
  grid-column: 2;      /* centre column */
  justify-self: center;
  display: flex;
  align-items: center;
}
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.125rem, 1.6vw, 1.875rem); /* fluid 18 → 30px (never crowds) */
  /* Bootstrap's reboot (`ul{margin-bottom:1rem}`, specificity 0,0,1) beats our
     universal `*{margin:0}` reset (0,0,0) on pages that load it — that stray
     16px bottom margin was pushing the links ~8px above the header's centre. */
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
.primary-nav__list {
  gap: clamp(1.125rem, 2.1333vw, 1.875rem);
}
}
.primary-nav__item {
  position: relative;
}
.primary-nav__link {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;      /* 44px — comfortable touch/click target */
  padding: 0 0.25rem;
  font-family: var(--nav-font-body);
  font-weight: 600;
  font-size: clamp(1rem, 1vw, 1.125rem); /* fluid 16 → 18px */
  line-height: 1.2;
  color: var(--nav-text);
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.25s var(--nav-easing);
  white-space: nowrap;
  justify-content: center;
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
.primary-nav__link {
  font-size: clamp(1rem, 1.3333vw, 1.125rem);
}
}
/* Underline bar that grows left→right */
.primary-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0.125rem;
  right: 0.125rem;
  height: 2px;
  background: var(--nav-red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--nav-easing);
}
.primary-nav__link:hover {
  color: var(--nav-red); /* one effect: red text + the underline grow below */
}
.primary-nav__link:hover::after,
.primary-nav__link.active::after {
  transform: scaleX(1);
}
.primary-nav__link.active {
  color: var(--nav-red);
}

/* ─── HEADER ACTIONS ─────────────────────────────────────────── */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;     /* 10px */
  flex-shrink: 0;
  grid-column: 3;    /* right column — stays right even when nav is hidden */
  justify-self: end;
}

/* ─── QUOTE BUTTON ───────────────────────────────────────────── */
.btn-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Canonical CTA spec (see buttons.css) — navbar.css is injected AFTER
     buttons.css, so the shared system can't reach it; kept in sync here. */
  height: 2.75rem;     /* 44px — matches --cta-min-h */
  padding: 0 1.5rem;   /* matches --cta-pad-x */
  background: var(--nav-red);
  color: var(--nav-white);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;  /* matches --cta-size */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--nav-radius-pill);
  white-space: nowrap;
  box-shadow: var(--nav-shadow-quote);
  position: relative;
  overflow: hidden;
  z-index: 0;              /* stacking context so the ::before fill sits behind the text */
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.25s var(--nav-easing),
    box-shadow 0.25s var(--nav-easing),
    transform 0.25s var(--nav-easing);
}
/* Black fill that sweeps left → right on hover — the "progress" wipe (red → black) */
.btn-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nav-black);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(.65, 0, .35, 1);
}
.btn-quote:hover,
.btn-quote:focus-visible {
  background: var(--nav-red);   /* base red stays under the sweeping black fill */
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
  transform: translateY(-2px);
}
.btn-quote:hover::before,
.btn-quote:focus-visible::before {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .btn-quote::before { transition: none; }
}
.btn-quote:active {
  transform: translateY(0);
  box-shadow: var(--nav-shadow-quote);
}
.btn-quote svg { width: 1rem; height: 1rem; } /* 16px — scales with root font-size */
.btn-quote:focus-visible {
  outline: 3px solid rgba(215,25,32,0.5);
  outline-offset: 3px;
}

/* ─── HAMBURGER ──────────────────────────────────────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.75rem;  /* 44px */
  height: 2.75rem; /* 44px */
  gap: 0.3125rem;
  border-radius: var(--nav-radius);
  border: 1.5px solid var(--nav-border);
  transition: background 0.2s, border-color 0.2s;
}
.hamburger:hover {
  background: var(--nav-bg-light);
  border-color: #ccc;
}
.hamburger__line {
  width: 1.25rem;   /* 20px */
  height: 0.125rem; /* 2px */
  background: var(--nav-text);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.35s var(--nav-easing),
    opacity 0.25s var(--nav-easing),
    width 0.25s var(--nav-easing);
}
/* Animated state */
.hamburger.is-open .hamburger__line--top {
  transform: translateY(0.4375rem) rotate(45deg); /* 7px */
}
.hamburger.is-open .hamburger__line--mid {
  opacity: 0;
  width: 0;
}
.hamburger.is-open .hamburger__line--bot {
  transform: translateY(-0.4375rem) rotate(-45deg); /* 7px */
}

/* ─── HAMBURGER ACTIVE & FOCUS ───────────────────────────────── */
.hamburger:active {
  background: rgba(215,25,32,0.08);
  border-color: rgba(215,25,32,0.25);
  transform: scale(0.93);
  transition: transform 0.1s, background 0.1s, border-color 0.1s;
}
.hamburger:active .hamburger__line {
  background: var(--nav-red);
}
.hamburger:focus-visible {
  outline: 2px solid var(--nav-red);
  outline-offset: 2px;
}

/* ─── NAV LINK FOCUS ─────────────────────────────────────────── */
.primary-nav__link:focus-visible {
  outline: 2px solid var(--nav-red);
  outline-offset: 2px;
  border-radius: var(--nav-radius);
}

/* ─── KEYFRAMES ──────────────────────────────────────────────── */
@keyframes headerIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .header    { animation: none !important; }
}

/* ─── SCROLL PROGRESS BAR ────────────────────────────────────── */
.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--nav-red) 0%, rgba(215,25,32,0.65) 100%);
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  z-index: 2;
  transition: width 0.06s linear;
}

/* ─── SIDEBAR OVERLAY ────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0);
  z-index: 299;
  pointer-events: none;
  transition: background var(--sidebar-dur) var(--nav-easing);
}
.sidebar-overlay.is-visible {
  background: rgba(0,0,0,0.55);
  pointer-events: all;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  max-width: 100vw;
  background: var(--nav-bg-sidebar);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--sidebar-dur) var(--nav-easing);
  overflow: hidden;
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
.sidebar {
  max-width: 133.3333vw;
}
}
.sidebar.is-open {
  transform: translateX(0);
  box-shadow: var(--nav-shadow-lg);
}

/* Sidebar — edge accent line */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--nav-red) 0%, transparent 100%);
  opacity: 0.6;
}

/* ─── SIDEBAR HEADER ─────────────────────────────────────────── */
.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem; /* 20px 32px */
  border-bottom: 1px solid var(--nav-border-sidebar);
  flex-shrink: 0;
}
.sidebar__logo .logo__name { color: var(--nav-white); }
.sidebar__close {
  width: 2.25rem;  /* 36px */
  height: 2.25rem;
  border-radius: var(--nav-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.649);
  transition: background 0.2s, color 0.2s;
}
.sidebar__close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--nav-white);
}
.sidebar__close svg { width: 1.25rem; height: 1.25rem; } /* 20px — scales to 60px at 4K */

/* ─── SIDEBAR BODY ───────────────────────────────────────────── */
.sidebar__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 2rem; /* 32px */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  overscroll-behavior: contain;
}
.sidebar__body::-webkit-scrollbar { width: 4px; }
.sidebar__body::-webkit-scrollbar-track { background: transparent; }
.sidebar__body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}

/* ─── SIDEBAR NAV ────────────────────────────────────────────── */
.sidebar__nav {
  padding: 0.5rem 0; /* 8px */
}
.sidebar__menu {
  display: flex;
  flex-direction: column;
}

/* ─── SIDEBAR LINKS ──────────────────────────────────────────── */
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;           /* 12px */
  padding: 0.8125rem 2rem; /* 13px 32px */
  font-family: var(--nav-font-body);
  font-weight: 500;
  font-size: 1rem;    /* 16px */
  color: rgba(255, 255, 255, 0.882);
  letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
  position: relative;
}
.sidebar__link svg { width: 1.125rem; height: 1.125rem; color: rgba(255, 255, 255, 0.559); transition: color 0.2s; }
.sidebar__link:hover,
.sidebar__link--active {
  color: var(--nav-white);
  background: rgba(255,255,255,0.05);
  padding-left: 1.75rem; /* 28px */
}
.sidebar__link:hover svg,
.sidebar__link--active svg {
  color: var(--nav-red);
}
.sidebar__link--active {
  font-weight: 600;
  border-left: 3px solid var(--nav-red);
  padding-left: 1.3125rem; /* 21px — compensate for border */
}

/* ─── ACCORDION BUTTON ───────────────────────────────────────── */
.sidebar__accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8125rem 2rem; /* 13px 32px */
  font-family: var(--nav-font-body);
  font-weight: 500;
  font-size: 1rem;       /* 16px */
  color: rgba(255, 255, 255, 0.829);
  letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}
.sidebar__accordion-left {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* 12px */
}
.sidebar__accordion-left svg { width: 1.125rem; height: 1.125rem; color: rgba(255, 255, 255, 0.684); transition: color 0.2s; }
.sidebar__accordion-btn:hover,
.sidebar__accordion-btn[aria-expanded="true"] {
  color: var(--nav-white);
  background: rgba(255,255,255,0.05);
}
.sidebar__accordion-btn[aria-expanded="true"] .sidebar__accordion-left svg { color: var(--nav-red); }
.sidebar__accordion-btn:hover { padding-left: 1.75rem; }          /* 28px */
.sidebar__accordion-btn[aria-expanded="true"] { padding-left: 1.75rem; }

/* Chevron rotation */
.sidebar__chevron {
  width: 1rem; height: 1rem; /* 16px — scales with root font-size */
  color: rgba(255,255,255,0.3);
  transition: transform 0.3s var(--nav-easing), color 0.2s;
  flex-shrink: 0;
}
.sidebar__accordion-btn[aria-expanded="true"] .sidebar__chevron {
  transform: rotate(180deg);
  color: var(--nav-red);
}

/* ─── SUBMENU ────────────────────────────────────────────────── */
.sidebar__submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--nav-easing);
  background: rgba(0,0,0,0.25);
  border-left: 2px solid rgba(215,25,32,0.25);
  margin-left: 0;
}
.sidebar__submenu.is-open {
  max-height: 1200px;
}
.sidebar__sublink {
  display: flex;
  align-items: center;
  gap: 0.625rem;                         /* 10px */
  padding: 0.625rem 2rem 0.625rem 2.75rem; /* 10px 32px 10px 44px */
  font-size: 0.9375rem;                  /* 15px */
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}
.sidebar__sublink svg { width: 0.875rem; height: 0.875rem; color: rgba(255,255,255,0.25); transition: color 0.2s; }
.sidebar__sublink:hover {
  color: var(--nav-white);
  background: rgba(255,255,255,0.04);
  padding-left: 2.625rem; /* 42px */
}
.sidebar__sublink:hover svg { color: var(--nav-red); }

/* ─── NESTED ACCORDION ───────────────────────────────────────── */
.sidebar__nested-item {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sidebar__nested-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6875rem 1.125rem 0.6875rem 2.25rem; /* 11px 18px 11px 36px */
  font-size: 0.9375rem;  /* 15px */
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s;
}
.sidebar__nested-btn:hover,
.sidebar__nested-btn[aria-expanded="true"] {
  color: var(--nav-white);
  background: rgba(255,255,255,0.04);
}
.sidebar__nested-btn[aria-expanded="true"] .sidebar__chevron--sm {
  transform: rotate(180deg);
  color: var(--nav-red);
}
.sidebar__chevron--sm {
  width: 0.875rem; height: 0.875rem; /* 14px */
  color: rgba(255,255,255,0.25);
  transition: transform 0.3s var(--nav-easing), color 0.2s;
  flex-shrink: 0;
}
.sidebar__nested-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--nav-easing);
  background: rgba(0,0,0,0.2);
}
.sidebar__nested-submenu.is-open {
  max-height: 600px;
}
.sidebar__nestedlink {
  display: block;
  padding: 0.5625rem 1.125rem 0.5625rem 3.125rem; /* 9px 18px 9px 50px */
  font-size: 0.9375rem;  /* 15px */
  color: rgba(255,255,255,0.4);
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
}
.sidebar__nestedlink:hover {
  color: var(--nav-red);
  background: rgba(215,25,32,0.06);
  padding-left: 3.375rem; /* 54px */
  border-left-color: var(--nav-red);
}
.sidebar__nestedlink.sidebar__link--active {
  color: var(--nav-red);
  font-weight: 600;
  background: rgba(215,25,32,0.07);
  border-left-color: var(--nav-red);
}
.sidebar__nestedlink--cat {
  color: rgba(255, 255, 255, 0.717);
  font-weight: 600;
  font-size: 0.9375rem; /* 15px */
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.125rem;  /* 2px */
  padding-bottom: 0.6875rem; /* 11px */
}
.sidebar__nestedlink--cat:hover {
  color: var(--nav-red);
}

/* ─── SECTION LABEL ──────────────────────────────────────────── */
.sidebar__section-label {
  font-family: var(--nav-font-heading);
  font-weight: 700;
  font-size: 0.625rem;        /* 10px */
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 1.5rem 2rem 0.625rem; /* 24px 32px 10px */
}

/* ─── QUICK ACTIONS ──────────────────────────────────────────── */
.sidebar__quick-actions {
  border-top: 1px solid var(--nav-border-sidebar);
  margin-top: 0.5rem;    /* 8px */
  padding-bottom: 1.5rem; /* 24px */
}
.quick-actions__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;  /* 14px */
  padding: 0 1rem; /* 0 16px */
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;         /* 10px */
  padding: 1.375rem 1rem; /* 22px 16px — larger buttons */
  border-radius: var(--nav-radius);
  border: 1px solid var(--nav-border-sidebar);
  font-size: 0.875rem;  /* 14px */
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  background: rgba(255,255,255,0.03);
}
.quick-action svg { width: 1.375rem; height: 1.375rem; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.quick-action:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  color: var(--nav-white);
  transform: translateY(-2px);
}
.quick-action:hover svg { color: var(--nav-white); }
.quick-action--primary {
  background: var(--nav-red);
  border-color: var(--nav-red);
  color: var(--nav-white);
}
.quick-action--primary svg { color: var(--nav-white); }
.quick-action--primary:hover {
  background: var(--nav-red-hover);
  border-color: var(--nav-red-hover);
  color: var(--nav-white);
}
.quick-action--whatsapp:hover svg { color: #25D366; }

/* ─── BODY LOCK ──────────────────────────────────────────────── */
body.sidebar-is-open {
  overflow: hidden;
}


.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  height: 3.125rem;   /* 50px */
  padding: 0 2rem;    /* 32px */
  background: var(--nav-red);
  color: var(--nav-white);
  font-family: var(--nav-font-body);
  font-weight: 700;
  font-size: 0.875rem; /* 14px */
  letter-spacing: 0.02em;
  border-radius: var(--nav-radius-pill);
  box-shadow: 0 8px 28px rgba(215,25,32,0.4);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.btn-hero-primary:hover {
  background: var(--nav-red-hover);
  box-shadow: 0 12px 36px rgba(215,25,32,0.55);
  transform: translateY(-2px);
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  height: 3.125rem;   /* 50px */
  padding: 0 2rem;    /* 32px */
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  font-family: var(--nav-font-body);
  font-weight: 600;
  font-size: 0.875rem; /* 14px */
  letter-spacing: 0.02em;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--nav-radius-pill);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--nav-white);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
.demo-content {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nav-bg-light);
  font-size: 14px;
  color: var(--nav-text-muted);
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--nav-border);
}
@media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
.demo-content {
  min-height: 66.6667vh;
}
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — LARGE TABLET / SMALL LAPTOP  (≤1080px)
   Primary nav compacted but still visible
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  body { padding-top: calc(var(--header-h-tablet) + env(safe-area-inset-top, 0px)); }
  .header { height: var(--header-h-tablet); }
  .header__inner { gap: 16px; padding: 0 20px; }
  .primary-nav__link { padding: 0 9px; font-size: 13px; }
  .primary-nav__link::after { left: 9px; right: 9px; }
  .btn-quote { padding: 0 14px; }
  .btn-quote span { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET LANDSCAPE  (≤960px)
   Primary nav hidden — sidebar becomes the sole navigation
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .primary-nav { display: none; }
  .header__actions { margin-left: auto; }
  .btn-quote { padding: 0 20px; height: 40px; }
  .btn-quote span { display: inline; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET PORTRAIT / MOBILE  (≤768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body { padding-top: calc(var(--header-h-mobile) + env(safe-area-inset-top, 0px)); }
  .header { height: var(--header-h-mobile); }
  .header__inner { padding: 0 16px; gap: 10px; }
  .logo__img { height: 48px; }
  .logo__name { font-size: 15px; }
  .btn-quote {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
    gap: 6px;
  }
  .btn-quote svg { width: 14px; height: 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL PHONE  (≤480px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .sidebar { width: 100vw; }
  /* Icon-only quote button below 480px — full text + logo + hamburger
     don't all fit on small phones without pushing the header wider than
     the viewport (was clipping "REQUEST QUOTE" off the right edge). */
  .btn-quote { padding: 0 12px; height: 38px; gap: 0; }
  .btn-quote span { display: none; }
  .btn-quote svg { width: 15px; height: 15px; }
  .hamburger { width: 44px; height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TINY PHONE  (≤400px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  /* Logo continues shrinking here (was jumping back up to 3.5rem,
     larger than the ≤768px size — backwards on the smallest phones). */
  .logo__img  { height: 2.5rem; }
  .logo__name { font-size: 13px; }
  .btn-quote { padding: 0 10px; }
  .btn-quote svg { width: 14px; height: 14px; }
}

@media (max-width: 340px) {
  .logo__name { display: none; }
  .logo__img  { height: 42px; }
}

/* ═══════════════════════════════════════════════════════════════
   LARGE DESKTOP (≥1600px) — fill the screen + scale up for readability
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1600px) {
  /* Taller bar so the bigger logo/nav breathe (token keeps body offset in sync). */
  :root { --header-h-desktop: 5rem; } /* 80px */

  /* Full-bleed navbar: logo hard-left, nav+CTA hard-right, using the
     whole screen width instead of the centred 1520 shell. */
  .header__inner {
    max-width: none;
    padding-inline: clamp(3rem, 4vw, 5rem); /* 48 → 76.8px @1920 */
  }
  @media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
  .header__inner {
    padding-inline: clamp(3rem, 5.3333vw, 5rem);
  }
  }

  /* Bigger, more readable top-bar */
  .logo__img         { height: 64px; }
  .primary-nav__list { gap: clamp(1.5rem, 1.8vw, 2.25rem); }
  @media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
  .primary-nav__list { gap: clamp(1.5rem, 2.4vw, 2.25rem); }
  }
  .primary-nav__link { font-size: 1.25rem; }   /* 20px */
  .btn-quote         { height: 3rem; padding: 0 1.75rem; font-size: 1rem; }
  .btn-quote svg     { width: 1.125rem; height: 1.125rem; }
  .hamburger         { width: 3rem; height: 3rem; }
  .hamburger__line   { width: 1.5rem; }

  /* Sidebar opens to ~40% of the screen (via --sidebar-w clamp) — bump the
     text so the wider panel stays readable. */
  .sidebar__link,
  .sidebar__accordion-btn   { font-size: 1.0625rem; }  /* 17px */
  .sidebar__sublink,
  .sidebar__nested-btn      { font-size: 1rem; }        /* 16px */
  .sidebar__nestedlink,
  .sidebar__nestedlink--cat { font-size: 0.9375rem; }   /* 15px */
  .sidebar__logo .logo__name { font-size: 1.25rem; }
  .logo__img--sidebar        { height: 3.25rem; }       /* 52px */
  .sidebar__header           { padding: 1.5rem 2.5rem; }
  .sidebar__section-label    { font-size: 0.75rem; }    /* 12px */

  /* Quick-action buttons — larger on the wide sidebar */
  .quick-actions__grid { gap: 1rem; }
  .quick-action        { padding: 1.625rem 1.25rem; font-size: 1rem; gap: 0.75rem; } /* 26/20px, 16px */
  .quick-action svg    { width: 1.5rem; height: 1.5rem; }
}

@media (min-width: 1920px) {
  /* Taller bar so the big logo + larger nav breathe (token keeps body offset in sync). */
  :root { --header-h-desktop: 6.2rem; } /* 104px — was 80px, so the 90px logo no longer overflows */

  .header__inner { padding-inline: 6rem; } /* 96px */

  /* Logo stays put — everything else scales up around it. */
  .logo__img { height: 90px; }

  /* Bigger, more readable primary nav */
  .primary-nav__list { gap: clamp(2rem, 2.2vw, 3rem); }
  @media (min-width: 1600px) {/* DESKTOP-SCALE generated by tools/desktop-scale.mjs */
  .primary-nav__list { gap: clamp(2rem, 2.9333vw, 3rem); }
  }     /* 32 → 48px */
  .primary-nav__link { height: 3.5rem; font-size: 1.5rem; } /* 56px tall · 24px text */

  /* Larger quote button + hamburger to match the taller bar */
  .btn-quote       { height: 3.5rem; padding: 0 2.25rem; font-size: 1.2rem; } /* 56px · 36px · 18px */
  .btn-quote svg   { width: 1.375rem; height: 1.375rem; }   /* 22px */
  .header__actions { gap: 0.875rem; }                       /* 14px */
  .hamburger       { width: 3.7rem; height: 3.7rem; }       /* 56px */
  .hamburger__line { width: 1.75rem; }                      /* 28px */

  .sidebar__link { font-size: 1.255rem; }          /* 18px */
  .sidebar__accordion-btn { font-size: 1.255rem; } 
  .sidebar__logo .logo__name { font-size: 1.6rem; } /* 24px */
  .sidebar__nested-btn { font-size: 1.2rem; }      /* 18px */
  .sidebar__nestedlink { font-size: 1.2rem; }   /* 18px */
  .sidebar__sublink { font-size: 1.2rem; } /* 18px */
  .quick-action { font-size: 1.2rem; gap: 0.875rem; } /* 18px, 14px */
  .quick-action svg { width: 1.75rem; height: 1.75rem; } /* 28px */
  .sidebar__close svg { width: 1.75rem; height: 1.75rem; } /* 24px */
  .sidebar__chevron { width: 1.5rem; height: 1.5rem; } /* 20px */
  .sidebar__section-label { font-size: 1rem; } /* 14px */

}

/* ═══════════════════════════════════════════════════════════════
   PHONE — LEGIBILITY
   The sidebar's sub-link and section-label greys were set at 0.4 /
   0.25 alpha, which measure 3.8:1 and 2.2:1 against the panel — under
   the 4.5:1 minimum and genuinely hard to read on a phone outdoors.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar__nestedlink     { color: rgba(255,255,255,0.75); }
  .sidebar__section-label  { color: rgba(255,255,255,0.62); }
}
