/* ===========================================================
   DESIGN TOKENS
   Direction: editorial dark-luxury — auction-catalogue register
   (Bring a Trailer / RM Sotheby's), not warm-paper default.
   =========================================================== */
:root {
  --ink:        #0B0D0F;   /* near-black, warm undertone */
  --ink-raised: #14171A;
  --ink-line:   #262B2F;
  --paper:      #F5F3EF;   /* warm off-white, used as text-on-dark and light sections */
  --paper-dim:  #B7B2A8;
  --brass:      #9A8266;   /* muted brass/bronze — the one accent spent generously */
  --brass-soft: #C4B49A;
  --pine:       #3E4A45;   /* deep pine green — secondary, used sparingly */
  --pine-soft:  #6E7E76;
  --flag:       #943522;   /* single honesty/alert accent — used ONLY for the paint-defect signal; darkened for AA contrast on light tag bg */
  --flag-bg:    rgba(148,53,34,0.12);
  --good-bg:    rgba(110,126,118,0.16);
  --good-text:  #A9B8AE;

  --serif:  'Fraunces', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:   'JetBrains Mono', 'SF Mono', monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass); color: var(--ink); padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

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

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

/* ===========================================================
   TOPBAR
   =========================================================== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11,13,15,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-line);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--paper-dim); }
.mark-glyph { color: var(--brass); font-size: 14px; }
.mark-text { text-transform: uppercase; }

.lang-select { position: relative; }
.lang-current {
  background: transparent; border: 1px solid var(--ink-line); color: var(--paper);
  border-radius: 2px; padding: 8px 12px 8px 9px;
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--sans); font-size: 13px;
  transition: border-color 0.18s var(--ease);
}
.lang-current:hover { border-color: var(--brass-soft); }
.chev { color: var(--paper-dim); transition: transform 0.2s var(--ease); }
.lang-select.is-open .chev { transform: rotate(180deg); }

.flag { width: 18px; height: 13px; border-radius: 1px; flex: none; display: inline-block; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(245,243,239,0.18); }
.flag[data-flag="de"], #langFlag.flag-de { background-image: linear-gradient(to bottom, #000 0% 33%, #D00 33% 66%, #FFCE00 66% 100%); }
.flag[data-flag="en"], #langFlag.flag-en {
  background-color: #012169;
  background-image:
    linear-gradient(135deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%),
    linear-gradient(45deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%),
    linear-gradient(to right, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
    linear-gradient(to bottom, transparent 35%, #fff 35%, #fff 65%, transparent 65%),
    linear-gradient(to right, transparent 46%, #C8102E 46%, #C8102E 54%, transparent 54%),
    linear-gradient(to bottom, transparent 42%, #C8102E 42%, #C8102E 58%, transparent 58%);
}
.flag[data-flag="pt"], #langFlag.flag-pt {
  background-image: linear-gradient(to right, #006233 0% 40%, #CC0000 40% 100%);
}

.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--ink-raised); border: 1px solid var(--ink-line);
  border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  list-style: none; margin: 0; padding: 6px; min-width: 170px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}
.lang-select.is-open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 3px; cursor: pointer;
  font-size: 13.5px; color: var(--paper);
}
.lang-option:hover, .lang-option:focus { background: rgba(154,130,102,0.14); }
.lang-option.is-active { color: var(--brass-soft); font-weight: 500; }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  padding: 120px 28px 84px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink-line);
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(circle at 18% 22%, rgba(154,130,102,0.10), transparent 45%),
                     radial-gradient(circle at 82% 78%, rgba(62,74,69,0.18), transparent 50%);
}
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }

.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brass-soft);
  margin: 0 0 28px;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.05s forwards;
}

.hero-title { margin: 0 0 22px; font-family: var(--serif); line-height: 0.96; }
.hero-title-make {
  display: block; font-weight: 400; font-size: clamp(22px, 3vw, 30px);
  color: var(--paper-dim); letter-spacing: 0.01em;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.15s forwards;
}
.hero-title-model {
  display: block; font-weight: 600; font-size: clamp(72px, 13vw, 168px);
  color: var(--paper); letter-spacing: -0.02em;
  opacity: 0; animation: fadeUp 0.8s var(--ease) 0.25s forwards;
}

.hero-tagline {
  max-width: 540px; font-size: 17px; color: var(--paper-dim);
  margin: 0 0 56px; line-height: 1.65;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.4s forwards;
}

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--ink-line);
  margin-bottom: 44px;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}
.hero-stat {
  flex: 1 1 140px; padding: 22px 24px 0 0;
  border-right: 1px solid var(--ink-line);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-value { font-family: var(--mono); font-size: 26px; font-weight: 500; color: var(--paper); }
.hero-stat-label { font-size: 12px; color: var(--paper-dim); letter-spacing: 0.03em; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  color: var(--ink); background: var(--brass-soft);
  padding: 14px 26px; border-radius: 2px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.6s forwards;
}
.hero-cta:hover { background: var(--brass); transform: translateY(-1px); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero { padding: 96px 20px 64px; }
  .hero-stat { flex: 1 1 42%; padding-right: 16px; }
  .hero-stat:nth-child(2n) { border-right: none; }
}

/* ===========================================================
   SUMMARY
   =========================================================== */
