/* ==========================================================================
   DOOBIE - site stylesheet
   Structure: tokens / base / layout / header / hero / buttons / home /
              catalogue / lightbox / about / faq / location / footer / motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------------
   The brand green is sampled from the logo artwork: #02BC6B.

   It sits at 2.5:1 against white, which is below the 4.5:1 needed for body
   text, so on light sections it is only ever used as a FILL (buttons, rules,
   bars) with dark text on top. Green *text* on white uses --green-text.
   Against --ink it reaches 7.8:1 and is used freely.
   -------------------------------------------------------------------------- */
:root {
  /* brand */
  --green:       #02BC6B;  /* logo green - fills, rules, text on dark   7.8:1 on ink */
  --green-text:  #00874B;  /* green text/links on white                 4.6:1 AA     */
  --green-deep:  #00663A;  /* hover / pressed on white                  7.1:1        */
  --green-tint:  #E6F9F0;  /* light wash, active chip                                */

  /* greys - very slightly green-cast so they sit with the brand */
  --ink:         #0B0D0C;  /* dark hero + footer bg; body text on white */
  --ink-raised:  #161A18;  /* raised surfaces on dark                   */
  --ink-line:    #252B28;  /* hairlines on dark                         */
  --grey-700:    #3C4440;
  --grey-500:    #5A6560;  /* muted text on white                       6.1:1 AA */
  --grey-400:    #A8B2AD;  /* muted text on dark                        9.0:1 AA */
  --grey-300:    #C9D0CC;
  --grey-250:    #D5DCD8;  /* stat tiles - reads as a panel against white       */
  --grey-200:    #DDE2DF;
  --grey-150:    #E7EBE9;  /* alternating section bands                         */
  --grey-100:    #EDF0EE;
  --grey-50:     #F7F9F8;
  --white:       #FFFFFF;

  /* type */
  --font-latin: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Japanese is served from the system stack - see tools/fetch_fonts.py for why. */
  --font-ja: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium',
             'Yu Gothic', 'Noto Sans JP', Meiryo, sans-serif;
  --font: var(--font-latin), var(--font-ja);

  /* scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --step-0:  clamp(1rem, 0.96rem + 0.19vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.44rem);
  --step-2:  clamp(1.44rem, 1.29rem + 0.72vw, 1.9rem);
  --step-3:  clamp(1.73rem, 1.48rem + 1.24vw, 2.5rem);
  --step-4:  clamp(2.07rem, 1.66rem + 2.05vw, 3.3rem);
  --step-5:  clamp(2.49rem, 1.8rem + 3.44vw, 4.4rem);

  /* space + shape */
  --gutter: 1rem;
  --wrap: 1180px;
  --radius: 4px;
  --radius-lg: 8px;
  --header-h: 68px;

  --shadow-sm: 0 1px 2px rgba(11, 13, 12, .06), 0 2px 8px rgba(11, 13, 12, .04);
  --shadow-md: 0 2px 4px rgba(11, 13, 12, .07), 0 12px 28px rgba(11, 13, 12, .09);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 900px) { :root { --gutter: 2rem; --header-h: 76px; } }

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Japanese sets tighter and needs a touch more leading. */
html[lang="ja"] body { line-height: 1.8; letter-spacing: .01em; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
  text-wrap: balance;
}
html[lang="ja"] h1, html[lang="ja"] h2,
html[lang="ja"] h3, html[lang="ja"] h4 { letter-spacing: 0; line-height: 1.35; }

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-text); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--green-deep); }

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

/* The logo green is only 2.5:1 on white, below the 3:1 WCAG asks of a focus
   indicator, so light surfaces get the darkened green (7.1:1) and dark ones
   keep the brand green (7.8:1 on --ink). */
:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 2px;
  border-radius: 2px;
}
.header :focus-visible,
.hero :focus-visible,
.band :focus-visible,
.footer :focus-visible,
.quote :focus-visible,
.lightbox :focus-visible { outline-color: var(--green); }

