/* Grampas Garage design tokens, in three layers. See styleguide.html for all of them on one page.
   1. PRIMITIVES  raw values. Change these to re-skin the whole site.
   2. SEMANTIC    what a value is for (page background, heading, accent...). Rules below use these.
   3. COMPONENTS  settings for one building block (button, card, panel...). */

/* ============ 1. PRIMITIVES ============ */
:root {
  /* colours matched to the logo badge */
  --color-green-900: #152a1e; /* also the theme-color meta tag in each page's <head> */
  --color-green-800: #1f3d2b;
  --color-brass-500: #b08d57;
  --color-brass-400: #c9a66b;
  --color-cream-50: #fffdf8;
  --color-cream-100: #f5efe0;
  --color-cream-200: #ede5d3;
  --color-cream-300: #e0d6bf;
  --color-ink-900: #1d1d1b;
  --color-ink-600: #55524a;
  --color-white: #ffffff;

  --font-serif: "Playfair Display", "Playfair Fallback", Georgia, "Times New Roman", serif;
  --font-sans: Inter, "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --font-size-xs: 0.8rem;
  --font-size-sm: 0.9rem;
  --font-size-base: 1.0625rem;
  --font-size-md: 1.15rem;
  --font-size-lg: 1.35rem;
  --font-size-xl: 1.6rem;
  --font-size-2xl: clamp(1.9rem, 4vw, 2.75rem);
  --font-size-3xl: clamp(2.2rem, 5vw, 3.25rem);
  --font-size-4xl: clamp(2.4rem, 5.5vw, 3.9rem);

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --line-height-tight: 1.15;
  --line-height-body: 1.65;
  --tracking-snug: 0.06em;
  --tracking-wide: 0.14em;
  --tracking-wider: 0.2em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --radius-sm: 2px;
  --radius-full: 50%;
  --duration-fast: 0.15s;
  --duration-press: 0.1s;
  --duration-slow: 0.3s;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Fallback fonts: Georgia and Arial resized to match Playfair and Inter, so text doesn't jump when the
   web fonts arrive. Numbers measured from the real fonts on this site's own text (Dec 2026);
   re-measure if the fonts change. Phones without Georgia/Arial (Android) skip these. */
@font-face { font-family: "Playfair Fallback"; src: local("Georgia"); font-weight: 400 500; size-adjust: 100.69%; ascent-override: 107.26%; descent-override: 24.83%; line-gap-override: 0%; }
@font-face { font-family: "Playfair Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 600 700; size-adjust: 87.9%; ascent-override: 122.87%; descent-override: 28.44%; line-gap-override: 0%; }
@font-face { font-family: "Playfair Fallback"; src: local("Georgia Italic"), local("Georgia-Italic"); font-style: italic; font-weight: 400 500; size-adjust: 97.36%; ascent-override: 110.93%; descent-override: 25.68%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400 500; size-adjust: 106.12%; ascent-override: 91.4%; descent-override: 22.62%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 700; size-adjust: 100.6%; ascent-override: 96.42%; descent-override: 23.86%; line-gap-override: 0%; }

/* ============ 2. SEMANTIC ============ */
:root {
  --color-bg: var(--color-cream-100);
  --color-bg-alt: var(--color-cream-200);
  --color-surface: var(--color-cream-50);
  --color-border: var(--color-cream-300);
  --color-text: var(--color-ink-900);
  --color-text-muted: var(--color-ink-600);
  --color-heading: var(--color-green-800);
  --color-link: var(--color-green-800);
  --color-accent: var(--color-brass-500);       /* fills, lines, borders; too light for text on cream */
  --color-accent-hover: var(--color-brass-400);
  --color-focus: var(--color-green-800); /* brass on cream is only 2.7:1; dark areas switch to brass below */

  /* dark green areas: header, hero, page titles, car cards, call to action, footer */
  --color-inverse-bg: var(--color-green-900);
  --color-inverse-bg-alt: var(--color-green-800);
  --color-inverse-text: var(--color-cream-100);
  --color-inverse-accent: var(--color-brass-400); /* brass text is readable on green only */

  --font-heading: var(--font-serif);
  --font-body: var(--font-sans);

  --width-content: 1140px;
  --width-prose: 65ch;
  --space-gutter: var(--space-5);
  --space-gap: var(--space-8);
  --space-section: clamp(3.5rem, 8vw, 6rem);
  --size-tap: 44px;
}

/* ============ 3. COMPONENTS ============ */
:root {
  --button-bg: var(--color-accent);
  --button-bg-hover: var(--color-accent-hover);
  --button-text: var(--color-text);
  --button-height: 48px;
  --button-padding: var(--space-3) var(--space-6);
  --button-radius: var(--radius-sm);
  --button-ghost-bg-hover: color-mix(in srgb, var(--color-accent) 18%, transparent);
  --whatsapp-bar-height: 56px;

  --card-bg: var(--color-inverse-bg);
  --card-text: var(--color-inverse-text);
  --card-text-muted: color-mix(in srgb, var(--color-inverse-text) 78%, transparent);
  --card-accent: var(--color-inverse-accent);
  --card-photo-ratio: 3 / 2; /* wide, so the whole car fits */
  --card-border: 1px solid var(--color-border); /* also the hairline for maps, tables and dividers */
  --card-radius: var(--radius-sm);
  --card-padding: var(--space-5);
  --card-shadow:
    0 1px 2px color-mix(in srgb, var(--color-green-800) 6%, transparent),
    0 12px 28px -16px color-mix(in srgb, var(--color-green-800) 25%, transparent);

  /* gallery tiles, adapted from the Chroma Grid styles */
  --chroma-gap: var(--space-6);
  --chroma-min: 15rem;   /* no column narrower than this */
  --chroma-cols: 3;      /* and no more columns than this */
  --chroma-ratio: 4 / 3;
  --chroma-tile: var(--card-bg);
  --chroma-ink: var(--card-text);
  --chroma-muted: var(--card-text-muted);
  --chroma-accent: var(--card-accent);
  --chroma-well: color-mix(in srgb, var(--color-inverse-text) 8%, var(--card-bg)); /* shows while a photo loads */
  --chroma-edge: color-mix(in srgb, var(--color-inverse-text) 12%, transparent);
  --chroma-highlight: color-mix(in srgb, var(--color-inverse-text) 8%, transparent);
  --chroma-mono: grayscale(1) brightness(0.85);

  --panel-bg: var(--color-surface);
  --panel-border: 1px solid var(--color-border);
  --panel-top: 3px solid var(--color-accent);
  --panel-padding: var(--space-8);

  --rule-width: 64px;
  --rule-color: var(--color-accent);

  --header-bg: var(--color-inverse-bg);
  --footer-bg: var(--color-inverse-bg);
  --divider-inverse: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);

  --frame-inset: var(--space-4);
  --frame-inner: color-mix(in srgb, var(--color-inverse-accent) 50%, transparent);
  --frame-outer: color-mix(in srgb, var(--color-inverse-accent) 25%, transparent);

  --hero-photo: url(../images/singer-le-mans.jpg);
  /* dark on the left for the text, photo shows through on the right */
  --hero-overlay: linear-gradient(90deg,
    color-mix(in srgb, var(--color-inverse-bg) 95%, transparent) 0%,
    color-mix(in srgb, var(--color-inverse-bg) 80%, transparent) 40%,
    color-mix(in srgb, var(--color-inverse-bg) 10%, transparent) 100%);
  /* phones: the photo gets its own strip above the text; vw because the photo scales with the screen width */
  --hero-strip: 62vw;
}

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

html {
  -webkit-tap-highlight-color: transparent; /* no grey flash on tap; controls have their own :active below */
  -webkit-text-size-adjust: 100%;           /* no font inflation in landscape */
}
a, button { touch-action: manipulation; } /* taps fire at once, without the double-tap-zoom wait */
a:not(.btn):active { opacity: 0.7; }

body {
  display: flex; /* with main's flex below, a short page (the 404) still reaches the bottom of the window */
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-heading);
  text-wrap: balance;
}
h2 { font-size: var(--font-size-2xl); margin: 0; }
h3 { font-size: var(--font-size-lg); margin: 0 0 var(--space-2); }
p { text-wrap: pretty; } /* no single word left on the last line */
img { max-width: 100%; display: block; }
a { color: var(--color-link); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.site-header, .hero, .page-title, .card-body, .cta, .site-footer, .lightbox, .skip-link { --color-focus: var(--color-inverse-accent); }

.wrap { max-width: var(--width-content); margin: 0 auto; padding: 0 var(--space-gutter); }
.lead { font-size: var(--font-size-md); color: var(--color-text-muted); }
.prose { max-width: var(--width-prose); }
/* text for screen readers only */
.skip-link { position: absolute; top: var(--space-3); left: var(--space-3); z-index: 20; }
.skip-link:not(:focus) { clip-path: inset(50%); } /* shows only when a keyboard user tabs to it */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.prose h2 { margin-bottom: var(--space-5); }

/* Small uppercase label above headings */
.eyebrow {
  margin: 0 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section-head { text-align: center; margin-bottom: var(--space-12); }
.section-head h2::after {
  content: "";
  display: block;
  width: var(--rule-width);
  height: 2px;
  margin: var(--space-5) auto 0;
  background: var(--rule-color);
}
.section-foot { text-align: center; margin: var(--space-12) 0 0; }

/* ============ HEADER ============ */
.site-header { background: var(--header-bg); color: var(--color-inverse-text); border-bottom: var(--divider-inverse); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-8);
  max-width: none; /* logo and menu run out toward the screen edges, past the content column */
  padding: var(--space-4) clamp(var(--space-gutter), 3vw, var(--space-12));
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.1;
  color: var(--color-inverse-text);
  text-decoration: none;
}
.logo span { display: flex; flex-direction: column; }
.logo small {
  margin-top: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-inverse-accent);
}
/* the logo file has white corners; clip to the badge's outer ring */
.badge { flex-shrink: 0; border-radius: var(--radius-full); clip-path: circle(46.5%); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-tap);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-inverse-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
/* Phones: the menu gets its own single row, so the header is the same height whichever font has
   loaded (Inter is wider than the fallback and used to push "Contact" onto a second row) */
