/* ==========================================================================
   Flex Powersports — Design Tokens
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-elevated: #f7f6f3;
  --bg-elevated-2: #efeee9;
  --border: #e2e0da;
  --text: #1a1816;
  --text-muted: #6b6660;
  --accent: #ff591f;
  --accent-text: #cc4210;
  --accent-dark: #1a1816;
  --focus: var(--accent);
  --danger: #c1121f;

  --hero-text: #ffffff;
  --hero-text-muted: rgba(255, 255, 255, 0.78);
  --hero-border: rgba(255, 255, 255, 0.28);

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1200px;
  --radius: 14px;
  --radius-sm: 8px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; text-transform: uppercase; letter-spacing: 0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); }
button { font-family: inherit; }

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

::selection {
  background: var(--accent);
  color: var(--accent-dark);
}

html {
  scrollbar-color: #c7c3ba var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #c7c3ba;
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #a39d93; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-dark);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.section {
  padding-block: clamp(3rem, 6vw, 6rem);
}
.section-alt { background: var(--bg-elevated); }
/* Offset anchor-jump targets so the sticky header doesn't cover the heading. */
section[id] { scroll-margin-top: 90px; }
.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
.section-head p { font-size: 1.05rem; }

.caption {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.price-tag {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.price-tag strong { color: var(--accent); font-size: 1.3rem; }

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 8px 20px -6px rgba(255, 89, 31, 0.45);
}
.btn-primary:hover { background: #ff7040; box-shadow: 0 10px 24px -6px rgba(255, 89, 31, 0.55); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-text); }

.btn-block { width: 100%; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* backdrop-filter lives on a pseudo-element, not .site-header itself, because a filter/
   backdrop-filter on an element turns it into the containing block for position:fixed
   descendants — that would trap .main-nav's mobile flyout inside the header's own height. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -18px rgba(26, 24, 22, 0);
  transition: box-shadow 250ms var(--ease-out);
}
.site-header.is-scrolled::before {
  box-shadow: 0 8px 24px -18px rgba(26, 24, 22, 0.35);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
}
.brand img { height: 40px; width: auto; }

.nav-toggle {
  position: relative;
  z-index: 1;
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle svg line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
/* Hamburger → X: state indication for the mobile nav's own open/closed state. */
.nav-toggle[aria-expanded="true"] svg line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] svg line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] svg line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-toggle svg line { transition: opacity 150ms ease; }
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav a {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.main-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover {
    color: var(--text);
    border-color: var(--accent);
  }
}
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
  display: none;
}

@media (min-width: 860px) {
  .header-phone { display: inline-block; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    padding: 5.5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 320ms var(--ease-drawer);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .header-cta .btn-outline { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--bg);
  overflow: hidden;
}
@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-block: 3rem 2.5rem;
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10,11,13,0.97) 0%, rgba(10,11,13,0.88) 38%, rgba(10,11,13,0.35) 68%, rgba(10,11,13,0.15) 100%),
              linear-gradient(0deg, rgba(10,11,13,0.9), rgba(10,11,13,0.1) 40%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
  opacity: 1;
  z-index: -2;
}
.hero-content {
  max-width: 640px;
}
/* The hero keeps its dark photo backdrop even though the rest of the site is now
   light-themed, so its text uses fixed light colors instead of the --text tokens. */
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  margin-bottom: 0.3em;
  color: var(--hero-text);
}
.hero h1 span { color: var(--accent); }
.hero-subtitle {
  display: inline-block;
  font-size: 0.7em;
}
.hero h1 .hero-title-line {
  display: inline-block;
  white-space: nowrap;
  color: var(--hero-text);
}
@media (max-width: 360px) {
  .hero h1 { font-size: 1.85rem; }
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--hero-text);
  max-width: 480px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
/* .btn-outline's default colors assume a light page background; override for the dark hero. */
.hero .btn-outline { color: var(--hero-text); border-color: var(--hero-border); }
@media (hover: hover) and (pointer: fine) {
  .hero .btn-outline:hover { border-color: var(--accent); color: var(--accent); }
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--hero-border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--hero-text-muted);
}
.hero-badge img { height: 13px; }
.hero-badge strong { color: var(--accent); font-weight: 600; }

/* One authored entrance moment for the primary landing view. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  animation: rise-in 0.8s var(--ease-out) both;
}
.hero-content h1 { animation-delay: 0.05s; }
.hero-content .lede { animation-delay: 0.16s; }
.hero-content .hero-actions { animation-delay: 0.27s; }
.hero-content .hero-badges { animation-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
  .hero-content > * { animation: none; opacity: 1; transform: none; }
}

/* Page (interior) hero — shorter version for non-home pages */
.page-hero {
  padding-block: clamp(3rem, 8vw, 5rem) clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.page-hero p { font-size: 1.1rem; max-width: 620px; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 8px 24px -16px rgba(26, 24, 22, 0.14);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 16px 32px -16px rgba(26, 24, 22, 0.22);
  }
}