::selection { background: var(--green); color: var(--ink); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  background: var(--green); color: var(--ink);
  padding: .7rem 1.1rem; border-radius: var(--radius); font-weight: 600;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: .75rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 760px; }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4.5vw, 3.5rem); }
.section--grey { background: var(--grey-150); }
/* --green-text falls to 3.8:1 against the band, so links there take the deeper green. */
.section--grey a { color: var(--green-deep); }
.section--grey a:hover { color: var(--ink); }
.section--line { border-top: 1px solid var(--grey-200); }

.section-head { max-width: 680px; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head p { color: var(--grey-500); font-size: var(--step-1); margin-bottom: 0; }

/* Small green-ruled label above a heading. */
.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 .9rem;
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey-500);
}
.eyebrow::before {
  content: ""; width: 28px; height: 3px;
  background: var(--green); border-radius: 2px; flex: none;
}
html[lang="ja"] .eyebrow { letter-spacing: .06em; }
/* --grey-500 is tuned for white backgrounds and drops to ~2:1 over a photograph.
   On dark sections the eyebrow takes the brand green instead: 7.8:1 on --ink. */
.on-dark .eyebrow,
.hero .eyebrow,
.band .eyebrow { color: var(--green); }

/* --------------------------------------------------------------------------
   4. Header
   --------------------------------------------------------------------------
   Transparent over the hero, then solid ink once scrolled. It is always dark,
   so the logo's green reads at 7.8:1 throughout.
   -------------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.header.is-scrolled,
.header.is-open {
  background: var(--ink);
  border-bottom-color: var(--ink-line);
}

/* While the header is transparent it sits directly on the hero photograph, and
   its white nav would otherwise land on whatever happens to be up there — the
   bright Purple Speed lettering, a headlight, a concrete wall. This shades the
   strip behind it, and fades out once the header turns solid. */
.header::before {
  content: ""; position: absolute; inset: 0 0 -40px; z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(11, 13, 12, .94) 0%,
    rgba(11, 13, 12, .74) 55%,
    rgba(11, 13, 12, 0) 100%);
  transition: opacity .25s var(--ease);
}
.header.is-scrolled::before,
.header.is-open::before { opacity: 0; }

.header__inner {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1rem;
}

.header__logo { flex: none; display: block; line-height: 0; }
.header__logo img { width: clamp(108px, 13vw, 140px); }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.25rem, 1.6vw, 1.75rem); }

.nav__list { display: flex; align-items: center; gap: clamp(.25rem, 1.6vw, 1.75rem); list-style: none; margin: 0; padding: 0; }

.nav__link {
  display: block; padding: .5rem .25rem;
  color: var(--white); text-decoration: none;
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  position: relative; white-space: nowrap;
}
html[lang="ja"] .nav__link { text-transform: none; letter-spacing: .02em; }
.nav__link::after {
  content: ""; position: absolute; left: .25rem; right: .25rem; bottom: .2rem;
  height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* EN / JA toggle */
.lang {
  display: inline-flex; flex: none;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px; overflow: hidden;
}
.lang__btn {
  appearance: none; border: 0; cursor: pointer;
  background: transparent; color: var(--grey-400);
  font: inherit; font-size: var(--step--1); font-weight: 600;
  padding: .3rem .75rem; line-height: 1.6;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang__btn:hover { color: var(--white); }
.lang__btn[aria-pressed="true"] { background: var(--green); color: var(--ink); }

/* Mobile menu */
.burger {
  display: none; flex: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius); cursor: pointer;
}
.burger span {
  display: block; width: 18px; height: 2px; margin: 3px auto;
  background: var(--white); transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.header.is-open .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 899px) {
  .burger { display: block; order: 3; }
  .nav { order: 4; }
  .nav__list {
    position: fixed; inset: var(--header-h) 0 auto;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
    padding: .5rem var(--gutter) 1.25rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .header.is-open .nav__list { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: .85rem .25rem; font-size: var(--step-0); border-bottom: 1px solid var(--ink-line); }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--green); }
  .lang { margin-left: auto; order: 2; }
}

