/* ============================================================
   BACHMANN PHOTOGRAPHY — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;700&display=swap');

:root {
  --bg: #f5f4f0;
  --fg: #0a0a0a;
  --accent: #ff5500;
  --mid: #888;
  --font: 'Geist', 'Helvetica Neue', Helvetica, sans-serif;
  --header-h: 48px;
  --footer-h: 120px;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  cursor: none;
}

/* ── Custom Cursor ─────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 26px; height: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  /* 3: much faster — no transition lag */
  transition: width 0.1s ease, height 0.1s ease, background 0.1s ease;
}
#cursor.hovering { width: 12px; height: 12px; background: var(--accent); }

/* ── Header ────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  background: var(--bg);
}

.header-left, .header-center, .header-right {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-btn {
  background: none; border: none;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: none;
  padding: 4px 0;
  transition: color 0.2s;
  font-weight: 500;
}
.nav-btn:hover { color: var(--accent); }

/* ── Filter Dropdown ───────────────────────────────────────── */
.filter-wrapper { position: relative; }
.filter-dropdown {
  display: none;
  position: absolute;
  top: 28px; right: 0;
  background: var(--bg);
  border: 1px solid var(--fg);
  padding: 20px;
  width: 260px;
  z-index: 200;
}
.filter-dropdown.open { display: block; }
.filter-group { margin-bottom: 16px; }
.filter-label {
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--mid);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 500;
}
.filter-tag {
  background: none;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg);
  cursor: none;
  padding: 4px 8px;
  margin: 2px;
  transition: border-color 0.2s, color 0.2s;
  text-transform: uppercase;
}
.filter-tag:hover { border-color: var(--fg); }
.filter-tag.active { background: var(--fg); color: var(--bg); }
.filter-reset {
  background: none; border: none;
  border-top: 1px solid #ddd;
  width: 100%;
  padding-top: 12px;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: none;
  text-align: left;
  margin-top: 4px;
}
.filter-reset:hover { color: var(--fg); }

/* ── Gallery Track ─────────────────────────────────────────── */
#gallery-track {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--footer-h);
  overflow: hidden;
  user-select: none;
}

#gallery-inner {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.gallery {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  height: 100%;
  padding: 24px 60px 44px 60px;
  gap: 28px;
  width: max-content;
  flex-shrink: 0;
}

/* ── Photo Figures ─────────────────────────────────────────── */
figure.photo {
  position: relative;
  flex-shrink: 0;
  overflow: visible;
  cursor: none;
  transition: opacity 0.4s ease;
}
figure.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.4s ease;
}
figure.photo:hover img {
  transform: scale(1.03);
  filter: grayscale(20%);
}

figcaption {
  position: absolute;
  bottom: -22px;
  right: 0; left: 0;
  text-align: right;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  transition: color 0.2s;
  pointer-events: none;
  font-weight: 400;
}
figure.photo:hover figcaption { color: var(--fg); }
figure.photo.hidden { display: none; }

.photo.tall   { height: 72%; width: auto; aspect-ratio: 2/3; }
.photo.medium { height: 52%; width: auto; aspect-ratio: 3/4; }
.photo.small  { height: 36%; width: auto; aspect-ratio: 3/4; }
.photo.wide   { height: 50%; width: auto; aspect-ratio: 16/9; }

figure.photo:nth-child(odd)  { align-self: flex-start; margin-top: 40px; }
figure.photo:nth-child(even) { align-self: flex-end;   margin-bottom: 40px; }
figure.photo:nth-child(3n)   { align-self: center;     margin-top: 0; margin-bottom: 0; }

/* ── Footer Title ──────────────────────────────────────────── */
footer#site-title {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
  border-top: 1px solid rgba(0,0,0,0.08);
}
.title-bar {
  display: flex;
  align-items: flex-end;
  padding: 0 28px;
  width: 100%;
  line-height: 0.85;
}
.title-word {
  font-family: var(--font);
  font-size: clamp(64px, 9vw, 110px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  padding-right: 0.3em;
}
.title-last { padding-right: 0; color: var(--accent); }

/* 2: footer-about-btn — identical style to nav-btn, no box */
.title-word.footer-nav {
  font-size: 11px;
  font-weight: 400;
  padding: 0 24px 16px 16px;
  align-self: flex-end;
}
.footer-about-btn {
  background: none; border: none; outline: none;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: none;
  padding: 0;
  font-weight: 500;
  transition: color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.footer-about-btn:hover { color: var(--accent); }

/* ── Lightbox ──────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.96);
  z-index: 400;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
#lightbox.open { display: flex; }

#lightbox-img-wrap {
  position: relative;
  max-width: 80vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
#lightbox-img {
  display: block;
  max-width: 80vw;
  max-height: 82vh;
  object-fit: contain;
  filter: grayscale(5%);
}

.lightbox-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  gap: 16px;
  white-space: nowrap;
}
.lightbox-settings {
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
  flex-shrink: 0;
}
.lightbox-caption {
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

/* 4: Larger, thin X */
.lightbox-close {
  background: none; border: none;
  color: #fff;
  cursor: none;
  position: fixed;
  top: 20px; right: 28px;
  z-index: 401;
  padding: 0;
  line-height: 1;
}
.lightbox-close:hover { color: var(--accent); }
.lightbox-close svg { display: block; }

/* 5: Chevron nav arrows */
.lightbox-nav {
  background: none; border: none;
  color: #444;
  cursor: none;
  padding: 12px;
  transition: color 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.lightbox-nav:hover { color: #fff; }
.lightbox-nav svg { display: block; }

/* ── No results ────────────────────────────────────────────── */
#no-results {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mid);
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}


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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  cursor: none;
}

/* ── Custom Cursor ─────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 28px; height: 28px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}
#cursor.hovering { width: 14px; height: 14px; background: var(--accent); }

/* ── Header ────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  background: var(--bg);
}

.header-left, .header-center, .header-right {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-btn {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: none;
  padding: 4px 0;
  transition: color 0.2s;
  font-weight: 500;
}
.nav-btn:hover { color: var(--accent); }

/* ── Filter Dropdown ───────────────────────────────────────── */
.filter-wrapper { position: relative; }
.filter-dropdown {
  display: none;
  position: absolute;
  top: 28px; right: 0;
  background: var(--bg);
  border: 1px solid var(--fg);
  padding: 20px;
  width: 260px;
  z-index: 200;
}
.filter-dropdown.open { display: block; }
.filter-group { margin-bottom: 16px; }
.filter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--mid);
  display: block;
  margin-bottom: 8px;
}
.filter-tag {
  background: none;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg);
  cursor: none;
  padding: 4px 8px;
  margin: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.filter-tag:hover { border-color: var(--fg); }