@media (max-width: 719px) {
  .site-nav { flex-basis: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0 var(--space-1); } /* still wraps if the reader enlarges text */
}
@media (max-width: 359px) { /* five items fit the narrowest phones; space-between still spaces them out */
  .site-nav ul { gap: 0; }
  .site-nav a { letter-spacing: var(--tracking-snug); }
}
.site-nav a[aria-current="page"] { color: var(--color-inverse-accent); border-bottom-color: var(--color-inverse-accent); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  padding: var(--button-padding);
  border: 1px solid var(--button-bg);
  border-radius: var(--button-radius);
  background: var(--button-bg);
  color: var(--button-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  user-select: none;         /* a long press shouldn't select the label */
  -webkit-user-select: none;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), transform var(--duration-press) ease-out;
}
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
/* press feedback the moment a finger lands, on touch and mouse alike */
.btn:active { background: var(--button-bg-hover); border-color: var(--button-bg-hover); transform: scale(0.97); }
.btn-ghost:active { background: var(--button-ghost-bg-hover); border-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }

/* hover only with a real mouse; on touch, :hover sticks after a tap */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--button-bg-hover); border-color: var(--button-bg-hover); }
  .btn-ghost:hover { background: var(--button-ghost-bg-hover); border-color: currentColor; }
  .site-nav a:hover { color: var(--color-inverse-accent); border-bottom-color: var(--color-inverse-accent); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Phones: WhatsApp pinned to the bottom of the screen, so a booking is one tap away anywhere on the page */
.whatsapp-bar { display: none; }
@media (max-width: 719px) {
  .whatsapp-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    display: flex;
    min-height: calc(var(--whatsapp-bar-height) + env(safe-area-inset-bottom));
    padding: 0 var(--space-gutter) env(safe-area-inset-bottom);
    border: 0;
    border-radius: 0;
    text-align: center; /* a label that wraps at 320px stays centred */
    box-shadow: 0 -8px 24px -12px color-mix(in srgb, var(--color-green-900) 60%, transparent);
  }
  .whatsapp-bar:active { transform: none; }
  .whatsapp-bar:focus-visible { outline-color: var(--color-inverse-bg); outline-offset: -6px; }
  .site-footer { padding-bottom: calc(var(--whatsapp-bar-height) + env(safe-area-inset-bottom)); }
  .btn-row a[href^="https://wa.me"] { display: none; } /* the pinned bar is the WhatsApp button on phones, with the same message as the row's */
}