/* --------------------------------------------------------------------------
   5. Hero
   --------------------------------------------------------------------------
   Full-bleed dark band. Only the home photograph is lit dark; the workshop
   shots are bright concrete, so a scrim keeps white text legible on all of
   them. --scrim-strength tunes it per page.
   -------------------------------------------------------------------------- */
/* Content is bottom-anchored so the photograph reads across the full width and the
   text sits in the darkest part of the frame, under the scrim's heaviest edge. */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: clamp(420px, 60vh, 580px);
  background: var(--ink);
  color: var(--white);
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(2.5rem, 5.5vw, 4.5rem);
  isolation: isolate;
  overflow: hidden;
}
.hero--tall { min-height: clamp(540px, 88vh, 820px); }
.hero--compact { min-height: clamp(280px, 40vh, 400px); padding-bottom: clamp(2rem, 4vw, 3rem); }

/* Interior-page hero (aero parts, about, location, FAQ).
   A fixed height rather than a content-driven one. The type scale uses vw units,
   so a hero sized by its content changes height whenever the viewport width
   changes -- including when the scrollbar appears mid-load, which made the
   background photograph visibly re-crop. Measured maximum content height across
   320-1920px is 476px, so content never reaches these floors and all four pages
   present an identical hero. Deliberately px, not vh: mobile browsers change vh
   when the URL bar collapses, which would reintroduce the same movement. */
.hero--page { min-height: 420px; }
@media (min-width: 700px) { .hero--page { min-height: 520px; } }

/* .hero is a stacking context, so the photo and scrim sit at z-index 0/1 above the
   element's own background and the content at 2. Negative z-index would paint them
   behind that background and the photo would never be seen. */
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--focal, 50% 50%);
}
/* Heaviest at the bottom where the text sits, clearing towards the top so the
   subject of the photograph stays visible. --scrim-strength tunes it per page:
   bright workshop shots need more, the dark studio shot needs little. */
/* Two layers, because dimming the whole frame enough to read text also kills the
   photograph. --scrim-text is a pool of shadow anchored to the bottom-left corner
   where the copy sits; --scrim-strength is a much lighter wash over everything,
   raised only for the bright workshop shots. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right,
      rgba(11, 13, 12, var(--scrim-text, .88)) 0%,
      rgba(11, 13, 12, calc(var(--scrim-text, .88) * .86)) 30%,
      rgba(11, 13, 12, calc(var(--scrim-text, .88) * .34)) 56%,
      rgba(11, 13, 12, 0) 78%),
    linear-gradient(to top,
      rgba(11, 13, 12, calc(var(--scrim-strength, .2) + .24)) 0%,
      rgba(11, 13, 12, var(--scrim-strength, .2)) 34%,
      rgba(11, 13, 12, calc(var(--scrim-strength, .2) * .4)) 100%);
}
@media (max-width: 639px) {
  /* Copy spans the full width on a phone, so the wash is vertical only. */
  .hero::after {
    background:
      linear-gradient(to top,
        rgba(11, 13, 12, calc(var(--scrim-text, .88) + .04)) 0%,
        rgba(11, 13, 12, calc(var(--scrim-text, .88) * .88)) 62%,
        rgba(11, 13, 12, calc(var(--scrim-text, .88) * .45)) 88%,
        rgba(11, 13, 12, calc(var(--scrim-strength, .2) * .9)) 100%);
  }
}

.hero > .wrap { position: relative; z-index: 2; width: 100%; }
/* Kept narrow so the copy stays inside the scrim's strong edge and the subject of
   the photograph is never covered. */
.hero__inner { max-width: 620px; }
.hero h1 { margin-bottom: .35em; }
.hero__lead {
  font-size: var(--step-1);
  color: #D6DCD9;
  max-width: 36ch;
  margin-bottom: 0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.5rem, 3.5vw, 2.25rem); }

/* Thin green rule used under hero headings */
.rule { width: 56px; height: 4px; background: var(--green); border: 0; border-radius: 2px; margin: 0 0 1.5rem; }

