/* ============================================
   Van 4.0 — 2012 Ford Transit camper, Nelson NZ
   Design system and global styles.
   Palette: cool stone base, deep petrol ink, bush-green accent.
   ============================================ */

@font-face {
  font-family: 'Serif Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 96%;
  ascent-override: 94%;
  descent-override: 28%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Sans Fallback';
  src: local('Helvetica Neue'), local('Helvetica'), local('Arial');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  --color-bg:        #F4F5F2;
  --color-bg-alt:    #E5E9E4;
  --color-surface:   #FFFFFF;
  --color-ink:       #131C22;
  --color-ink-soft:  #3B4750;
  --color-muted:     #5C6970;
  --color-rule:      rgba(19, 28, 34, 0.14);
  --color-accent:    #17635A;

  /* On dark bands */
  --color-dark:        #101A1F;
  --color-dark-alt:    #16232A;
  --color-on-dark:     #F4F5F2;
  --color-on-dark-mut: #A8B5B8;
  --color-on-dark-acc: #6FD3BE;

  --font-serif: 'Fraunces', 'Serif Fallback', Georgia, serif;
  --font-sans:  'Archivo', 'Sans Fallback', 'Helvetica Neue', Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;

  --maxw-content: 1140px;
  --maxw-wide: 1400px;
  --maxw-prose:  660px;
  --maxw-headline: 820px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --header-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-ink-soft);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-ink); text-decoration: none; transition: opacity 0.15s ease; }
a:hover { opacity: 0.65; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.015em;
  /* Keeps a single word from stranding on its own line as the width changes.
     Ignored by browsers that do not support it, which is harmless. */
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 6vw, 4.15rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.005em; }
p { margin: 0 0 var(--space-2); }
strong { color: var(--color-ink); font-weight: 600; }

/* ============================================
   Layout helpers
   ============================================ */

.container {
  width: 100%;
  max-width: var(--maxw-content);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.container--narrow   { max-width: var(--maxw-prose); }
.container--headline { max-width: var(--maxw-headline); }
.container--wide     { max-width: var(--maxw-wide); }

.section { padding: var(--space-6) 0; }
.section--tight { padding: var(--space-5) 0; }
.section--alt { background: var(--color-bg-alt); }

.section--dark {
  background: var(--color-dark);
  color: var(--color-on-dark-mut);
}
.section--dark h2, .section--dark h3 { color: var(--color-on-dark); }
.section--dark a { color: var(--color-on-dark); }
.section--dark .eyebrow { color: var(--color-on-dark-acc); }
.section--dark strong { color: var(--color-on-dark); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

.lede {
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.6;
  color: var(--color-ink-soft);
}

.rule {
  border: 0;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-4) 0;
}

/* ============================================
   Header / Navigation
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  border-bottom: 1px solid var(--color-rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--space-3);
  max-width: var(--maxw-wide);
  margin: 0 auto;
  gap: var(--space-3);
  min-height: var(--header-h);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  white-space: nowrap;
}
.nav__logo:hover { opacity: 1; }

.nav__logo-sub {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: 0.9375rem;
  color: var(--color-ink-soft);
}

.nav__links a:hover { color: var(--color-ink); opacity: 1; }

.nav__cta {
  background: var(--color-ink);
  color: var(--color-bg) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
}
.nav__cta:hover { opacity: 0.85; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-ink);
}
.nav__toggle svg { display: block; }

/* ============================================
   Hero
   ============================================ */

/* Two columns on desktop: the photograph on the left with nothing over it, the
   words on the dark ground to the right. An earlier version floated the text
   on glass across the photo and the panel sat over the back of the van, which
   is the thing being sold. Below 1024px the two stack, photo first. */
.hero-full {
  position: relative;
  background: var(--color-dark);
  min-height: clamp(28rem, 64vh, 44rem);
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  overflow: hidden;
}

.hero-full__media {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-full__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 22% keeps the whole van, bumper to rear corner, inside the column at every
     desktop width. Moving this towards 0 crops the front off. */
  object-position: 22% 52%;
}

/* A short fade on the photo's right edge so it meets the dark column softly
   rather than as a hard seam. It stops short of the van. */
.hero-full__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 14, 17, 0) 78%, rgba(8, 14, 17, 0.55) 100%);
}

.hero-full__inner {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--space-5) clamp(1.5rem, 3.5vw, 3.5rem);
}

.hero-panel { max-width: 34rem; }

