/* LotFrame Photos — Photo Gallery */
:root {
  --bg: #0f1115;
  --bg-elev: #1a1e26;
  --bg-card: #222833;
  --text: #f4f5f7;
  --muted: #9aa3b2;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --border: rgba(255,255,255,0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fbbf24; }
.container { width: min(100% - 1.75rem, var(--max)); margin-inline: auto; }

.site-header {
  background: rgba(15,17,21,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0; gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text); font-weight: 700; font-size: 1.05rem;
}
.logo:hover { color: var(--text); }
.logo-mark {
  background: var(--accent); color: #111;
  font-size: 0.65rem; font-weight: 800;
  padding: 0.4rem 0.45rem; border-radius: 6px; letter-spacing: 0.04em;
}
.logo span small { display: block; font-weight: 400; font-size: 0.68rem; color: var(--muted); }

.nav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 0.4rem 0.75rem; border-radius: 6px;
  font-size: 0.88rem; font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-card); }

.nav-toggle {
  display: none; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); padding: 0.4rem 0.65rem; border-radius: 6px; cursor: pointer;
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; width: 100%; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg-elev); padding: 0.75rem; border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
}

.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 750; letter-spacing: -0.03em;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--muted); margin-top: 0.65rem; max-width: 40ch; margin-inline: auto; }

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.photo-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.photo-card .caption strong { display: block; font-size: 1rem; }
.photo-card .vin-stamp {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.03em; margin-top: 0.15rem;
}
.photo-card .open-link {
  position: absolute; inset: 0; z-index: 1;
}

/* Gallery page */
.gal-hero {
  padding: 2rem 0 1.25rem;
}
.gal-hero .vin-watermark {
  font-family: ui-monospace, Menlo, monospace;
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
  word-break: break-all;
}
.gal-hero h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 750; }
.gal-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  padding-bottom: 3rem;
}
@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; }
}
.photo-grid .shot {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.photo-grid .shot:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 21/9;
}
@media (max-width: 600px) {
  .photo-grid .shot:first-child { aspect-ratio: 16/10; }
}
.photo-grid .shot img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .shot .wm {
  position: absolute; bottom: 0.6rem; left: 0.75rem; right: 0.75rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.68rem; color: rgba(255,255,255,.9);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  pointer-events: none;
}
.photo-grid .shot .wm span { color: var(--accent); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.92);
  align-items: center; justify-content: center;
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-height: min(80vh, 900px);
  max-width: 100%;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox .lb-cap {
  color: var(--muted); font-size: 0.85rem; text-align: center;
  font-family: ui-monospace, Menlo, monospace;
}
.lightbox .lb-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.25rem; cursor: pointer;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
}
.lightbox .lb-prev { left: 1rem; }
.lightbox .lb-next { right: 1rem; }

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  font-size: 0.85rem; color: var(--muted);
}
.site-footer .row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
}
.site-footer strong { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--accent); color: #111; font-weight: 700;
  padding: 0.65rem 1.2rem; border-radius: 8px; border: none;
  font-size: 0.9rem; cursor: pointer;
}
.btn:hover { background: #fbbf24; color: #111; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