/* Feature strip: one joined bar, segments divided by hairlines — not stacked cards. */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(26, 24, 22, 0.14);
}
.feature-item {
  background: var(--bg-elevated);
  padding: 2rem 1.75rem;
  text-align: left;
}
.feature-item .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 89, 31, 0.10);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.feature-item .icon svg { width: 22px; height: 22px; }
.feature-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-item p { margin-bottom: 0; font-size: 0.92rem; }

/* Feature list: dense spec-sheet grid, same joined-hairline technique.
   Fixed column counts (not auto-fit) so an 8-item list never leaves an orphan cell. */
.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(26, 24, 22, 0.14);
}
@media (min-width: 640px) {
  .feature-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .feature-list { grid-template-columns: repeat(4, 1fr); }
}
.feature-list-item {
  background: var(--bg-elevated);
  padding: 1.25rem 1.75rem;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}
.feature-list-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent);
  transform: translateY(1px);
}
.feature-list-item strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.feature-list-item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Spec table */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(26, 24, 22, 0.14);
}
.spec-item {
  background: var(--bg-elevated);
  padding: 1.5rem;
}
.spec-item .value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--accent);
  display: block;
}
.spec-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Color swatches */
.color-swatches { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.swatch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}
.swatch .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(26, 24, 22, 0.15); }

/* Media logos strip */
.media-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 2rem;
  opacity: 0.85;
}
.media-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 12px -8px rgba(26, 24, 22, 0.15);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.media-chip img {
  height: 22px;
  width: auto;
  object-fit: contain;
}
@media (hover: hover) and (pointer: fine) {
  .media-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(26, 24, 22, 0.25);
  }
}

/* Steps */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding-left: 3.5rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form { max-width: 640px; }
.form-row { margin-bottom: 1.25rem; }
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
input, select, textarea {
  width: 100%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 130px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.checkbox-row input { width: auto; margin-top: 0.3rem; }
.checkbox-row label { text-transform: none; letter-spacing: normal; font-size: 0.9rem; margin: 0; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; }
.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), display 220ms allow-discrete;
}
.form-status.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
@starting-style {
  .form-status.is-visible {
    opacity: 0;
    transform: translateY(6px);
  }
}
.form-status.success { color: var(--accent-text); }
.form-status.error { color: var(--danger); }
@media (prefers-reduced-motion: reduce) {
  .form-status { transition: opacity 220ms ease; transform: none; }
  .form-status.is-visible { transform: none; }
}

/* ==========================================================================
   Financing partner cards
   ========================================================================== */
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.partner-card .btn { margin-top: auto; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--accent);
  color: var(--accent-dark);
}
.cta-band h2, .cta-band p { color: var(--accent-dark); }
.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 3rem;
}
.cta-band .btn-primary {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}
.cta-band .btn-primary:hover { background: #000; }
.cta-band :focus-visible { outline-color: var(--accent-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-block: 3rem 1.5rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand img { height: 36px; margin-bottom: 1rem; }
.footer-brand p { max-width: 320px; }
.footer-col h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: var(--text); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.social-row { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }
.social-row svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-bottom ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--text); }

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-content {
  max-width: 760px;
}
.legal-content h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal-content p, .legal-content li { color: var(--text-muted); }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1em; }
.legal-content ul li { margin-bottom: 0.5em; }

/* ==========================================================================
   Photo gallery + lightbox
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  background: var(--bg-elevated-2);
  cursor: pointer;
  box-shadow: 0 8px 24px -16px rgba(26, 24, 22, 0.14);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img { transform: scale(1.06); }
}

/* Below 640px the grid becomes an auto-advancing slideshow: one photo at a time,
   with its own prev/next arrows. Tapping the visible photo still opens the lightbox. */
