/*
 * Lightframe — style-print-light.css
 * ───────────────────────────────────
 * White page · black ink · photos presented as prints
 * (white border, hairline edge, soft shadow — like prints laid on a table)
 * Fonts: Outfit
 *   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet">
 *
 * To activate: define('STYLESHEET', 'style-print-light.css'); in index.php, about.php, djsets.php
 * The book view (book.css / book.js) reads the same tokens.
 */

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

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

[hidden] { display: none !important; }

:root {
  --bg:        #fff;
  --surface:   #fff;
  --surface2:  #f3f3f1;   /* tone behind images while they load */
  --border:    #e3e3e0;   /* rules and dividers */
  --edge:      #dcdcd8;   /* the hairline edge of a print */
  --text:      #111;
  --text-soft: #3d3d3d;   /* long-form body copy */
  --muted:     #6d6d6d;
  --accent:    #0a7a42;   /* deep green: links, focus, caption numbers */
  --gap:       24px;
  --radius:    2px;
  --mat:       10px;      /* white border of each print */
  --shadow:    0 1px 2px rgba(20,20,20,.07), 0 8px 22px rgba(20,20,20,.09);
  --shadow-up: 0 2px 4px rgba(20,20,20,.08), 0 16px 34px rgba(20,20,20,.13);
  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-disp: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

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

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

.site-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span { color: var(--muted); font-weight: 400; }

.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: 500;
}

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

.header-nav a.active { box-shadow: inset 0 -1px 0 var(--text); }

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

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

.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 360px;
  margin-left: auto;
  border-bottom: 1px solid var(--text);
}

.header-search input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 400;
  padding: 6px 2px;
  outline: none;
  min-width: 0;
}

.header-search input[type="text"]::placeholder { color: #9a9a9a; }

.header-search button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 2px 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color .2s;
  flex-shrink: 0;
}

.header-search button:hover { color: var(--text); }
.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;
}

.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: 28px 40px 36px;
  max-width: 680px;
}

.hero-search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1.5px solid var(--text);
}

.hero-search input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 300;
  padding: 10px 0;
  outline: none;
  min-width: 0;
}

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

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

.hero-search button:hover { background: var(--accent); }

.hero-search-hint {
  margin-top: 12px;
  font-size: .78rem;
  color: var(--muted);
}

/* ── Album grid (homepage) ───────────────────────────────────────────────────── */

.albums-grid {
  padding: 24px 48px 104px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 64px;
}

.album-card-wrap { min-width: 0; }

.album-card {
  display: grid;
  gap: 20px;
  cursor: pointer;
}

/* A small pile of prints: the cover on top, one or two prints peeking out behind it.
   stack-2 = two photos in the album, stack-3 = three or more. */
.album-stack {
  position: relative;
  isolation: isolate;
}

.album-stack::before,
.album-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--surface);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  transition: transform .35s ease;
  display: none;
}

.album-stack.stack-2::after,
.album-stack.stack-3::after  { display: block; transform: translate(6px, 3px) rotate(2deg); }
.album-stack.stack-3::before { display: block; transform: translate(-5px, 5px) rotate(-2.6deg); }

/* vary the pile a little from card to card */
.album-card-wrap:nth-child(3n+2) .album-stack::after  { transform: translate(-6px, 4px) rotate(-1.8deg); }
.album-card-wrap:nth-child(3n+2) .album-stack::before { transform: translate(7px, 2px) rotate(2.8deg); }
.album-card-wrap:nth-child(3n)   .album-stack::after  { transform: translate(4px, 6px) rotate(1.2deg); }
.album-card-wrap:nth-child(3n)   .album-stack::before { transform: translate(-7px, 1px) rotate(-1.6deg); }

/* on hover the pile fans out */
.album-card:hover .album-stack::after,
.album-card:focus-visible .album-stack::after  { transform: translate(14px, 4px) rotate(3.6deg); }
.album-card:hover .album-stack::before,
.album-card:focus-visible .album-stack::before { transform: translate(-13px, 6px) rotate(-4.2deg); }

/* the cover as a print */
.album-card-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: var(--surface);
  padding: var(--mat);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.album-card:hover .album-card-img,
.album-card:focus-visible .album-card-img {
  transform: translateY(-3px);
  box-shadow: var(--shadow-up);
}