/* --------------------------------------------------------------------------
   6. Buttons
   --------------------------------------------------------------------------
   Green fill always carries --ink text (7.8:1). Green fill + white would be
   2.5:1, so it is never used.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: var(--step--1); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}
html[lang="ja"] .btn { text-transform: none; letter-spacing: .03em; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: #02d97b; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .38); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); border-color: var(--white); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--grey-300); }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); background: var(--grey-50); }

/* --------------------------------------------------------------------------
   7. Home
   -------------------------------------------------------------------------- */
/* The 1px gaps show the container through as dividers, so it has to sit a step
   darker than the tiles themselves. */
.stats {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--grey-300);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-lg); overflow: hidden;
}
.stat { background: var(--grey-250); padding: clamp(1.25rem, 3vw, 2rem); }
.stat__num {
  display: block; font-size: var(--step-3); font-weight: 700;
  letter-spacing: -.03em; line-height: 1; margin-bottom: .4rem;
}
/* --grey-500 only reaches 4.35:1 against the tile, so the label sits a shade darker. */
.stat__label { color: var(--grey-700); font-size: var(--step--1); line-height: 1.5; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid--gap-lg { gap: clamp(1.5rem, 3.5vw, 2.5rem); }

/* Text-only feature block, ruled in green above the heading. */
.feature { padding-top: 1.1rem; border-top: 3px solid var(--green); }
.feature h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.feature p { color: var(--grey-500); font-size: var(--step--1); margin: 0; }

/* Feature card - also the catalogue's vehicle card */
.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--grey-200); border-radius: var(--radius-lg);
  overflow: hidden; text-align: left;
  font: inherit; color: inherit; text-decoration: none;
  padding: 0; cursor: pointer;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
              transform .18s var(--ease);
}
.card:hover { border-color: var(--grey-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card:hover .card__img img { transform: scale(1.04); }

.card__img { position: relative; aspect-ratio: 4 / 3; background: var(--grey-100); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }

.card__make {
  position: absolute; top: .6rem; left: .6rem;
  background: rgba(11, 13, 12, .84); color: var(--white);
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .26rem .55rem; border-radius: 3px;
}

.card__body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: var(--step-1); margin: 0 0 .15rem; }
.card__meta { color: var(--grey-500); font-size: var(--step--1); margin: 0 0 .85rem; }
.card__meta b { color: var(--grey-700); font-weight: 600; }

/* Part chips */
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; list-style: none; padding: 0; }
.pill {
  font-size: .72rem; line-height: 1.5;
  padding: .2rem .55rem; border-radius: 999px;
  background: var(--grey-100); color: var(--grey-700);
  border: 1px solid var(--grey-200);
}
.pill--more { background: transparent; color: var(--grey-500); }

/* Brand strip */
.brands { display: flex; flex-wrap: wrap; gap: .6rem 2.5rem; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; }
/* These are set large and bold, so 3:1 is the bar. --grey-300 managed only 1.8:1
   on white; --grey-500 reaches 6.1:1 and still reads as secondary to the green. */
.brands li {
  font-size: var(--step-1); font-weight: 700; letter-spacing: .05em;
  color: var(--grey-500); text-transform: uppercase;
}
.brands li.is-primary { color: var(--green-text); }

/* Dark call-to-action band */
.band { background: var(--ink); color: var(--white); }
.band h2 { color: var(--white); }
.band p { color: var(--grey-400); }
.band__inner { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 800px) { .band__inner { grid-template-columns: 1.4fr auto; } }

/* --------------------------------------------------------------------------
   8. Catalogue
   -------------------------------------------------------------------------- */
.filters {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grey-200);
  padding-block: .85rem;
}
.filters__row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }

.search {
  position: relative; flex: 1 1 230px; min-width: 0;
}
.search input {
  width: 100%; font: inherit; font-size: var(--step--1);
  padding: .6rem .8rem .6rem 2.2rem;
  border: 1px solid var(--grey-300); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
}
.search input::placeholder { color: var(--grey-500); }
.search input:focus { border-color: var(--green-text); }
.search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--grey-500); pointer-events: none; }