/* ============ HERO AND PAGE TITLES ============ */
/* green with a double brass frame; the home hero adds the photo */
.hero, .page-title {
  position: relative;
  background: radial-gradient(ellipse at center, var(--color-inverse-bg-alt) 0%, var(--color-inverse-bg) 75%);
  color: var(--color-inverse-text);
  text-align: center;
}
.hero::before, .page-title::before {
  content: "";
  position: absolute;
  inset: var(--frame-inset);
  border: 1px solid var(--frame-inner);
  outline: 1px solid var(--frame-outer);
  outline-offset: var(--space-1);
  pointer-events: none;
}
.hero {
  padding: clamp(5rem, 13vw, 8.5rem) 0;
  text-align: left;
  background: var(--hero-overlay), var(--hero-photo) 70% center / cover, var(--color-inverse-bg);
}
@media (max-width: 719px) { /* the same phone breakpoint as the WhatsApp bar */
  .hero::before { top: var(--hero-strip); } /* the frame starts under the photo, not across the car */
  .hero {
    padding-top: calc(var(--hero-strip) + var(--space-8));
    background:
      linear-gradient(transparent calc(var(--hero-strip) - 12vw), var(--color-inverse-bg) var(--hero-strip)),
      var(--hero-photo) 46% -8vw / 120% auto no-repeat, /* 120% wide crops the trees and lets the car fill the strip */
      var(--color-inverse-bg);
  }
}
.page-title { padding: clamp(var(--space-8), 9vw, 5.5rem) 0; } /* short on phones so the first car shows on load */
.hero .eyebrow, .page-title .eyebrow, .cta .eyebrow { color: var(--color-inverse-accent); }
.hero h1, .page-title h1 { color: var(--color-inverse-text); font-weight: var(--font-weight-medium); margin: 0 0 var(--space-5); }
.hero h1 { font-size: var(--font-size-4xl); max-width: 16ch; }
.page-title h1 { font-size: var(--font-size-3xl); }
.hero h1 em { font-style: italic; color: var(--color-inverse-accent); }
.hero p:not(.eyebrow), .page-title p:not(.eyebrow) { max-width: 52ch; margin: 0 auto; font-size: var(--font-size-md); }
.hero p:not(.eyebrow) { max-width: 40ch; margin: 0; }
.hero .btn-row { margin-top: var(--space-8); }
.hero .btn-ghost, .cta .btn-ghost, .lightbox .btn-ghost { color: var(--color-inverse-text); }

