/* ═══════════════════════════════════════════════════════════
   Riffel im Gras – Shared Stylesheet
   Palette: deep forest dark, moss, bark, fog, lichen
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&family=Fauna+One&family=Jost:wght@300;400;500&display=swap');

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

:root {
  --bg:         #0b0e0a;
  --surface:    #131710;
  --surface2:   #1a1f16;
  --border:     #2c332a;
  --border2:    #3a4336;

  --moss:       #4e6e3a;
  --lichen:     #7a9e62;
  --sage:       #9db882;
  --bark:       #6b5a42;
  --fog:        #c8c9be;
  --cream:      #e2ddd4;
  --white:      #f0ece3;
  --muted:      #6a7060;
  --muted2:     #505848;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Fauna One', Georgia, serif;
  --font-ui:      'Jost', sans-serif;

  --radius:     3px;
  --transition: .25s cubic-bezier(.2,.8,.4,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: .03;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 2rem;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(11,14,10,.94);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--sage);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: .02em;
}
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0 1.2rem;
  height: 56px;
  line-height: 56px;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--sage);
  border-bottom-color: var(--moss);
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 3.5rem 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% -20%, rgba(78,110,58,.14) 0%, transparent 65%);
  pointer-events: none;
}
.page-eyebrow {
  font-family: var(--font-ui);
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--lichen);
  margin-bottom: .8rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
}
.page-title em { font-style: italic; color: var(--sage); }

/* ── GALLERY GRID ── */
.gallery {
  columns: 3 260px;
  column-gap: 1rem;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeUp .5s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.7), 0 0 0 1px var(--moss);
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .6s cubic-bezier(.2,.8,.4,1);
}
.card:hover img { transform: scale(1.05); }

.card-caption {
  padding: .65rem 1rem .75rem;
  border-top: 1px solid var(--border);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.3;
}

/* ── LOADING / EMPTY ── */
.state-msg {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
}

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6,8,6,.97);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
#lightbox.open { display: flex; }

.lb-inner {
  position: relative;
  max-width: min(92vw, 1200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  animation: lbIn .2s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}
#lb-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,.9);
}
#lb-caption {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--fog);
  text-align: center;
}

.lb-btn {
  position: fixed;
  background: rgba(19,23,16,.75);
  border: 1px solid var(--border2);
  color: var(--cream);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition), border-color var(--transition);
  z-index: 501;
}
.lb-btn:hover { background: var(--moss); border-color: var(--moss); }
#lb-close { top: 1.2rem; right: 1.5rem; }
#lb-prev  { top: 50%; left: 1.2rem;  transform: translateY(-50%); }
#lb-next  { top: 50%; right: 1.2rem; transform: translateY(-50%); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--muted2);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--sage); }

/* ── UTILITIES ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 640px) {
  .gallery { columns: 1; padding: 1rem; }
  nav { padding: 0 1rem; }
  .nav-links a { padding: 0 .7rem; font-size: .65rem; }
  .lb-btn#lb-prev, .lb-btn#lb-next { display: none; }
}