/* 18 part types would push the sticky bar three rows deep as chips, so the part
   filter is a select and only the 8 makes are chips. */
.select { position: relative; flex: 0 1 230px; min-width: 170px; }
.select select {
  width: 100%; font: inherit; font-size: var(--step--1);
  padding: .6rem 2.1rem .6rem .8rem;
  border: 1px solid var(--grey-300); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  appearance: none; cursor: pointer;
}
.select select:focus { border-color: var(--green-text); }
.select::after {
  content: ""; position: absolute; right: .9rem; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid var(--grey-500); border-bottom: 2px solid var(--grey-500);
  transform: translateY(-75%) rotate(45deg); pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chip {
  appearance: none; cursor: pointer; font: inherit;
  font-size: var(--step--1); font-weight: 500;
  padding: .45rem .85rem;
  background: var(--white); color: var(--grey-700);
  border: 1px solid var(--grey-300); border-radius: 999px;
  white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: var(--grey-500); color: var(--ink); }
/* Active chip is a green FILL with ink text - never green text on white. */
.chip[aria-pressed="true"] {
  background: var(--green); border-color: var(--green); color: var(--ink); font-weight: 600;
}
.chip__n { opacity: .6; margin-left: .3rem; font-size: .9em; }

.filters__meta { display: flex; align-items: center; gap: .75rem; margin-left: auto; font-size: var(--step--1); color: var(--grey-500); }

.link-btn {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: var(--step--1); font-weight: 600;
  color: var(--green-text); text-decoration: underline;
  text-underline-offset: .18em; padding: .2rem;
}
.link-btn:hover { color: var(--green-deep); }

.count { font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: clamp(3rem, 8vw, 5rem) 0; color: var(--grey-500); }
.empty h3 { color: var(--ink); }

/* Expanded vehicle detail */
.detail {
  grid-column: 1 / -1;
  border: 1px solid var(--grey-300); border-left: 4px solid var(--green);
  border-radius: var(--radius-lg);
  background: var(--grey-50);
  padding: clamp(1.25rem, 3vw, 2rem);
  scroll-margin-top: calc(var(--header-h) + 5.5rem);
}
.detail__head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.detail__head h3 { font-size: var(--step-2); margin: 0 0 .2rem; }
.detail__close {
  margin-left: auto; appearance: none; cursor: pointer;
  background: var(--white); border: 1px solid var(--grey-300); border-radius: var(--radius);
  font: inherit; font-size: var(--step--1); font-weight: 600;
  padding: .45rem .9rem; color: var(--grey-700);
}
.detail__close:hover { border-color: var(--ink); color: var(--ink); }

.detail__cols { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
@media (min-width: 820px) { .detail__cols { grid-template-columns: 260px 1fr; } }

.partlist { list-style: none; margin: 0; padding: 0; }
.partlist li {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .55rem 0; border-bottom: 1px solid var(--grey-200);
  font-size: var(--step--1);
}
.partlist li::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); transform: translateY(-2px);
}

.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.gallery button {
  appearance: none; padding: 0; cursor: pointer; overflow: hidden;
  background: var(--grey-100);
  border: 1px solid var(--grey-200); border-radius: var(--radius);
  aspect-ratio: 4 / 3;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gallery button:hover { border-color: var(--green-text); }
.gallery button:hover img { transform: scale(1.05); }

.note {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--green-tint);
  border: 1px solid #BFE9D4;
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  font-size: var(--step--1); color: var(--grey-700);
}
.note svg { flex: none; width: 20px; height: 20px; color: var(--green-deep); margin-top: .1rem; }

/* --------------------------------------------------------------------------
   9. Lightbox
   -------------------------------------------------------------------------- */