/* ============ SECTIONS AND GRIDS ============ */
.section { padding: var(--space-section) 0; }
.section-alt { background: var(--color-bg-alt); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-gap); }
/* 4 items: 1, then 2x2, then 4 across, so no lone item on a row */
@media (min-width: 600px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
/* 6 cars: 1, then 2 across, then 3 across */
@media (min-width: 600px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ============ PANEL ============ */
.panel { background: var(--panel-bg); border: var(--panel-border); border-top: var(--panel-top); border-radius: var(--radius-sm); padding: var(--panel-padding); }
.panel p { margin: 0; }
.icon { width: var(--size-tap); height: var(--size-tap); margin-bottom: var(--space-5); color: var(--color-heading); }

/* ============ CAR CARD ============ */
/* Wide photo, then the car's name, specs, and price beside Enquire */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  color: var(--card-text);
  text-decoration: none; /* home page cards are links to the car */
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.card-photo { aspect-ratio: var(--card-photo-ratio); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-photo img { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .card-photo img { transition: none; } }
.card h3 { margin: 0; font-size: var(--font-size-xl); color: var(--card-text); }
.card h3 span, .car-list h3 span, .car-list li > a span { /* the year */
  display: block;
  margin-bottom: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  color: var(--card-accent);
}
.card-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4) var(--card-padding) var(--card-padding); }
.specs { list-style: none; margin: 0; padding: 0; font-size: var(--font-size-sm); color: var(--card-text-muted); }
.specs li { display: inline; }
.specs li:not(:last-child)::after { content: "\00A0\00B7"; } /* no-break space and middle dot: a line can end on the dot but never start with it */
.card-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: auto; }
.price { margin: 0; font-family: var(--font-heading); font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
.price small { font-family: var(--font-body); font-size: var(--font-size-sm); font-weight: var(--font-weight-regular); color: var(--card-text-muted); }

/* ============ SHOWCASE ============ */
/* The cars with photos as cards in a .grid, then a compact list of the rest (Home and Our Cars) */
.showcase { display: grid; gap: var(--space-12); }
.showcase-more > p:not(:last-child) { margin: var(--space-2) 0 0; color: var(--color-text-muted); }
.car-list { list-style: none; margin: var(--space-6) 0; padding: 0; }
.car-list > * { border-top: var(--card-border); }
.car-list > :last-child { border-bottom: var(--card-border); }
.car-list h3 span, .car-list li > a span, .car-list .specs, .car-list .price small { color: var(--color-text-muted); }
/* Our Cars: name and specs, then price and Enquire (beside them from 600px) */
.car-list article { display: grid; gap: var(--space-2) var(--space-6); align-items: center; padding-block: var(--space-5); }
.car-list h3 { margin: 0; font-size: var(--font-size-lg); }
.car-list .card-action { margin-top: var(--space-2); }
@media (min-width: 600px) {
  .car-list article { grid-template-columns: 1fr auto; }
  .car-list .card-action { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
/* Home: each name links to that car on Our Cars */
.car-list li > a {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  min-height: var(--size-tap);
  padding-block: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  color: var(--color-heading);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .car-list li > a:hover { text-decoration: underline; } }

/* ============ GALLERY ============ */
/* Adapted from the Chroma Grid styles: photo tiles that each open their photo bigger.
   With a mouse the photos are grey and turn to colour on hover; touch screens have no hover, so they stay in colour. */
.chroma-grid {
  display: grid;
  gap: var(--chroma-gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--chroma-min), calc((100% - (var(--chroma-cols) - 1) * var(--chroma-gap)) / var(--chroma-cols)))), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.chroma-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2);
  border: 0;
  border-radius: var(--card-radius);
  background: var(--chroma-tile);
  box-shadow: var(--card-shadow);
  color: var(--chroma-ink);
  font: inherit;
  text-align: start;
  cursor: zoom-in;
}
.chroma-card::before { /* brass wash rising from the bottom on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(130% 70% at 50% 100%, var(--chroma-accent), transparent 72%);
  opacity: 0;
}
.chroma-card::after { /* hairline rim, brass on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--chroma-edge), inset 0 1px 0 var(--chroma-highlight);
  pointer-events: none;
}
.chroma-media { position: relative; aspect-ratio: var(--chroma-ratio); overflow: hidden; background: var(--chroma-well); }
.chroma-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chroma-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--chroma-edge); }
.chroma-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 var(--space-2) var(--space-1); }
.chroma-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chroma-title { font-weight: var(--font-weight-semibold); }
.chroma-subtitle { font-size: var(--font-size-sm); color: var(--chroma-muted); }
@media (hover: hover) and (pointer: fine) {
  .chroma-media img { filter: var(--chroma-mono); }
  .chroma-card::before, .chroma-card::after, .chroma-media img {
    transition: opacity var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out), filter var(--duration-slow) var(--ease-out);
  }
  .chroma-card:is(:hover, :focus-visible) .chroma-media img { filter: none; }
  .chroma-card:is(:hover, :focus-visible)::before { opacity: 0.25; }
  .chroma-card:is(:hover, :focus-visible)::after { box-shadow: inset 0 0 0 1px var(--chroma-accent), inset 0 0 16px -8px var(--chroma-accent); }
}
/* The photo opened bigger: a full-screen modal dialog the tile opens with command="show-modal", so it needs no script.
   The page behind goes inert (no taps fall through, focus stays inside); Esc, Close or a tap anywhere off the photo shuts it.
   shortcut: older browsers without invoker commands (before Chrome 135, Firefox 144, Safari 26.2) open nothing; link tiles to the photo file if they matter */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--space-gutter) 0; /* edge to edge on phones, so the photo is as big as it can be */
  border: 0;
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
  text-align: center;
}
.lightbox[open] { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: var(--space-4); }
.lightbox::backdrop { background: var(--color-inverse-bg); }
.lightbox-dismiss { position: absolute; inset: 0; border: 0; background: none; cursor: zoom-out; } /* every tap off the photo and buttons lands here */
.lightbox > :not(.lightbox-dismiss) { position: relative; }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: 72dvh; }
.lightbox p { margin: 0; padding-inline: var(--space-gutter); }
.lightbox .btn-row { justify-content: center; padding-inline: var(--space-gutter); }
@media (min-width: 720px) { .lightbox { padding: var(--space-gutter); } }
html:has(.lightbox[open]) { overflow: hidden; } /* the page behind doesn't scroll */