.album-card:focus-visible { outline: none; }
.album-card:focus-visible .album-card-img { outline: 2px solid var(--accent); outline-offset: 4px; }

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

.album-card-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-inline: 2px;
}

.album-card-title {
  font-family: var(--font-disp);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  text-wrap: balance;
}

.album-card-year {
  font-size: .82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.album-card-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
  padding-inline: 2px;
  margin-top: -6px;
}

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

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

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

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

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

/* Grid / Book switch */
.view-switch {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.view-switch a {
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s, background .2s;
}

.view-switch a:hover { color: var(--text); }
.view-switch a[aria-current] { background: var(--text); color: #fff; }

.photos-grid {
  padding: 40px 40px 96px;
  columns: 4 260px;
  column-gap: 32px;
}

.photo-unit {
  break-inside: avoid;
  margin-bottom: 32px;
}

/* each photo as a print */
.photo-item {
  position: relative;
  cursor: zoom-in;
  background: var(--surface);
  padding: var(--mat);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.photo-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-up);
}

.photo-item img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--surface2);
}

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

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

.photo-caption {
  font-size: .8rem;
  color: var(--text-soft);
  line-height: 1.5;
  padding: 10px 2px 0;
}

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

.search-header {
  padding: 56px 40px 32px;
  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: normal; }
.search-header .meta { font-size: .78rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.search-grid {
  padding: 40px 40px 96px;
  columns: 4 220px;
  column-gap: 32px;
}

.search-card {
  break-inside: avoid;
  margin-bottom: 32px;
  position: relative;
  cursor: zoom-in;
  background: var(--surface);
  padding: var(--mat);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.search-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-up);
}

.search-card img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--surface2);
}

.search-card-meta {
  position: absolute;
  inset: var(--mat);
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  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: #fff;
  font-weight: 500;
  margin-bottom: 3px;
}

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

.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 (grid & search views) ──────────────────────────────────────────── */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(250,250,248,.97);
  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;
  min-height: 0;
}

/* the enlarged photo as a print */
#lb-img {
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: #fff;
  padding: clamp(10px, 1.6vw, 22px);
  border: 1px solid var(--edge);
  box-shadow: 0 2px 6px rgba(20,20,20,.08), 0 20px 50px rgba(20,20,20,.14);
  transition: opacity .2s;
}

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

.lb-btn:hover { border-color: var(--text); }
#lb-prev { left: 16px; }
#lb-next { right: 16px; }

#lb-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--edge);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  transition: border-color .2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-close:hover { border-color: var(--text); }

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

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

#lb-filename {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

#lb-album-link {
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--accent);
  text-decoration: none;
}

#lb-album-link:hover { text-decoration: underline; }

#lb-exif {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: .78rem;
  color: var(--text-soft);
}

#lb-exif span strong {
  color: var(--muted);
  font-weight: 500;
  margin-right: 6px;
}

#lb-counter {
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--muted);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

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

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

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

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

.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(10,122,66,.3);
  transition: border-color .2s;
}

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

/* Any standalone image can be shown as a print */
.print {
  display: block;
  max-width: 100%;
  background: var(--surface);
  padding: var(--mat);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}

/* ── 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: var(--muted);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-footer:empty { display: none; }
.site-footer a { color: var(--muted); transition: color .2s; }
.site-footer a:hover { color: var(--text); }

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

@media (max-width: 800px) {
  :root { --mat: 7px; }
  .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: 36px 20px 24px; }
  .hero-search { padding: 12px 20px 28px; }
  .hero-search input[type="text"] { font-size: 1.1rem; }
  .albums-grid { padding: 16px 24px 60px; grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .photos-grid, .search-grid { padding: 24px 16px 60px; columns: 2; column-gap: 16px; }
  .photo-unit, .search-card { margin-bottom: 20px; }
  .page-content { padding: 28px 20px 60px; }
  #lb-img-wrap { padding: 64px 12px 0; }
  #lb-info { padding: 14px 20px 18px; }
  #lb-prev, #lb-next { top: auto; bottom: 8px; transform: none; width: 42px; height: 42px; }
  #lb-prev { left: 12px; }
  #lb-next { right: 12px; }
  .album-meta-bar { gap: 14px; }
  .site-footer { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
  .photos-grid, .search-grid { columns: 1; }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .albums-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 48px; }
}

/* Grid / Book switch outside the album meta bar (book view) */
.view-switch { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