.filter-tag.active { background: var(--fg); color: var(--bg); }
.filter-reset {
  background: none; border: none;
  border-top: 1px solid #ddd;
  width: 100%;
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: none;
  text-align: left;
  margin-top: 4px;
}
.filter-reset:hover { color: var(--fg); }

/* ── Gallery Track ─────────────────────────────────────────── */
#gallery-track {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: var(--footer-h);
  overflow: hidden;           /* JS übernimmt scrollLeft */
  user-select: none;
}

/* Inner container holds original + clone side by side */
#gallery-inner {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.gallery {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  height: 100%;
  padding: 24px 60px 44px 60px;
  gap: 28px;
  width: max-content;
  flex-shrink: 0;
}

/* ── Photo Figures ─────────────────────────────────────────── */
figure.photo {
  position: relative;
  flex-shrink: 0;
  overflow: visible;         /* figcaption darf unten rausgucken */
  cursor: none;
  transition: opacity 0.4s ease;
}
figure.photo > div.img-wrap {
  overflow: hidden;
  width: 100%;
  height: 100%;
}
figure.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.4s ease;
}
figure.photo:hover img {
  transform: scale(1.03);
  filter: grayscale(20%);
}

/* #7: Unterschrift — rechtsbündig, unter dem Foto */
figcaption {
  position: absolute;
  bottom: -22px;
  right: 0;                  /* rechtsbündig */
  left: 0;
  text-align: right;         /* Text rechts */
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  transition: color 0.2s;
  pointer-events: none;
}
figure.photo:hover figcaption { color: var(--fg); }
figure.photo.hidden { display: none; }

/* Size variants */
.photo.tall   { height: 72%; width: auto; aspect-ratio: 2/3; }
.photo.medium { height: 52%; width: auto; aspect-ratio: 3/4; }
.photo.small  { height: 36%; width: auto; aspect-ratio: 3/4; }
.photo.wide   { height: 50%; width: auto; aspect-ratio: 16/9; }

/* Vertical staggering */
figure.photo:nth-child(odd)  { align-self: flex-start; margin-top: 40px; }
figure.photo:nth-child(even) { align-self: flex-end;   margin-bottom: 40px; }
figure.photo:nth-child(3n)   { align-self: center;     margin-top: 0; margin-bottom: 0; }

/* ── Footer Title ──────────────────────────────────────────── */
footer#site-title {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
  border-top: 1px solid rgba(0,0,0,0.08);
}
.title-bar {
  display: flex;
  align-items: flex-end;
  padding: 0 28px;
  width: 100%;
  line-height: 0.85;
}
.title-word {
  font-family: var(--font-mono);
  font-size: clamp(64px, 9vw, 110px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  padding-right: 0.3em;
}
.title-last { padding-right: 0; color: var(--accent); }

.title-word.footer-nav {
  font-size: 11px;
  font-weight: 400;
  padding: 0 24px 16px 16px;
  align-self: flex-end;
}

.footer-about-btn {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  cursor: none;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-about-btn:hover { color: var(--accent); }

/* ── Lightbox ──────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.96);
  z-index: 400;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
#lightbox.open { display: flex; }

#lightbox-img-wrap {
  position: relative;
  max-width: 80vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
#lightbox-img {
  display: block;
  max-width: 80vw;
  max-height: 82vh;
  object-fit: contain;
  filter: grayscale(5%);
}

/* #8: Meta-Zeile: settings links, caption rechts */
.lightbox-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  gap: 16px;
  white-space: nowrap;
}
.lightbox-settings {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  flex-shrink: 0;
}
.lightbox-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

.lightbox-close {
  background: none; border: none;
  color: #fff; font-size: 18px;
  cursor: none;
  position: fixed;
  top: 24px; right: 32px;
  z-index: 401;
}
.lightbox-close:hover { color: var(--accent); }

.lightbox-nav {
  background: none; border: none;
  color: #444;
  cursor: none;
  padding: 12px;
  transition: color 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.lightbox-nav:hover { color: #fff; }

/* ── No results ────────────────────────────────────────────── */
#no-results {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mid);
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}
