/* =========================================================
   PETER PLESS — dark, modern, amber accents
   Reference aesthetic: charcoal-navy background, off-white
   type, thin hairlines, amber accent for active states
   and directional cues.
   ========================================================= */

:root {
  /* --- Dark palette --- */
  --bg:            #1c222d;  /* page background */
  --bg-soft:       #222836;  /* header/footer bands, subtle panels */
  --bg-raised:     #272e3c;  /* cards, hover states */
  --rule:          #323a4a;  /* thin dividers */
  --rule-soft:     #2b3240;

  /* --- Ink (text) on dark --- */
  --ink:           #e8e6e0;  /* body copy on dark */
  --ink-soft:      #b9b5ac;  /* secondary text */
  --ink-muted:     #8a857b;  /* labels, eyebrows */
  --ink-faint:     #5c5a54;  /* very quiet */

  /* --- Amber / gold accent --- */
  --accent:        #f0b341;  /* primary accent — arrows, active states */
  --accent-soft:   #ffc56b;
  --accent-deep:   #c48b2a;

  /* --- Compatibility (keeps legacy selectors working) --- */
  --paper:         var(--bg);
  --paper-soft:    var(--bg-soft);
  --paper-warm:    var(--bg-raised);

  --serif:         'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --pad:           clamp(1rem, 3vw, 2rem);
  --pad-lg:        clamp(1.5rem, 5vw, 3.5rem);

  --max-content:   1160px;
  --max-text:      72ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
button { font: inherit; color: inherit; cursor: pointer; }

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.125rem, 1.8vw, 1.375rem); }

p { margin: 0 0 1em; }

/* --- Eyebrow labels: "— Blog" style --- */
.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  position: relative;
  display: inline-block;
  padding-left: 1.6em;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1em; height: 1px;
  background: var(--ink-muted);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.4vw, 1.25rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: var(--max-text);
  line-height: 1.5;
}

.container { max-width: var(--max-content); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--pad-lg) 0; }

/* =========================================================
   Site header / nav
   ========================================================= */
.site-header {
  background: rgba(28, 34, 45, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .95rem var(--pad);
  max-width: var(--max-content); margin: 0 auto;
}
.brand {
  font-family: var(--sans);
  font-size: 1.1rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  letter-spacing: .01em; line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .65rem; font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-top: 4px;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.nav a {
  color: var(--ink-soft);
  font-size: .85rem; font-weight: 500;
  letter-spacing: .04em;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover, .nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle { display: none; border: 0; background: transparent; padding: .5rem; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--ink); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--pad);
    flex-direction: column; gap: .75rem;
    display: none;
  }
  .nav.is-open { display: flex; }
}

/* =========================================================
   Page header (title band under the site header)
   ========================================================= */
.page-header {
  padding: var(--pad-lg) 0 var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
}
.page-header h1 { margin-bottom: .4rem; }

/* Breadcrumb back-link above the H1 on vehicle pages */
.breadcrumb-back {
  display: inline-block;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  margin: 0 0 .75rem;
  padding: 0;
  transition: color .15s ease, transform .15s ease;
}
.breadcrumb-back:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

/* =========================================================
   Prose (content body on legacy & rebuilt pages)
   ========================================================= */
.prose {
  max-width: var(--max-text);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}
.prose.page-body { max-width: var(--max-content); }
.prose p { margin: 0 0 1em; max-width: var(--max-text); }

.prose h2, .prose h3, .prose h4 { margin-top: 2rem; }
.prose h2 + p, .prose h3 + p, .prose h4 + p { margin-top: 0; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(240, 179, 65, .4);
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.prose a:hover {
  color: var(--accent-soft);
  text-decoration-color: var(--accent-soft);
}
.prose strong { font-weight: 600; color: var(--ink); }

.prose img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.25);
  cursor: zoom-in;
}

.prose p:has(> img + img) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .75rem;
}
.prose p:has(> img + img) img {
  margin: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  height: 100%;
}

/* Tables inside prose */
.prose table {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--max-content);
  margin: 1.5rem 0;
  font-size: .95rem;
}
.prose table td, .prose table th {
  padding: .7rem .95rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  color: var(--ink-soft);
}
.prose table th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 600;
}
.prose table td img {
  margin: 0;
  max-width: 100%;
  box-shadow: none;
}

.prose blockquote {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.75rem 0;
  position: relative;
}
.prose blockquote::before {
  content: "\201C";
  position: absolute;
  left: -.5rem; top: -1rem;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  font-family: var(--serif);
}