.summary { background: var(--paper); color: var(--ink); padding: 72px 28px; }
.summary-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 64px 1fr; gap: 8px 36px; }
.summary-mark { width: 3px; background: var(--brass); border-radius: 2px; align-self: stretch; }
.summary-heading { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 18px; color: var(--ink); }
.summary-text { font-size: 16.5px; line-height: 1.7; max-width: 700px; margin: 0 0 26px; color: #2A2722; }

.summary-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; padding: 7px 13px; border-radius: 2px; }
.tag-good { background: rgba(62,74,69,0.1); color: var(--pine); border: 1px solid rgba(62,74,69,0.25); }
.tag-honest { background: var(--flag-bg); color: var(--flag); border: 1px solid rgba(148,53,34,0.32); }

@media (max-width: 640px) {
  .summary-inner { grid-template-columns: 24px 1fr; }
}

/* ===========================================================
   GENERIC SECTION HEADINGS
   =========================================================== */
.section-heading { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.2vw, 38px); margin: 0 0 12px; color: var(--paper); }
.section-sub { color: var(--paper-dim); font-size: 15.5px; max-width: 560px; margin: 0; }

/* ===========================================================
   GALLERY — single-image stage + thumbnail strip
   =========================================================== */
.gallery { padding: 96px 28px 84px; max-width: var(--maxw); margin: 0 auto; }
.gallery-head { margin-bottom: 40px; }

.carousel-stage {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 18px;
}

.carousel-main {
  margin: 0;
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  overflow: hidden;
}
.carousel-main img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #050607;
  display: block;
}
.carousel-main figcaption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14.5px;
  color: var(--paper-dim);
  padding: 16px 20px;
  border-top: 1px solid var(--ink-line);
}
.carousel-main .cap-index { font-family: var(--mono); color: var(--brass-soft); font-size: 12.5px; flex: none; }

.carousel-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--ink-line); background: var(--ink-raised); color: var(--paper);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
  justify-self: center;
}
.carousel-arrow:hover { border-color: var(--brass-soft); color: var(--brass-soft); }
.carousel-arrow:disabled { opacity: 0.3; cursor: default; }
.carousel-arrow:disabled:hover { border-color: var(--ink-line); color: var(--paper); }

