/*
 * Lightframe — style-dark-serif.css
 * ────────────────────────────────────
 * Dark theme · pure black · electric green accent
 * Fonts: Outfit (variable, geometric sans)
 * Load in <head>:
 *   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500&display=swap" rel="stylesheet">
 *
 * IMPORTANT: This stylesheet uses a different font from the default.
 * Replace or add the Google Fonts <link> in index.php's <head> with the line above.
 *
 * To activate: set define('STYLESHEET', 'style-dark-serif.css'); in index.php
 */

/* ── Reset & Base ──────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #000;
  --surface:   #000;
  --surface2:  #888;
  --border:    #888;
  --text:      #fff;
  --muted:     #7a7d72;
  --accent:    #74fb4d;
  --accent2:   #666;
  --gap:       16px;
  --radius:    2px;
  --font-body: 'Outfit', sans-serif;
  --font-disp: 'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(17,18,16,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 20px;
  margin-bottom: 20px;
}

.site-logo {
  font-family: var(--font-disp);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--accent);
  font-style: italic;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.header-back,
.header-nav a {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 400;
}

.header-back:hover,
.header-nav a:hover,
.header-nav a.active {
  color: var(--accent);
}

.header-back svg { width: 14px; height: 14px; }

/* ── Header search ───────────────────────────────────────────────────────────── */

.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

.header-search input[type="text"] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 300;
  letter-spacing: .03em;
  padding: 7px 14px;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
  transition: border-color .2s;
  min-width: 0;
}

.header-search input[type="text"]::placeholder { color: #444; }
.header-search input[type="text"]:focus { border-color: var(--accent); }

.header-search button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  color: var(--muted);
  padding: 7px 14px;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  align-items: center;
  transition: color .2s, background .2s;
  flex-shrink: 0;
}

.header-search button:hover { color: var(--accent); background: var(--surface2); }
.header-search button svg { width: 15px; height: 15px; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */

.home-hero {
  padding: 88px 40px 36px;
  max-width: 680px;
}

.home-hero h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
  letter-spacing: -.01em;
}

/* DM Serif Display has its own italic — use it */
.home-hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.home-hero p {
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Homepage search bar ─────────────────────────────────────────────────────── */

.hero-search {
  padding: 0 40px 52px;
  max-width: 580px;
}

.hero-search-inner {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}

.hero-search-inner:focus-within {
  border-color: var(--accent);
}

.hero-search input[type="text"] {
  flex: 1;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 300;
  letter-spacing: .03em;
  padding: 14px 20px;
  outline: none;
  min-width: 0;
}

.hero-search input[type="text"]::placeholder { color: #444; }

.hero-search button {
  background: var(--accent);
  border: none;
  color: #111210;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-search button:hover { background: #c8d8b2; }

.hero-search-hint {
  margin-top: 10px;
  font-size: .72rem;
  color: #444;
  letter-spacing: .04em;
}

/* ── Album grid ──────────────────────────────────────────────────────────────── */

.albums-grid {
  padding: 0 20px 88px;
  columns: 4 260px;
  column-gap: 0;
}

.album-card-wrap {
  break-inside: avoid;
  padding: 20px;
}

.album-card {
  display: block;
  cursor: pointer;
}

.album-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: opacity .3s ease;
}

.album-card:hover .album-card-img {
  opacity: .8;
}

.album-card-overlay {
  display: none;
}

.album-card-count {
  display: none;
}

.album-card-title {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  margin-top: 12px;
  margin-bottom: 5px;
}

.album-card-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
  letter-spacing: .02em;
  font-weight: 300;
}

/* ── Album page ──────────────────────────────────────────────────────────────── */

.album-header {
  padding: 64px 40px 44px;
  border-bottom: 1px solid var(--border);
  max-width: 860px;
}

.album-header h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

.album-header .desc {
  color: var(--muted);
  max-width: 560px;
  font-size: .92rem;
  line-height: 1.8;
}

.album-meta-bar {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.photos-grid {
  padding: 32px 32px 88px;
  columns: 4 240px;
  column-gap: var(--gap);
}

.photo-unit {
  break-inside: avoid;
  margin-bottom: var(--gap);
}

.photo-item {
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform .28s ease, box-shadow .28s ease;
}

.photo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,.65);
}

.photo-item img {
  display: block;
  width: 100%;
  object-fit: cover;
  filter: brightness(.88) saturate(.8) contrast(1.02);
  transition: filter .35s, transform .45s;
}

.photo-item:hover img {
  filter: brightness(1) saturate(1) contrast(1);
  transform: scale(1.025);
}

.photo-exif-hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  font-size: .63rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.photo-item:hover .photo-exif-hint { opacity: 1; }

