/*
  hagbart35-style.css — Hagbart 35mm
  Shared stylesheet for index and album pages.
*/

:root {
  --hagbart35-bg:       #e4eaf5;
  --hagbart35-bg-muted: #d2daea;
  --hagbart35-accent:   #738ACB;
  --hagbart35-dark:     #3a4e8a;
  --hagbart35-ink:      #1a1e28;
  --hagbart35-ink-soft: #303848;
  --hagbart35-ink-muted:#607080;
  --hagbart35-rule:     #a8b8e0;
  --hagbart35-white:    #f8fafd;
  --hagbart35-card:     #edf1fa;
}

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

html, body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--hagbart35-bg);
  color: var(--hagbart35-ink);
  font-size: 18px;
  line-height: 1.6;
}

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

/* ── HEADER ─────────────────────────────────────────────────── */
header {
  background: var(--hagbart35-bg);
  border-bottom: 2px solid var(--hagbart35-accent);
  padding: 0 5%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 18px;
}

@font-face {
    font-family: 'SNES';
    src: url('../fonts/snes.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }

.masthead-title {
    font-family: 'SNES';
    font-size: 3.75rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--hagbart35-dark);
    font-style: italic;
    line-height: 1;
    display: block;
    padding-bottom: 0.15em;
    margin-bottom: -0.4em;
  }

  .masthead-title a { color: inherit; }

  .masthead-motto {
    font-family: 'SNES';
    font-size: 1.45rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--hagbart35-bg);
    background: var(--hagbart35-dark);
    font-style: italic;
    line-height: 1;
    display: block;
    padding-top: 0.2em;
    padding-bottom: 0.01em;
  }

nav { display: flex; gap: 24px; font-size: 0.95rem; }
nav a { color: var(--hagbart35-ink-soft); transition: color 0.2s; position: relative; padding-bottom: 2px; }
nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--hagbart35-accent); transition: width 0.25s; }
nav a:hover { color: var(--hagbart35-accent); }
nav a:hover::after { width: 100%; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 2px solid var(--hagbart35-accent);
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--hagbart35-ink-muted);
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}
.footer-logo { font-family: 'Lora', Georgia, serif; font-size: 1rem; color: var(--hagbart35-dark); font-weight: 400; }
footer a { color: var(--hagbart35-ink-muted); transition: color 0.2s; }
footer a:hover { color: var(--hagbart35-accent); }

/* ── SECTION RULE ────────────────────────────────────────────── */
.section-rule {
  font-size: 0.68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--hagbart35-ink-muted);
  padding: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-rule::after { content: ''; flex: 1; height: 1px; background: var(--hagbart35-rule); }

/* ── ALBUM ROW (index) ──────────────────────────────────── */
.album-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 0 14px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--hagbart35-rule);
  cursor: default;
}
.album-row:first-of-type { border-top: 1px solid var(--hagbart35-rule); }

.album-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--hagbart35-dark);
  margin-bottom: 4px;
}
.album-count {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hagbart35-ink-muted);
}
.album-desc {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--hagbart35-ink-soft);
  margin-top: 6px;
  line-height: 1.5;
}

.album-thumbs {
  display: flex;
  gap: 8px;
}

.album-thumb {
  width: 133px;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--hagbart35-card);
  border: 1px solid var(--hagbart35-rule);
  flex-shrink: 0;
}
.album-thumb:hover { opacity: 0.85; }
.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.album-thumb:hover img { transform: scale(1.04); }

/* Film frame placeholder */
.album-thumb.empty {
  position: relative;
}
.album-thumb.empty::before,
.album-thumb.empty::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 14px; height: 9px;
  background: var(--hagbart35-bg); border: 1px solid var(--hagbart35-rule); border-radius: 1px;
}
.album-thumb.empty::before { top: 5px; }
.album-thumb.empty::after  { bottom: 5px; }

.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hagbart35-accent);
  border: 1px solid var(--hagbart35-accent);
  padding: 7px 14px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}
.view-more-btn:hover { background: var(--hagbart35-accent); color: var(--hagbart35-white); }

/* ── MASONRY GRID (album page) ─────────────────────────── */
.masonry-grid {
  column-count: 4;
  column-gap: 14px;
  padding: 8px 0 60px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 14px;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--hagbart35-card);
  border: 1px solid var(--hagbart35-rule);
  position: relative;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity 0.2s;
}
.masonry-item:hover img { transform: scale(1.02); opacity: 0.92; }

.masonry-caption {
  padding: 8px 10px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--hagbart35-ink-muted);
  line-height: 1.4;
}

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(10,12,18,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-overlay.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -36px; right: 0;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
.lightbox-close:hover { color: white; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 2rem;
  cursor: pointer;
  padding: 12px;
  transition: color 0.2s;
  z-index: 1001;
  line-height: 1;
}
.lightbox-prev:hover,
.lightbox-next:hover { color: white; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  z-index: 1001;
}

/* ── ALBUM PAGE HEADER ──────────────────────────────────── */
.album-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--hagbart35-rule);
  margin-bottom: 32px;
}
.album-header-label {
  font-size: 0.68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--hagbart35-ink-muted);
  margin-bottom: 10px;
}
.album-header-label a { color: var(--hagbart35-accent); transition: opacity 0.2s; }
.album-header-label a:hover { opacity: 0.7; }
.album-header-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--hagbart35-dark);
  margin-bottom: 10px;
}
.album-header-desc {
  font-style: italic;
  color: var(--hagbart35-ink-soft);
  font-size: 1rem;
}
.album-header-count {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hagbart35-ink-muted);
  margin-top: 8px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .album-row { grid-template-columns: 140px 1fr; }
  .view-more-col { grid-column: 1 / -1; padding-top: 4px; }
  .album-thumb { width: 80px; }
  .masonry-grid { column-count: 2; }
}

@media (max-width: 600px) {
  .album-row { grid-template-columns: 1fr; gap: 12px; }
  .album-thumbs { gap: 6px; }
  .album-thumb { width: 70px; }
  .masonry-grid { column-count: 1; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}
