/*
 * style.css
 * Auckland ZX Moto shared styles.
 * Design system plus shell components (header, nav, footer).
 *
 * BRAND RED: the exact ZX Moto red lives in their own stylesheet, which I could
 * not reach, so --zx-red below is a close placeholder. Confirm the real hex from
 * their style.css and change this one line; everything else follows it.
 */

/* ---------- Design tokens ---------- */
:root {
  --zx-red:       #e2001a;   /* placeholder, confirm from ZX Moto style.css */
  --zx-red-dark:  #b30015;
  --ink:          #0c0c0d;   /* page background, near black */
  --panel:        #151518;   /* raised surfaces, header dropdown, footer */
  --panel-2:      #1e1e22;
  --line:         rgba(255,255,255,0.12);
  --text:         #f4f4f5;
  --muted:        #a1a1aa;
  --white:        #ffffff;

  --wrap:         1200px;
  --radius:       4px;
  --speed:        180ms;

  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Headings use the same stack for now, heavy and condensed by tracking.
     To match their brand font later, set --font-head and load the webfont. */
  --font-head:    var(--font-body);
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color var(--speed) ease; }
a:hover { color: var(--zx-red); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.1;
  margin: 0 0 0.4em;
  font-weight: 800;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.section { padding: clamp(48px, 8vw, 96px) 0; }

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--zx-red);
  margin-bottom: 0.6em;
}

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

/* ---------- Buttons (used by pages later) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.6em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease;
}
.btn--primary { background: var(--zx-red); color: var(--white); }
.btn--primary:hover { background: var(--zx-red-dark); color: var(--white); }
.btn--ghost { border-color: var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--zx-red);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 12, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

/* Logo lockup: AUCKLAND kicker sitting above the ZX Moto mark */
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand:hover { color: inherit; }
.brand-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 5px;
  padding-left: 2px;
}
.brand-logo { height: 30px; width: auto; }

/* ---------- Navigation ---------- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform var(--speed) ease, opacity var(--speed) ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: none;
}
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block;
  padding: 14px 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.subnav { background: rgba(0,0,0,0.25); }
.subnav a { padding-left: 38px; font-weight: 500; color: var(--muted); }

/* Desktop navigation */
@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .primary-nav {
    position: static;
    display: block;
    background: transparent;
    border-top: 0;
  }
  .primary-nav > ul { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 36px); }
  .primary-nav > ul > li { position: relative; }
  .primary-nav a { padding: 8px 0; border-bottom: 0; }
  .primary-nav > ul > li > a:hover { color: var(--zx-red); }

  .has-sub > a::after { content: " \25BE"; font-size: 0.7em; color: var(--muted); }
  .subnav {
    position: absolute;
    top: 100%; left: 0;
    min-width: 210px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 0;
    display: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  }
  .has-sub:hover .subnav,
  .has-sub:focus-within .subnav { display: block; }
  .subnav a { padding: 10px 18px; border: 0; }
  .subnav a:hover { color: var(--zx-red); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--panel);
  border-top: 3px solid var(--zx-red);
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 40px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-col address { font-style: normal; color: var(--muted); line-height: 1.7; }
.footer-col p { color: var(--muted); line-height: 1.8; }
.footer-col a:hover { color: var(--zx-red); }

.footer-base {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.footer-base p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}




/* ============================ HERO ============================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
/* Dark gradient so text stays readable over any image */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,12,13,0.35) 0%, rgba(12,12,13,0.55) 45%, rgba(12,12,13,0.95) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(60px, 12vw, 140px);
  padding-bottom: clamp(40px, 7vw, 80px);
  max-width: 820px;
}
.hero-title {
  font-size: clamp(2.2rem, 6.5vw, 4.4rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.5em;
}
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
  max-width: 60ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ======================= ACHIEVEMENTS ========================= */
.story-intro { max-width: 68ch; color: var(--muted); font-size: 1.05rem; margin-bottom: 2.5em; }

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px)  { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .story-grid { grid-template-columns: repeat(4, 1fr); } }

.story-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  overflow: hidden;
}
.story-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--zx-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) ease;
}
.story-card:hover::before { transform: scaleX(1); }
.story-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--zx-red);
  margin-bottom: 14px;
}
.story-card h3 { font-size: 1.12rem; margin-bottom: 0.6em; }
.story-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ======================================================================
   HOME PAGE STYLES (index.php)
   Appends to the shared shell styles already in this file.
   ====================================================================== */

/* ============================ HERO ============================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
/* Dark gradient so text stays readable over any image */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,12,13,0.35) 0%, rgba(12,12,13,0.55) 45%, rgba(12,12,13,0.95) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(60px, 12vw, 140px);
  padding-bottom: clamp(40px, 7vw, 80px);
  max-width: 820px;
}
.hero-title {
  font-size: clamp(2.2rem, 6.5vw, 4.4rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.5em;
}
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
  max-width: 60ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ======================= ACHIEVEMENTS ========================= */
.story-intro { max-width: 68ch; color: var(--muted); font-size: 1.05rem; margin-bottom: 2.5em; }

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px)  { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .story-grid { grid-template-columns: repeat(4, 1fr); } }

