/* ============================================================
   csk2026.css — Range Rover CSK Mk2 stylesheet 
   ============================================================ */

/* ------------------------------------------------------------
   GOOGLE FONTS
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ------------------------------------------------------------
   TOKENS
   ------------------------------------------------------------ */
:root {
  /* Colour */
  --trim:        #E3BFAC;   /* beige leather — nav links, hover, auth */
  --chrome:      #E8E8E8;   /* near-white — primary nav, headings on dark */
  --border:      #484848;   /* mid grey — dividers, input borders */
  --page-dark:   #1C1C1C;   /* page / nav background */
  --page-mid:    #242424;   /* slightly lifted sections */
  --page-light:  #2c2c2c;   /* cards, registry teaser */
  --dim:         #888;      /* de-emphasised text */

  /* Typography */
  --csk-serif-font:  'Libre Baskerville', Georgia, serif;
  --csk-sans-font:   'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(3rem, 6vw, 5rem);
  --content-max: 1100px;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--page-dark);
  color: var(--chrome);
  font-family: var(--csk-sans-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------
   NAV
   ------------------------------------------------------------ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--page-dark);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-logo img.rr-nav   { height: 18px; opacity: 0.85; }
.nav-logo img.csk-nav  { height: 22px; opacity: 0.85; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav-links a {
  font-family: var(--csk-sans-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--chrome);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--trim);
  border-bottom-color: var(--trim);
}

.nav-links .auth-link {
  color: var(--trim);
  opacity: 0.8;
}

.nav-links .auth-link:hover { opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--chrome);
  transition: 0.2s;
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--page-dark);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
}

/* ------------------------------------------------------------
   WALNUT RULE
   ------------------------------------------------------------ */
/* ------------------------------------------------------------
   WALNUT DIVIDER — self-contained section separator
   ------------------------------------------------------------ */
.walnut-divider {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  height: 10px;
  overflow: hidden;
  line-height: 0;
}

.walnut-divider svg {
  display: block;
  width: 100%;
  height: 10px;
}


/* ------------------------------------------------------------
   CTA BUTTON — PERFORATED LEATHER
   ------------------------------------------------------------ */
.cta-btn {
  font-family: var(--csk-sans-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  //color: #1a1208;
  color: white;
  min-width: 220px;
  height: 64px;
  padding: 0 2rem;
  border-radius: 4px;
  border: none;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.2s, transform 0.15s;
}

.cta-btn:hover  { filter: brightness(1.07); transform: translateY(-1px); }
.cta-btn:active { filter: brightness(0.95); transform: translateY(0); }

.cta-btn canvas.lc {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
}

.cta-btn span {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.cta-btn::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.13),
    inset 0 -2px 4px rgba(0,0,0,0.22),
    inset 2px 0 4px rgba(0,0,0,0.10),
    inset -2px 0 4px rgba(0,0,0,0.10);
  pointer-events: none;
  z-index: 3;
}

/* Serif variant — now matches base sans-serif for consistency */
.cta-btn.serif span {
  font-family: var(--csk-sans-font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Strip */
.cta-strip {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vw, 4rem);
  background: var(--page-dark);
  text-align: center;
}

.hero-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-identity .rr-text  { height: clamp(28px, 4vw, 42px); opacity: 0.92; }
.hero-identity .csk-sig  { height: clamp(48px, 7vw, 80px); opacity: 0.95; }

.forum-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0 0.75rem;
}

.forum-identity .rr-text { height: clamp(14px, 2vw, 21px); opacity: 0.92; }
.forum-identity .csk-sig { height: clamp(24px, 3.5vw, 40px); opacity: 0.95; }

.hero .walnut-divider { margin: 0.25rem 0 0; width: clamp(280px, 60vw, 600px); }

.hero-image-wrap {
  position: relative;
  margin: 2rem 0 0.75rem;
  max-width: 820px;
  width: 100%;
}

/* Corner brackets */
.corner {
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--trim);
  border-style: solid;
  opacity: 0.6;
  z-index: 2;
}
.corner-tl { top: -4px;    left: -4px;    border-width: 1px 0 0 1px; }
.corner-tr { top: -4px;    right: -4px;   border-width: 1px 1px 0 0; }
.corner-bl { bottom: -4px; left: -4px;    border-width: 0 0 1px 1px; }
.corner-br { bottom: -4px; right: -4px;   border-width: 0 1px 1px 0; }

.hero-image-wrap img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.hero-caption {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* ------------------------------------------------------------
   STATS BAND
   ------------------------------------------------------------ */
.stats-wrap {
  max-width: 1280px;
  margin: 0 auto;
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--page-mid);
}