.hero-full__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #DFF3EC;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.hero-full h1 {
  color: #FFFFFF;
  max-width: 16ch;
  margin-bottom: var(--space-3);
  text-wrap: balance;
}

.hero-full__sub {
  color: #E7EDEA;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  max-width: 46ch;
  margin: 0 0 var(--space-4);
}

.hero-full__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  background: rgba(244, 245, 242, 0.12);
  border: 1px solid rgba(244, 245, 242, 0.35);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.1rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.price-chip span {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: #CFE6DF;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  line-height: 1;
}

.btn--primary { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.btn--primary:hover { background: transparent; color: var(--color-ink); opacity: 1; }
.btn--ghost { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--ghost:hover { background: var(--color-ink); color: var(--color-bg); opacity: 1; }

.btn--light { background: var(--color-bg); color: var(--color-ink); border-color: var(--color-bg); }
.btn--light:hover { background: transparent; color: var(--color-bg); opacity: 1; }
.btn--outline-light { background: transparent; color: var(--color-on-dark); border-color: rgba(244, 245, 242, 0.55); }
.btn--outline-light:hover { background: var(--color-bg); color: var(--color-ink); opacity: 1; }

/* ============================================
   Key facts strip
   ============================================ */

.factstrip {
  background: var(--color-dark-alt);
  color: var(--color-on-dark);
  padding: var(--space-4) 0;
}

.factstrip__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-3);
}

.factstrip__item { border-left: 2px solid var(--color-on-dark-acc); padding-left: var(--space-2); }

.factstrip__value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-on-dark);
  line-height: 1.1;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.factstrip__label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-dark-mut);
  margin: 0;
}

/* ============================================
   Split blocks (photo + text)
   ============================================ */

.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-rule);
}
.split-block:last-child { border-bottom: 0; padding-bottom: 0; }
.split-block:first-child { padding-top: 0; }
.split-block--reverse .split-block__media { order: 2; }
.split-block__media img { width: 100%; height: auto; border-radius: var(--radius-md); }
.split-block__body h3 { margin-bottom: var(--space-2); }

.section--dark .split-block { border-bottom-color: rgba(244, 245, 242, 0.15); }

/* Feature list inside split blocks */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feature-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.4rem;
  border-bottom: 1px solid var(--color-rule);
  font-size: 0.9688rem;
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.section--dark .feature-list li { border-bottom-color: rgba(244, 245, 242, 0.15); }
.section--dark .feature-list li::before { background: var(--color-on-dark-acc); }

/* ============================================
   Spec table
   ============================================ */

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 0 var(--space-5);
  margin: 0;
}

.spec__row {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: var(--space-2);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-rule);
  align-items: baseline;
}

.spec__key {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
}

.spec__val { color: var(--color-ink); font-size: 0.9688rem; margin: 0; }

/* ============================================
   Gallery
   ============================================ */

.gallery {
  columns: 3 300px;
  column-gap: var(--space-2);
}

.gallery__item {
  break-inside: avoid;
  margin: 0 0 var(--space-2);
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-md);
  overflow: hidden;
  line-height: 0;
}

.gallery__item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.gallery__item:hover img { transform: scale(1.025); opacity: 0.92; }

.gallery__caption {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-dark-mut);
  line-height: 1.5;
  padding: 0.5rem 0.1rem 0;
  text-align: left;
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 14, 17, 0.94); }

.lightbox__frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  gap: var(--space-2);
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__cap {
  color: var(--color-on-dark);
  font-size: 0.875rem;
  margin: 0;
  text-align: center;
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(244, 245, 242, 0.12);
  border: 1px solid rgba(244, 245, 242, 0.4);
  color: var(--color-on-dark);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.lightbox__btn:hover { background: rgba(244, 245, 242, 0.25); }
.lightbox__btn--prev { left: clamp(0.5rem, 2vw, 2rem); }
.lightbox__btn--next { right: clamp(0.5rem, 2vw, 2rem); }
.lightbox__btn--close { top: clamp(0.75rem, 2vw, 1.5rem); right: clamp(0.5rem, 2vw, 2rem); transform: none; }

/* ============================================
   Kit list
   ============================================ */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: var(--space-3) 0 0;
  list-style: none;
}
.tag-list li {
  padding: 0.4rem 0.95rem;
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
}
.section--dark .tag-list li {
  background: rgba(244, 245, 242, 0.08);
  border-color: rgba(244, 245, 242, 0.22);
  color: var(--color-on-dark);
}