.photo-caption {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 8px 2px 4px;
  letter-spacing: .02em;
}

/* ── Search results ──────────────────────────────────────────────────────────── */

.search-header {
  padding: 64px 40px 36px;
  border-bottom: 1px solid var(--border);
}

.search-header h1 {
  font-family: var(--font-disp);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}

.search-header h1 em { color: var(--accent); font-style: italic; }
.search-header .meta { font-size: .78rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.search-grid {
  padding: 32px 32px 88px;
  columns: 4 220px;
  column-gap: var(--gap);
}

.search-card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .28s ease, box-shadow .28s ease;
}

.search-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,.65);
}

.search-card img {
  display: block;
  width: 100%;
  object-fit: cover;
  filter: brightness(.88) saturate(.8);
  transition: filter .3s, transform .4s;
}

.search-card:hover img { filter: brightness(1) saturate(1); transform: scale(1.02); }

.search-card-meta {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,11,9,.9) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity .25s;
}

.search-card:hover .search-card-meta { opacity: 1; }

.search-card-album {
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.search-card-file { font-size: .68rem; color: rgba(255,255,255,.4); }

.search-no-results {
  padding: 64px 40px;
  color: var(--muted);
}

.search-no-results strong {
  font-family: var(--font-disp);
  font-size: 2rem;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}

/* ── Lightbox ────────────────────────────────────────────────────────────────── */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8,9,7,.98);
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#lightbox.open { display: flex; animation: lbIn .2s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

#lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 60px 80px 0;
  position: relative;
}

#lb-img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 96px rgba(0,0,0,.9);
  transition: opacity .2s;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
  font-size: 1.2rem;
}

.lb-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
#lb-prev { left: 16px; }
#lb-next { right: 16px; }

#lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 10001;
  transition: color .2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-close:hover { color: #fff; }

#lb-info {
  width: 100%;
  padding: 20px 80px 28px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

#lb-top {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

#lb-filename {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
}

#lb-album-link {
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--accent);
  text-decoration: none;
  opacity: .65;
  transition: opacity .2s;
}

#lb-album-link:hover { opacity: 1; }

#lb-exif {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: .74rem;
  color: rgba(255,255,255,.35);
}

#lb-exif span strong {
  color: var(--accent);
  font-weight: 400;
  margin-right: 4px;
}

#lb-counter {
  font-size: .68rem;
  letter-spacing: .14em;
  color: rgba(255,255,255,.22);
  margin-top: 10px;
}

/* ── General page content ────────────────────────────────────────────────────── */

.page-header {
  padding: 64px 40px 44px;
  border-bottom: 1px solid var(--border);
  max-width: 860px;
}

.page-header h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}

.page-content {
  padding: 40px 40px 88px;
  max-width: 720px;
  font-size: .95rem;
  line-height: 1.9;
  color: var(--text);
}

.page-content p { margin-bottom: 1.3em; }
.page-content p:last-child { margin-bottom: 0; }

.page-content h2 {
  font-family: var(--font-disp);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--text);
  margin: 2em 0 .6em;
  letter-spacing: -.01em;
}

.page-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(181,196,160,.2);
  transition: border-color .2s;
}

.page-content a:hover { border-color: var(--accent); }

/* ── Empty / utility ─────────────────────────────────────────────────────────── */

.empty { padding: 80px 40px; color: var(--muted); font-size: .9rem; }

.empty strong {
  font-family: var(--font-disp);
  font-size: 2rem;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 40px;
  font-size: .68rem;
  letter-spacing: .14em;
  color: #3a3d34;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-footer a { color: #444840; transition: color .2s; }
.site-footer a:hover { color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 800px) {
  .site-header { padding: 14px 20px; flex-wrap: wrap; }
  .header-search { max-width: 100%; order: 3; flex: 0 0 100%; margin-left: 0; margin-top: 10px; }
  .home-hero, .album-header, .search-header, .page-header { padding: 40px 20px 24px; }
  .hero-search { padding: 0 20px 40px; }
  .albums-grid { padding: 0 0 60px; columns: 2; column-gap: 0; }
  .album-card-wrap { padding: 12px; }
  .photos-grid, .search-grid { padding: 0 12px 60px; column-gap: 10px; }
  .page-content { padding: 28px 20px 60px; }
  #lb-img-wrap { padding: 50px 48px 0; }
  #lb-info { padding: 16px 20px 20px; }
  #lb-prev { left: 4px; }
  #lb-next { right: 4px; }
  .album-meta-bar { flex-wrap: wrap; gap: 10px; }
  .site-footer { flex-direction: column; gap: 6px; text-align: center; }
}