.stat {
  padding: 2rem clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 130px;
}
.stat:last-child { border-right: none; }

.stat-number {
  font-family: var(--csk-serif-font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--trim);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ------------------------------------------------------------
   CONTENT SECTIONS
   ------------------------------------------------------------ */
.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-pad) clamp(1rem, 4vw, 2rem);
}

.section-wrap {
  background: var(--page-mid);
}

.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--trim);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--csk-serif-font);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--chrome);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.section-title em {
  font-style: italic;
  color: var(--trim);
}

.section-body {
  font-size: 15px;
  color: #b8b8b8;
  max-width: 520px;
  line-height: 1.75;
}

.section-body p + p { margin-top: 1rem; }

.section-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--trim);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.section-link:hover { border-bottom-color: var(--trim); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.two-col img {
  border-radius: 2px;
  width: 100%;
}

@media (max-width: 680px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Divider between sections */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ------------------------------------------------------------
   REGISTRY TEASER
   ------------------------------------------------------------ */
.registry-teaser,
.relaunch-wrap {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  background: var(--page-light);
  padding: var(--section-pad) clamp(1rem, 4vw, 2rem);
  text-align: center;
}

.registry-teaser .section-body { margin: 0 auto; text-align: center; }

.registry-grid-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  max-width: 820px;
  margin: 2rem auto 1.25rem;
}

.reg-dot {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-family: var(--csk-sans-font);
  cursor: default;
  transition: filter 0.15s;
}
.reg-dot:hover { filter: brightness(1.3); }

.reg-dot.known   { background: #1e1e1e; border-color: var(--trim); color: var(--trim); }
.reg-dot.unknown { background: transparent; border-color: #282828; color: #444; }

.legend-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0.75rem 0 2rem;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.legend-item { display: flex; align-items: center; gap: 0.5rem; }

.legend-swatch {
  width: 14px; height: 14px;
  border-radius: 2px;
  border: 1px solid;
}

.relaunch {
  margin-top: 3rem;
  padding-top: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Relaunch walnut rule spacing */
.relaunch .walnut-divider,
.registry-teaser > .walnut-divider {
  margin: 2.5rem auto;
  max-width: 100%;
  width: 100%;
}

.relaunch .section-eyebrow { text-align: center; }
.relaunch p { color: #b8b8b8; font-size: 14px; margin-bottom: 0.75rem; }
.relaunch .cta-btn { margin-top: 1rem; }

.registry-bar-wrap {
  max-width: 640px;
  margin: 2rem auto 2rem;
}

.registry-bar-track {
  position: relative;
  width: 100%;
  height: 20px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.registry-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--trim);
  opacity: 0.5;
  border-radius: 2px 0 0 2px;
}

.registry-bar-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--trim);
  opacity: 0.9;
}

.registry-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.registry-bar-known strong {
  color: var(--trim);
  font-weight: 600;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
footer {
  background: var(--page-dark);
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1rem, 4vw, 2rem);
  text-align: center;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.footer-logos img.rr  { height: 16px; opacity: 0.55; }
.footer-logos img.csk { height: 20px; opacity: 0.55; }

footer p {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--trim); }

/* ------------------------------------------------------------
   MODAL SYSTEM
   ------------------------------------------------------------ */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}

.modal-mask.active { display: flex; }

.modal {
  background: var(--page-mid);
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header .walnut-divider {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
}

.modal-title {
  font-family: var(--csk-serif-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--chrome);
}

.modal-close {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0 0 1rem;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--trim); }

.modal-body {
  padding: 1.5rem;
  font-size: 14px;
  color: #b8b8b8;
  line-height: 1.75;
}

/* ------------------------------------------------------------
   WALNUT PICTURE FRAME — four-sided
   ------------------------------------------------------------ */
:root { --wf-t: 12px; } /* total frame zone (unchanged) */

.walnut-frame-4 {
  position: relative;
  display: inline-block;
  width: 100%;
  background: #444444; /* gap between frame and image */
  border-radius: 3px;
  overflow: hidden;
}

/* The SVG sits absolutely over the whole element, drawn by JS */
.wf-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

/* Content (the image) sits inside the frame thickness */
.wf-content {
  display: block;
  margin: var(--wf-t);
}

.wf-content img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 1px;
}

/* Relaunch walnut rule spacing */
.relaunch .walnut-divider,
.registry-teaser > .walnut-divider {
  margin: 2.5rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------
   PAGE HEADER (inner pages)
   ------------------------------------------------------------ */
.page-header {
  text-align: center;
}

.page-header-inner {
  padding: 3rem clamp(1rem, 4vw, 2rem) 2.5rem;
}

.page-header-inner .section-body {
  margin: 0 auto;
  text-align: center;
}

/* ------------------------------------------------------------
   CONTACT FORM
   ------------------------------------------------------------ */
.form-section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--page-mid);
}