.gallery-nav-prev,
.gallery-nav-next {
  display: none;
}
@media (max-width: 640px) {
  .gallery-grid {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 36px -20px rgba(26, 24, 22, 0.3);
  }
  .gallery-grid .gallery-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: opacity 600ms var(--ease-in-out);
  }
  .gallery-grid .gallery-item.is-active {
    opacity: 1;
    z-index: 1;
  }
  .gallery-nav-prev,
  .gallery-nav-next {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 14px rgba(10, 9, 8, 0.2);
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
  }
  .gallery-nav-prev svg, .gallery-nav-next svg { width: 20px; height: 20px; }
  .gallery-nav-prev { left: 0.85rem; }
  .gallery-nav-next { right: 0.85rem; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.92);
  padding: clamp(1rem, 5vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
  position: relative;
  max-width: min(92vw, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #000;
}
.lightbox-caption {
  color: #fff;
  margin-top: 1rem;
  font-size: 0.95rem;
  text-align: center;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
}
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 20px; height: 20px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-close { top: -1.25rem; right: -1.25rem; }
.lightbox-prev { left: -1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -1.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) {
  .lightbox-close { top: 0.5rem; right: 0.5rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

/* ==========================================================================
   Scroll reveal — one-shot entrance as content scrolls into view.
   Group children stagger via nth-child delay; capped so a 15-item gallery
   doesn't drag the last row out past ~half a second.
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}
[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 40ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 80ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 120ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 160ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 200ms; }
[data-reveal-group].is-visible > *:nth-child(7) { transition-delay: 240ms; }
[data-reveal-group].is-visible > *:nth-child(8) { transition-delay: 280ms; }
[data-reveal-group].is-visible > *:nth-child(9) { transition-delay: 320ms; }
[data-reveal-group].is-visible > *:nth-child(10) { transition-delay: 350ms; }
[data-reveal-group].is-visible > *:nth-child(11) { transition-delay: 380ms; }
[data-reveal-group].is-visible > *:nth-child(12) { transition-delay: 410ms; }
[data-reveal-group].is-visible > *:nth-child(13) { transition-delay: 440ms; }
[data-reveal-group].is-visible > *:nth-child(14) { transition-delay: 460ms; }
[data-reveal-group].is-visible > *:nth-child(n+15) { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Stable digit width while spec numbers count up */
.spec-item .value { font-variant-numeric: tabular-nums; }

/* Subtle scroll-linked parallax on the home hero photo (desktop, motion-safe only) */
@media (hover: hover) and (pointer: fine) {
  .hero-bg { will-change: transform; }
}

/* ==========================================================================
   404 page
   ========================================================================== */
.error-page {
  padding-block: clamp(4rem, 10vw, 7rem);
  text-align: center;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 11rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.15em;
}
.error-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  margin-bottom: 0.5em;
}
.error-page p {
  max-width: 480px;
  margin-inline: auto;
  font-size: 1.05rem;
}
.error-page .hero-actions {
  justify-content: center;
  margin-top: 2rem;
}
.error-page .error-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
}
.error-page .error-links a { color: var(--text-muted); font-size: 0.95rem; }
.error-page .error-links a:hover { color: var(--accent-text); }

/* ==========================================================================
   Photo slideshow (shipping page)
   ========================================================================== */
.slideshow {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated-2);
  box-shadow: 0 16px 36px -20px rgba(26, 24, 22, 0.3);
}
.slideshow::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.45), transparent);
  pointer-events: none;
  z-index: 1;
}
.slideshow-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.slideshow-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 600ms var(--ease-in-out);
}
.slideshow-slide.is-active { opacity: 1; }
.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slideshow-prev,
.slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 14px rgba(10, 9, 8, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.slideshow-prev svg, .slideshow-next svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) {
  .slideshow-prev:hover, .slideshow-next:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
}
.slideshow-prev { left: 0.85rem; }
.slideshow-next { right: 0.85rem; }
.slideshow-dots {
  position: absolute;
  inset: auto 0 0.9rem 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.slideshow-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.slideshow-dots button.is-active { background: #fff; transform: scale(1.35); }
@media (max-width: 640px) {
  .slideshow { aspect-ratio: 1 / 1; }
}

/* ==========================================================================
   Form success modal
   ========================================================================== */
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 8, 0.55);
  padding: 1.5rem;
  animation: success-fade 200ms ease;
}
.success-modal[hidden] { display: none; }
.success-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(10, 9, 8, 0.45);
  animation: success-pop 320ms var(--ease-out);
}
.success-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(255, 89, 31, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-modal-icon svg { width: 30px; height: 30px; }
.success-modal-card h3 { font-size: 1.5rem; margin-bottom: 0.65rem; }
.success-modal-card p { font-size: 1rem; margin-bottom: 0; }
.success-modal-card p + p { margin-top: 0.75rem; }
.success-modal-card .btn { margin-top: 1.75rem; }
.success-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.success-modal-close svg { width: 16px; height: 16px; }
.success-modal-close:hover { color: var(--text); border-color: var(--accent); }
@keyframes success-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes success-pop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .success-modal, .success-modal-card { animation: none; }
}

/* The mobile gallery's nav arrows are persistent chrome, not staggered reveal
   content — but they're direct children of .gallery-grid, which carries
   data-reveal-group, so the scroll-reveal system's opacity:0 default (same
   0,2,0 specificity, declared later) would otherwise win the tie. Placed last
   here so this wins instead. */
.gallery-grid .gallery-nav-prev,
.gallery-grid .gallery-nav-next {
  opacity: 1;
  transform: none;
}

/* Same tie, different victim: the reveal-group rule was also pinning every
   .gallery-item to opacity:1 permanently once revealed, which silently broke
   the mobile slideshow's crossfade (items snapped via z-index instead of
   fading, since opacity never actually changed). Scoped to mobile only. */
@media (max-width: 640px) {
  .gallery-grid .gallery-item { opacity: 0; transform: none; }
  .gallery-grid .gallery-item.is-active { opacity: 1; }
}