/* ============ NUMBERED STEPS ============ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--font-size-2xl);
  line-height: 1;
  color: var(--color-heading);
}

/* ============ CALL TO ACTION BAND ============ */
.cta { background: var(--color-inverse-bg-alt); color: var(--color-inverse-text); text-align: center; padding: var(--space-section) 0; }
main { flex: 1; }
main.cta { align-content: center; } /* the 404 page: the band fills the window */
.cta :is(h1, h2) { color: var(--color-inverse-text); margin-bottom: var(--space-4); }
.cta p { margin: 0 0 var(--space-8); }
.cta .btn-row { justify-content: center; }

/* ============ ABOUT PAGE ============ */
/* story text beside a tall photo; stacks on phones */
.story { display: grid; gap: var(--space-gap) var(--space-12); align-items: center; }
@media (min-width: 800px) { .story { grid-template-columns: 1fr minmax(260px, 380px); } }
.story-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 65%; /* keeps the car in frame, not just the trees */
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

/* ============ CONTACT PAGE ============ */
.details { margin: var(--space-8) 0 0; }
.details dt { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-text-muted); }
.details dd { margin: var(--space-1) 0 var(--space-5); font-size: var(--font-size-md); }
.contact h2 { font-size: var(--font-size-xl); margin-bottom: var(--space-5); }
.map { width: 100%; height: 380px; border: var(--card-border); border-radius: var(--card-radius); }

/* ============ FOOTER ============ */
.site-footer { background: var(--footer-bg); color: var(--color-inverse-text); font-size: var(--font-size-sm); }
.site-footer a { color: var(--color-inverse-text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--space-2); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-gap); padding-block: var(--space-12); }
.footer-grid p { margin: var(--space-4) 0 0; max-width: 32ch; }
.footer-title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-inverse-accent);
}
.footer-base { padding-block: var(--space-5); border-top: var(--divider-inverse); font-size: var(--font-size-xs); }
.footer-base p { margin: 0; }