.form-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chrome);
  margin-bottom: 1.5rem;
}

.field { margin-bottom: 1.4rem; }

label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.5rem;
}

label span.req { color: var(--trim); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: #202020;
  border: 1px solid var(--border);
  color: var(--chrome);
  font-family: var(--csk-sans-font);
  font-size: 14px;
  font-weight: 300;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--trim);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-color: #202020;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option { background: #202020; color: var(--chrome); }

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.toggle-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 120px;
}

.toggle {
  position: relative;
  display: flex;
  background: #202020;
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  border-radius: 2px;
  overflow: hidden;
}

.toggle input { display: none; }

.toggle-opt {
  padding: 0.5rem 1.1rem;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

.toggle-slider {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: var(--trim);
  transition: left 0.2s ease;
  left: 0;
}

.toggle.right .toggle-slider { left: 50%; }
.toggle.right .toggle-opt:last-child  { color: #1a1208; font-weight: 600; }
.toggle.left  .toggle-opt:first-child { color: #1a1208; font-weight: 600; }

/* Vehicle fields reveal */
#vehicleFields {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
#vehicleFields.open { max-height: 1200px; opacity: 1; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.privacy-note, .spam-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  font-style: italic;
  margin-top: 0.4rem;
}

.form-submit {
  padding: 3rem 0 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--page-dark);
}

#formStatus { font-size: 12px; letter-spacing: 0.08em; }
#formStatus.success { color: #8bc48a; }
#formStatus.error   { color: #c48a8a; }

@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
  .toggle-label { min-width: 80px; }
}

/* ------------------------------------------------------------
   REGISTRY — 200csks page
   ------------------------------------------------------------ */
.summary-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--page-mid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.summary-item {
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 100px;
}
.summary-item:last-child { border-right: none; }

.summary-num {
  font-family: var(--csk-serif-font);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--trim);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.summary-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.registry-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: calc(100vh - 56px);
  max-width: 1280px;
  margin: 0 auto;
}

.grid-panel {
  border-right: 1px solid var(--border);
  background: var(--page-mid);
  padding: 1.5rem;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.csk-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.csk-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-family: var(--csk-sans-font);
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid;
  transition: filter 0.15s, transform 0.1s;
  user-select: none;
}

.csk-cell:hover    { filter: brightness(1.4); transform: scale(1.15); z-index: 1; position: relative; }
.csk-cell.known    { background: #1e2e1e; border-color: var(--trim); color: var(--trim); }
.csk-cell.unknown  { background: transparent; border-color: #2a2a2a; color: #3a3a3a; }
.csk-cell.owner    { background: #2e2818; border-color: var(--gold); color: var(--gold); }
.csk-cell.selected { outline: 2px solid var(--chrome); outline-offset: 1px; }

--gold: #c8a84b;

.detail-panel {
  padding: clamp(2rem, 4vw, 3rem);
  background-color: black !important;
}

.detail-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: var(--border);
  background-image: url('../img/csk_1600x1024_bg.webp');
  background-size: cover;
  background-position: center;
}

.detail-prompt p {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--border);
}

.car-detail { display: none; padding: 3vw; background-color: #222222; }
.car-detail.visible { display: block; animation: fadeUp 0.3s ease both; }

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

.detail-csk-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--trim);
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
}

.detail-title {
  font-family: var(--csk-serif-font);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--chrome);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.detail-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding-left: 30px;
}