.carousel-thumbs {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.carousel-thumb {
  padding: 0; margin: 0; border: 2px solid transparent; background: var(--ink-raised);
  cursor: pointer; overflow: hidden; border-radius: 2px; line-height: 0;
  transition: border-color 0.18s var(--ease), opacity 0.18s var(--ease);
  opacity: 0.55;
}
.carousel-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.carousel-thumb:hover { opacity: 0.85; }
.carousel-thumb.is-active { border-color: var(--brass); opacity: 1; }

@media (max-width: 900px) {
  .carousel-thumbs { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) {
  .gallery { padding: 64px 20px; }
  .carousel-stage { grid-template-columns: 1fr; }
  .carousel-stage .carousel-arrow { display: none; }
  .carousel-thumbs { grid-template-columns: repeat(4, 1fr); }
}

/* ===========================================================
   VIDEO
   =========================================================== */
.video-section { background: var(--paper); color: var(--ink); padding: 96px 28px; }
.video-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 36px; }
.video-text .section-heading { color: var(--ink); }
.video-text .section-sub { color: #5A564C; }

.video-frame {
  border: 1px solid #DAD5C8; background: #000;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.video-frame video { width: 100%; display: block; aspect-ratio: 16/9; }

/* ===========================================================
   PROVENANCE TIMELINE — SIGNATURE ELEMENT
   =========================================================== */
.provenance { padding: 96px 28px; max-width: var(--maxw); margin: 0 auto; }
.provenance > .section-heading, .provenance > .section-sub { } /* spacing handled by margin below */
.provenance .section-sub { margin-bottom: 56px; }

.provenance-line {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--ink-line);
  margin-bottom: 64px;
}
.provenance-entry {
  position: relative;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
}
.provenance-entry:last-child { padding-bottom: 0; }

.provenance-dot {
  position: absolute; left: -32.5px; top: 3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brass); box-shadow: 0 0 0 4px var(--ink);
}
.provenance-dot-future { background: var(--ink); border: 1.5px solid var(--brass); }

.provenance-date { font-family: var(--mono); font-size: 13px; color: var(--brass-soft); padding-top: 1px; }
.provenance-label { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--paper); margin-bottom: 6px; }
.provenance-detail { font-size: 14.5px; color: var(--paper-dim); line-height: 1.6; max-width: 480px; }

@media (max-width: 600px) {
  .provenance-entry { grid-template-columns: 1fr; gap: 6px; }
  .provenance-date { font-size: 12px; }
}

.specs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink-line);
  margin-bottom: 40px;
}
.spec {
  padding: 20px 22px; border-right: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line);
  display: flex; flex-direction: column; gap: 7px;
}
.spec:nth-child(4n) { border-right: none; }
.specs-grid .spec:nth-last-child(-n+4) { border-bottom: none; }
.spec-label { font-size: 11.5px; color: var(--paper-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.spec-value { font-family: var(--mono); font-size: 16px; color: var(--paper); }

@media (max-width: 760px) {
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .spec:nth-child(2n) { border-right: none; }
  .specs-grid .spec:nth-last-child(-n+2) { border-bottom: none; }
}

.honesty-note {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--flag-bg); border: 1px solid rgba(148,53,34,0.3);
  border-radius: 3px; padding: 20px 24px;
}
.honesty-mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--flag); color: var(--paper); font-family: var(--mono); font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.honesty-note p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #E8C9C0; }

/* ===========================================================
   PRICE & CONTACT
   =========================================================== */
.contact { background: var(--ink-raised); padding: 96px 28px; border-top: 1px solid var(--ink-line); }
.contact-inner { max-width: var(--maxw); margin: 0 auto; }

.contact-price { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.contact-price-label { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-dim); width: 100%; margin-bottom: 8px; }
.contact-price-value { font-family: var(--serif); font-size: clamp(48px, 7vw, 84px); font-weight: 600; color: var(--paper); line-height: 1; }
.contact-price-vb { font-family: var(--mono); font-size: 16px; color: var(--brass-soft); }

.contact-details { display: flex; flex-wrap: wrap; gap: 40px; border-top: 1px solid var(--ink-line); padding-top: 32px; margin-bottom: 32px; }
.contact-row { display: flex; flex-direction: column; gap: 6px; }
.contact-row-label { font-size: 12px; color: var(--paper-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-row-value { font-size: 16.5px; color: var(--paper); font-weight: 500; }

.contact-footnote { font-size: 13px; color: var(--paper-dim); border-top: 1px solid var(--ink-line); padding-top: 24px; margin: 0; max-width: 640px; }

/* ===========================================================
   FOOTER
   =========================================================== */
.page-footer { text-align: center; padding: 32px 28px; font-size: 12px; color: var(--paper-dim); background: var(--ink); }