.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: .25rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: var(--pad-lg);
  padding: var(--pad-lg) 0 var(--pad);
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--ink-muted);
  font-size: .9rem;
}
.footer-inner {
  max-width: var(--max-content); margin: 0 auto; padding: 0 var(--pad);
  display: grid; gap: 2rem;
}
.footer-inner a { color: var(--ink-soft); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }
.footer-meta {
  max-width: var(--max-content); margin: 1.5rem auto 0;
  padding: 1.25rem var(--pad) 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: .8rem;
  color: var(--ink-faint);
  letter-spacing: .03em;
}

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 12, 16, .96);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  box-shadow: 0 10px 60px rgba(0,0,0,.7);
  cursor: auto;
}
.lightbox-btn {
  position: absolute;
  background: transparent; border: 0; color: #fff;
  opacity: .65; transition: opacity .15s ease, color .15s ease;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-btn:hover { opacity: 1; color: var(--accent); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-btn svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .55);
  font-size: .75rem;
  font-family: var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* =========================================================
   Hero photo (used on vehicle & travel pages)
   ========================================================= */
.hero-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 80vh;
  overflow: hidden;
  background: #000;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.02);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,34,45,0) 55%, rgba(28,34,45,.4) 100%);
  pointer-events: none;
}
@media (max-width: 700px) {
  .hero-photo { aspect-ratio: 4 / 3; max-height: 65vh; }
}

/* =========================================================
   Photo grid (re-used across vehicle / travel / 308GTB pages)
   ========================================================= */
.photo-grid, .gallery-308 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}
.photo-grid a, .gallery-308 a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-raised);
  border-radius: 2px;
  position: relative;
}
.photo-grid img, .gallery-308 img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s ease;
  cursor: zoom-in;
  filter: saturate(.96);
}
.photo-grid a:hover img, .gallery-308 a:hover img {
  transform: scale(1.045);
  filter: saturate(1.08);
}

/* Single large photo (fallback for single-image pages) */
.single-photo {
  max-width: 100%;
  margin: 2rem 0;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* =========================================================
   Vehicle / city cards (cars.html, holiday/index.html)
   ========================================================= */
.vehicle-grid, .city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem 1.5rem;
  margin: 1.5rem 0;
}

.vehicle-card, .city-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: transform .25s ease;
}
.vehicle-card:hover, .city-card:hover {
  transform: translateY(-3px);
  color: var(--ink);
}
.vehicle-card:hover .vehicle-name,
.city-card:hover .city-name { color: var(--accent); }
.vehicle-card:hover .vehicle-media img,
.city-card:hover .city-media img { transform: scale(1.04); }

.vehicle-media, .city-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-raised);
  margin-bottom: .85rem;
  border-radius: 2px;
}
.vehicle-media img, .city-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.vehicle-media .no-photo, .city-media .no-photo {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-soft));
}

.vehicle-name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: .005em;
  transition: color .15s ease;
}
.city-name {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 .15rem;
  color: var(--ink);
  transition: color .15s ease;
}
.city-count {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Arrow glyph on card hover (right-facing amber arrow, like the reference) */
.vehicle-card::after, .city-card::after {
  content: "\2192";
  position: absolute;
  top: .65rem; right: .75rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  background: var(--accent);
  border-radius: 50%;
  font-size: 1rem;
  opacity: 0;
  transform: translate(-.25rem, .25rem);
  transition: opacity .2s ease, transform .2s ease;
  font-family: var(--sans);
  font-weight: 700;
}
.vehicle-card:hover::after, .city-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

/* =========================================================
   Make / model headings on cars.html and everything.htm
   ========================================================= */
.make-heading {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
  letter-spacing: -.01em;
  color: var(--ink);
}
.section-divider {
  margin: 4rem 0 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.section-divider h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink);
  margin: 0 0 1rem;
}

/* =========================================================
   Home-page centered utility (index.htm, index2.html)
   ========================================================= */
.home-centered { text-align: center; max-width: 100%; }
.home-centered p { max-width: 100%; margin-left: auto; margin-right: auto; }
.home-centered img {
  display: block;
  margin: 1.5rem auto;
  max-width: min(560px, 90%);
  height: auto;
  border-radius: 2px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.home-centered a {
  color: var(--ink);
  text-decoration: none;
}
.home-centered a:hover { color: var(--accent); }
.home-centered .tag-line {
  margin-top: 0; margin-bottom: 2.5rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
}
.home-centered .last-reset {
  font-size: .75rem;
  color: var(--ink-muted);
  margin-top: 3rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.page-header .container.home-centered,
.page-header:has(~ section .home-centered) .container { text-align: center; }

/* =========================================================
   Utilities
   ========================================================= */
.mt-0 { margin-top: 0; }
.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;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Focus-visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