.detail-left img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.detail-photo {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.detail-nophoto {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3rem 2rem;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-fields {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.6rem 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 1px;
}

.detail-value {
  font-size: 14px;
  color: var(--chrome);
}

.detail-comments {
  font-size: 14px;
  color: #b8b8b8;
  line-height: 1.75;
  border-left: 2px solid var(--trim);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.unknown-cta {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-left: 3px solid var(--trim);
  padding: 1rem 1.25rem;
  font-size: 13px;
  color: #b8b8b8;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.unknown-cta a { color: var(--trim); }
.unknown-cta a:hover { text-decoration: underline; }

.detail-nav {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.detail-nav-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--dim);
  font-family: var(--csk-sans-font);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.detail-nav-btn:hover:not(:disabled) { border-color: var(--trim); color: var(--trim); }
.detail-nav-btn:disabled { opacity: 0.25; cursor: default; }

/* Gold token for owner car */
:root { --gold: #c8a84b; }

@media (max-width: 860px) {
  .registry-layout { grid-template-columns: 1fr; }
  .grid-panel { position: static; height: auto; }
  .detail-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .summary-num   { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
  .summary-item  { padding: 1rem clamp(0.75rem, 2vw, 1.5rem); }
  .detail-comments { border-left: none; padding-left: 0; }
}

/* ------------------------------------------------------------
   UTILITY
   ------------------------------------------------------------ */
.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;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------
   ABOUT PAGE — article styles
   ------------------------------------------------------------ */
.article-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0 4rem;
  align-items: start;
}

.article-col-right {
  position: sticky;
  top: 2rem;
}

.article-section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.article-section:last-of-type { border-bottom: none; }

.article-section-title {
  font-family: var(--csk-serif-font);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--chrome);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.article-section-title em { font-style: italic; color: var(--trim); }

.article-body {
  font-size: 14px;
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.9;
  color: #b8b8b8;
}
.article-body p { margin-bottom: 1.3em; }
.article-body p:last-child { margin-bottom: 0; }

.article-link { color: var(--trim); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.article-link:hover { border-bottom-color: var(--trim); }

/* Spen King portrait */
.spen-wrap {
  float: left;
  margin: 0.25rem 2rem 1.5rem 0;
  max-width: 160px;
}
.spen-wrap img {
  width: 100%;
  border: 1px solid var(--border);
  filter: brightness(0.85) contrast(1.1) saturate(0.8);
  display: block;
}
.spen-wrap figcaption {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.5rem;
  text-align: center;
}
.clearfix::after { content:''; display:table; clear:both; }

/* Spec groups */
.spec-group { margin-bottom: 2.5rem; }

.spec-group-title {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--chrome);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.spec-note {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  font-size: 14px;
  color: #b8b8b8;
  padding: 0.55rem 0;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  line-height: 1.5;
}
.spec-list li::before {
  content: '—';
  color: var(--dim);
  flex-shrink: 0;
  font-size: 11px;
}

/* Engine detail grid */
.engine-detail {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.engine-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
}
.engine-value {
  font-size: 14px;
  color: #b8b8b8;
  padding: 0.7rem 0;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
}

/* Performance tables */
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 0.5rem;
}
.perf-table th {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.perf-table td {
  color: #b8b8b8;
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid #222;
  vertical-align: top;
}
.perf-table tr:last-child td { border-bottom: none; }
.table-label { color: var(--dim); font-size: 12px; }

/* Price highlight */
.price-row {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.price-item { text-align: center; }
.price-amount {
  font-family: var(--csk-serif-font);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--trim);
  line-height: 1;
}
.price-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.4rem;
}

/* Pull quote */
.pull-quote {
  border-left: 2px solid var(--trim);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--csk-serif-font);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-style: italic;
  font-weight: 400;
  color: var(--chrome);
  line-height: 1.65;
}

/* VIN code */
.vin-code {
  font-family: monospace;
  font-size: 14px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  color: var(--chrome);
  display: inline-block;
  margin: 0.75rem 0;
  letter-spacing: 0.1em;
  border-radius: 2px;
}

/* Acknowledgements */
.ack-list { list-style: none; padding: 0; }
.ack-list li {
  font-size: 13px;
  line-height: 1.8;
  color: var(--dim);
  padding: 0.3rem 0;
  border-bottom: 1px solid #1e1e1e;
}
.ack-list li:last-child { border-bottom: none; }

.attribution {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-style: italic;
  color: var(--dim);
  line-height: 1.8;
}

@media (max-width: 1024px) {
  .article-wrap { grid-template-columns: 1fr; gap: 0; }
  .article-col-right { position: static; }
}

@media (max-width: 600px) {
  .spen-wrap { float: none; margin: 0 0 1.5rem 0; max-width: 130px; }
  .engine-detail { grid-template-columns: 1fr; }
  .engine-label { border-bottom: none; padding-bottom: 0; }
  .price-row { gap: 1.5rem; }
}

/* ------------------------------------------------------------
   GALLERY PAGE
   ------------------------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  background: var(--page-mid);
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  background: var(--page-mid);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
  filter: brightness(0.9);
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-caption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chrome);
}

/* Lightbox */
.lightbox-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(4px);
}
.lightbox-mask.active { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.lightbox-close:hover { color: var(--trim); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  color: var(--dim);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-nav:hover { border-color: var(--trim); color: var(--trim); }
.lightbox-prev { left: -3.5rem; }
.lightbox-next { right: -3.5rem; }

@media (max-width: 700px) {
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
}