.story-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  overflow: hidden;
}
.story-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--zx-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) ease;
}
.story-card:hover::before { transform: scaleX(1); }
.story-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--zx-red);
  margin-bottom: 14px;
}
.story-card h3 { font-size: 1.12rem; margin-bottom: 0.6em; }
.story-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ============================ MODELS ========================== */
.model-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 620px)  { .model-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .model-grid { grid-template-columns: repeat(4, 1fr); } }

.model-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--speed) ease, border-color var(--speed) ease;
}
.model-card:hover { transform: translateY(-4px); border-color: var(--zx-red); color: inherit; }

.model-media {
  display: block;
  aspect-ratio: 4 / 3;
  /* Fallback colour shows if the local image is not yet in place */
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.model-body { display: flex; flex-direction: column; padding: 20px 20px 22px; }
.model-class {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--zx-red);
  margin-bottom: 8px;
}
.model-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.model-teaser { color: var(--muted); font-size: 0.92rem; margin-bottom: 16px; flex: 1; }
.model-cta {
  align-self: flex-start;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--white);
  border-bottom: 2px solid var(--zx-red);
  padding-bottom: 3px;
}
.model-card:hover .model-cta { color: var(--zx-red); }

/* ========================= VISIT / CTA ======================== */
.cta-band {
  background:
    linear-gradient(180deg, rgba(226,0,26,0.08), rgba(226,0,26,0)) ,
    var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 900px) {
  .cta-inner { grid-template-columns: 1.4fr 1fr; }
}
.cta-text p { color: var(--muted); max-width: 52ch; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (min-width: 900px) { .cta-actions { justify-content: flex-end; } }
/* ================================================================
   MODEL PAGE (model.php)
   Appended block. Every class below is new; model.php expects these
   and none existed before, so nothing here overrides existing styles.
   Uses the existing design tokens only (no new colours invented).
   ================================================================ */

/* ---------- Bike hero ---------- */
.bike-hero { border-bottom: 1px solid var(--line); background: var(--ink); }
.bike-hero-media { background: var(--panel-2); }
.bike-hero-media img {
  width: 100%;
  max-height: 68vh;
  object-fit: cover;
  object-position: center;
}
.bike-hero-body {
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(28px, 5vw, 56px);
}
.bike-name {
  font-size: clamp(2.2rem, 6vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0.1em 0 0.25em;
}
.bike-tagline {
  color: var(--zx-red);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  margin: 0 0 0.8em;
}
.bike-intro {
  color: var(--muted);
  max-width: 64ch;
  margin: 0 0 1.4em;
}

/* Highlights: simple marked list, becomes two columns on wider screens */
.bike-highlights {
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
  display: grid;
  gap: 10px;
}
.bike-highlights li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
}
.bike-highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  background: var(--zx-red);
  border-radius: 50%;
}
@media (min-width: 700px) {
  .bike-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
}

/* Colour swatches */
.bike-colours { margin: 0 0 1.6em; }
.bike-colours-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 10px;
}
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--speed) ease, background var(--speed) ease;
}
.swatch:hover { border-color: var(--muted); }
.swatch.is-active { border-color: var(--zx-red); background: var(--panel); }
.swatch-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--chip, var(--panel-2));
  border: 1px solid rgba(255,255,255,0.25);
  flex: none;
}
.swatch-name { line-height: 1; }

/* ---------- Walkaround strip ---------- */
.rotate-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.rotate-strip img {
  height: clamp(220px, 42vw, 460px);
  width: auto;
  flex: none;
  scroll-snap-align: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rotate-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ---------- Specifications: three column panels ---------- */
.bike-note {
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1.4em;
}
.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 700px)  { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .spec-grid { grid-template-columns: repeat(3, 1fr); } }

.spec-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 8px;
}
.spec-group-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--zx-red);
}
.spec-list { margin: 0; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 0 0 42%;
}
.spec-row dd {
  margin: 0;
  text-align: right;
  font-size: 0.9rem;
}
.spec-disclaimer {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 1.6em;
  max-width: 70ch;
}

/* ---------- Beauty gallery ---------- */
.beauty-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px)  { .beauty-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .beauty-grid { grid-template-columns: repeat(3, 1fr); } }
.beauty-item {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.beauty-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--speed) ease;
}
.beauty-item:hover img { transform: scale(1.04); }

/* ---------- Other models ---------- */
.other-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px)  { .other-grid { grid-template-columns: repeat(3, 1fr); } }
.other-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--speed) ease, transform var(--speed) ease;
}
.other-card:hover { border-color: var(--zx-red); transform: translateY(-2px); }
.other-class {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--zx-red);
}
.other-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  line-height: 1;
}
.other-cta {
  margin-top: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.other-card:hover .other-cta { color: var(--white); }