/* A <dialog> defaults to width/height:fit-content with a border and margin:auto,
   which boxes it in the middle of the screen. Overridden to fill the viewport. */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: none; align-items: center; justify-content: center;
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; border: 0; overflow: hidden;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(11, 13, 12, .95);
  color: var(--white);
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(11, 13, 12, .95); }

.lightbox__fig { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: .75rem; }
.lightbox__img { max-height: calc(100vh - 11rem); width: auto; margin-inline: auto; object-fit: contain; border-radius: var(--radius); }
.lightbox__cap { color: var(--grey-400); font-size: var(--step--1); text-align: center; }
.lightbox__cap b { color: var(--white); font-weight: 600; }

.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: var(--white);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  cursor: pointer; font-size: 1.4rem; line-height: 1;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox__btn--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__btn--next { right: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__close { top: clamp(.5rem, 2vw, 1.5rem); right: clamp(.5rem, 2vw, 1.5rem); transform: none; position: absolute; }

/* --------------------------------------------------------------------------
   10. About / timeline
   -------------------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--green-text); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: .6rem; bottom: .6rem;
  width: 2px; background: var(--grey-200);
}
.timeline li { position: relative; padding: 0 0 2rem 2.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .5rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--green);
}
.timeline__year {
  display: block; font-weight: 700; font-size: var(--step--1);
  letter-spacing: .1em; color: var(--grey-500); margin-bottom: .25rem;
}
.timeline h3 { font-size: var(--step-0); margin-bottom: .3rem; }
.timeline p { color: var(--grey-700); font-size: var(--step--1); margin: 0; }

/* Pull-quote for the company's own words */
.quote {
  margin: 0; padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--ink); color: var(--white);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--green);
}
.quote p { font-size: var(--step-1); margin-bottom: .75rem; }
.quote footer { color: var(--grey-400); font-size: var(--step--1); }
.quote cite { color: var(--green); font-style: normal; font-weight: 600; }

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--grey-200); }
.faq details { border-bottom: 1px solid var(--grey-200); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-size: var(--step-1); font-weight: 600; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 1.55rem;
  width: 11px; height: 11px;
  border-right: 2px solid var(--green-text); border-bottom: 2px solid var(--green-text);
  transform: rotate(45deg); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.8rem; }
.faq summary:hover { color: var(--green-deep); }
.faq__body { padding: 0 0 1.5rem; color: var(--grey-700); max-width: 68ch; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 380px; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--grey-200); }
thead th { background: var(--grey-100); font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: var(--grey-50); }

/* --------------------------------------------------------------------------
   12. Location
   -------------------------------------------------------------------------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1.15fr; align-items: start; } }

.map {
  border: 1px solid var(--grey-300); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--grey-100);
  aspect-ratio: 4 / 3;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact { list-style: none; margin: 0; padding: 0; }
.contact li { display: grid; gap: .1rem .9rem; padding: .95rem 0; border-bottom: 1px solid var(--grey-200); }
@media (min-width: 520px) { .contact li { grid-template-columns: 110px 1fr; align-items: baseline; } }
.contact dt, .contact__label {
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--grey-500);
}
html[lang="ja"] .contact__label { text-transform: none; letter-spacing: .02em; }
.contact__value { font-size: var(--step-0); }
.contact__value a { font-weight: 600; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--grey-400); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.footer a { color: var(--grey-400); text-decoration: none; }
.footer a:hover { color: var(--green); }

.footer__grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1.3fr; } }

.footer__logo img { width: 132px; margin-bottom: 1rem; }
.footer h4 {
  color: var(--white); font-size: var(--step--1);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem;
}
html[lang="ja"] .footer h4 { text-transform: none; letter-spacing: .04em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .5rem; font-size: var(--step--1); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin-top: clamp(2rem, 5vw, 3rem); padding-top: 1.5rem;
  border-top: 1px solid var(--ink-line);
  font-size: var(--step--1);
}
.footer__bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   14. Motion + print
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .footer, .filters, .hero__media, .lightbox, .btn { display: none !important; }
  .hero { background: none; color: #000; padding: 0 0 1rem; }
  .hero::after { display: none; }
  body { color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