/* Two-column prose */
.prose-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-2) var(--space-5);
}

/* ============================================
   CTA band
   ============================================ */

.cta-band {
  background: var(--color-dark);
  color: var(--color-on-dark-mut);
  padding: var(--space-6) 0;
}
.cta-band h2 { color: var(--color-on-dark); }
.cta-band .eyebrow { color: var(--color-on-dark-acc); }
.cta-band__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-3);
}
.cta-band__note { font-size: 0.875rem; margin-top: var(--space-3); color: var(--color-on-dark-mut); }

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--color-dark-alt);
  color: var(--color-on-dark);
  padding: var(--space-5) 0 var(--space-3);
}
.site-footer a { color: var(--color-on-dark); }
.site-footer a:hover { opacity: 0.7; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(244, 245, 242, 0.18);
}

.footer__title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-on-dark);
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  margin: 0 0 var(--space-2);
}

.footer__title-sub {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-on-dark-mut);
  font-weight: 500;
}

.footer__tagline { font-size: 0.9375rem; color: var(--color-on-dark-mut); margin: 0; }

.footer__heading {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-on-dark-mut);
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

.footer__nav, .footer__contact { list-style: none; padding: 0; margin: 0; font-size: 0.9375rem; }
.footer__nav li, .footer__contact li { padding: 0.35rem 0; color: var(--color-on-dark); }

.footer__legal {
  padding-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--color-on-dark-mut);
}

/* ============================================
   Sticky phone bar (small screens only)
   ============================================ */

.callbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--color-dark) 94%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(244, 245, 242, 0.2);
  padding: 0.6rem var(--space-3) calc(0.6rem + env(safe-area-inset-bottom));
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}
.callbar__price {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-on-dark);
  letter-spacing: -0.01em;
}
.callbar .btn { padding: 0.7rem 1.2rem; font-size: 0.875rem; }

/* ============================================
   404
   ============================================ */

.notfound { padding: var(--space-7) 0; text-align: center; }

/* ============================================
   Accessibility
   ============================================ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; opacity: 1; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Light ring on every surface that sets its own dark background. */
:where(.site-footer, .section--dark, .cta-band, .factstrip, .hero-full, .lightbox, .callbar) :where(a, button):focus-visible {
  outline-color: var(--color-bg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.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;
}

/* ============================================
   Responsive
   ============================================ */

/* Below this the two hero columns stack: photo first, words under it. The
   media box is given the same aspect ratio as the file it is showing, so the
   van is never cropped, front or back. */
@media (max-width: 1024px) {
  .hero-full { display: block; min-height: 0; }
  .hero-full__media { height: auto; aspect-ratio: 16 / 9; }
  .hero-full__media img { height: 100%; }
  .hero-full__scrim { display: none; }
  .hero-full__inner { display: block; padding: var(--space-4) var(--space-3) var(--space-5); }
  .hero-panel { max-width: 40rem; }
}

/* Phones get the portrait cut of the same photo. 4/5 against a 3/4 file trims
   a little top and bottom and nothing off the sides, where the van is. */
@media (max-width: 560px) {
  .hero-full__media { aspect-ratio: 4 / 5; }
  .hero-full__media img { object-position: 50% 50%; }
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split-block { grid-template-columns: 1fr; gap: var(--space-3); }
  .split-block--reverse .split-block__media { order: 0; }
}

@media (max-width: 820px) {
  :root { --space-6: 3.25rem; --space-7: 4rem; }

  .nav__toggle { display: block; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule);
    padding: var(--space-2) 0;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 0.6rem var(--space-3); border-bottom: 1px solid var(--color-rule); }
  .nav__links li:last-child { border-bottom: 0; padding-top: 1rem; }
  .nav__cta { display: inline-block; text-align: center; }

  .callbar { display: flex; }
  body { padding-bottom: 4.5rem; }

  .footer__grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .footer__legal { flex-direction: column; gap: var(--space-1); text-align: center; }

  .spec__row { grid-template-columns: 1fr; gap: 0.15rem; padding: 0.65rem 0; }
  .gallery { columns: 2 220px; }
}

@media (max-width: 460px) {
  .nav__logo { font-size: 1.55rem; }
  .nav__logo-sub { display: none; }
  .gallery { columns: 1; }
  .callbar__price { font-size: 1rem; }
  .hero-full__ctas .btn { flex: 1 1 42%; padding-inline: 1rem; font-size: 0.875rem; }
  .price-chip { width: 100%; justify-content: center; }
}
