/* ====================================================
   Josua Preißler Fotografie – Style
   Aesthetic: Editorial nature magazine, dark forest
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,600&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ---- Design Tokens ---- */
:root {
  --bg:          #0b1509;
  --bg2:         #141f11;
  --bg3:         #1b2b17;
  --bg4:         #243621;
  --text:        #ede8dc;
  --text2:       #9e9884;
  --text3:       #6a6355;
  --accent:      #c8a456;
  --accent2:     #e8c87a;
  --accent-dim:  rgba(200,164,86,.18);
  --sage:        #7aaa7a;
  --sage-dim:    rgba(122,170,122,.15);
  --border:      rgba(200,164,86,.18);
  --border2:     rgba(237,232,220,.08);
  --shadow:      0 8px 40px rgba(0,0,0,.55);
  --shadow-sm:   0 2px 12px rgba(0,0,0,.35);
  --radius:      6px;
  --radius-lg:   12px;
  --font-display:'Cormorant Garamond', Georgia, serif;
  --nav-h:       64px;
  --transition:  .3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(11,21,9,.0);
  border-bottom: 1px solid transparent;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  transition: background .4s ease, border-color .4s ease;
  backdrop-filter: blur(0px);
}
.nav.scrolled {
  background: rgba(11,21,9,.92);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text);
}
.nav-brand span { color: var(--accent); }
.nav-links {
  display: flex; gap: 2rem; list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 28px; background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; height: 2px; background: var(--text);
  transition: transform .3s, opacity .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(11,21,9,.97);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem; z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display); font-size: 2.2rem;
  color: var(--text2); transition: color .2s;
}
.nav-mobile a:hover { color: var(--accent); }

/* ============================================================
   HERO / HOME
   ============================================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

/* Left: slideshow */
.hero-visual {
  position: relative;
  overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--bg) 100%),
              linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 50%);
}
.hero-dots {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .5rem; z-index: 2;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(237,232,220,.3);
  border: 1px solid rgba(237,232,220,.4);
  transition: background .3s, transform .3s;
  cursor: pointer;
}
.hero-dot.active { background: var(--accent); transform: scale(1.4); }

/* Right: text content */
.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 3rem 4rem 3rem;
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-desc {
  color: var(--text2);
  font-size: .98rem;
  margin-bottom: 2.5rem;
  max-width: 34ch;
}

/* 3 Category cards */
.hero-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.hero-card {
  aspect-ratio: 3/4;
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.hero-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.hero-card:hover img { transform: scale(1.08); }
.hero-card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .6rem .7rem .5rem;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}

/* ============================================================
   PAGE LAYOUT (non-hero pages)
   ============================================================ */
.page {
  padding-top: calc(var(--nav-h) + 3rem);
  min-height: 100vh;
}
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}
.page-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  line-height: 1;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-subtitle {
  color: var(--text2);
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .5rem;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-tabs {
  display: flex; gap: 1rem; margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-tabs::-webkit-scrollbar { display: none; }
.gallery-tab {
  padding: .6rem 1.2rem .8rem;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text2); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.gallery-tab:hover { color: var(--text); }
.gallery-tab.active { color: var(--accent); border-color: var(--accent); }

/* Category panels */
.gallery-panel { display: none; }
.gallery-panel.active { display: block; }

/* Subcategory group */
.gallery-group {
  margin-bottom: 3.5rem;
}
.gallery-group-title {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 300;
  color: var(--text);
  margin-bottom: .3rem;
}
.gallery-group-latin {
  font-style: italic; font-size: .88rem;
  color: var(--text3); margin-bottom: 1.5rem;
}

/* Species block */
.species-block {
  margin-bottom: 2.5rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.species-header {
  padding: 1rem 1.5rem;
  display: flex; align-items: baseline; gap: .75rem;
  border-bottom: 1px solid var(--border2);
}
.species-name {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 500;
}
.species-latin {
  font-style: italic; font-size: .85rem; color: var(--text3);
}


.species-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(67px, 1fr));
  gap: 5px;
  background: var(--border2);
  align-items: center;
}

/* Querformat 3:2 */
.species-photo-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  cursor: pointer;
  grid-column: span 3;
  aspect-ratio: 3/2;
  width: 100%;
}

/* Hochformat 2:3 */
.species-photo-wrap.portrait {
  grid-column: span 2;
  aspect-ratio: 2/3;
}

/* Quadrat 1:1 – 2 Einheiten × 2 Einheiten */
.species-photo-wrap.square {
  grid-column: span 3;
  aspect-ratio: 1/1;
}

.species-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .3s;
}

.species-photo-wrap:hover img { transform: scale(1.06); }

.species-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.0);
  transition: background .3s;
  display: flex;
  align-items: flex-end;
}

.species-photo-wrap:hover .species-photo-overlay { background: rgba(0,0,0,.2); }

.species-photo-date {
  padding: .4rem .6rem;
  font-size: .7rem;
  color: rgba(237,232,220,.75);
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  width: 100%;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}

.species-photo-wrap:hover .species-photo-date {
  opacity: 1;
  transform: translateY(0);
}

/* Mobil */
@media (max-width: 900px) {
  .species-photos {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
}

@media (max-width: 560px) {
  .species-photos {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  position: relative; max-width: 90vw; max-height: 88vh;
}
.lightbox-img-wrap img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain; border-radius: 4px;
  box-shadow: var(--shadow);
}
.lightbox-caption {
  text-align: center; margin-top: .75rem;
  font-size: .85rem; color: var(--text2);
}
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 40px; height: 40px;
  background: rgba(237,232,220,.1); border: 1px solid rgba(237,232,220,.2);
  border-radius: 50%; color: var(--text); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 2;
}
.lightbox-close:hover { background: rgba(237,232,220,.2); }
.lightbox-prev, .lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(237,232,220,.08); border: 1px solid rgba(237,232,220,.18);
  border-radius: 50%; color: var(--text); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(237,232,220,.18); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-grid {
  display: grid; grid-template-columns: 340px 1fr;
  gap: 4rem; align-items: start;
}
.about-photo {
  position: sticky; top: calc(var(--nav-h) + 2rem);
}
.about-photo img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.about-photo-caption {
  margin-top: 1rem;
  font-size: .78rem; color: var(--text3);
  letter-spacing: .05em; text-align: center;
  font-style: italic;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 300;
  line-height: 1.1; margin-bottom: 1rem;
}
.about-text h2 em { font-style: italic; color: var(--accent); }
.about-text p {
  color: var(--text2); margin-bottom: 1.2rem;
  font-size: .97rem;
}
.about-equipment {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem; color: var(--text3);
}
.about-equipment strong { color: var(--accent); display: block; margin-bottom: .3rem; font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }

/* ============================================================
   IMPRESSUM / LEGAL
   ============================================================ */
.legal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 42vw;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; margin: 2rem 0 .5rem;
  color: var(--text);
}
.legal-content h3 {
  font-size: 1rem; margin: 1.2rem 0 .3rem;
  color: var(--accent);
}
.legal-content p, .legal-content li {
  color: var(--text2); font-size: .9rem; margin-bottom: .6rem;
}
.legal-content ul { padding-left: 1.2rem; }
.legal-contact-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.legal-contact-box p { margin: 0; line-height: 1.9; }

/* ============================================================
   INSTAGRAM / LINKS
   ============================================================ */
.links-page {
  max-width: 660px; margin: 0 auto; text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  color: var(--text3); font-size: .8rem;
}
.footer a { color: var(--text3); transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--text2);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.gold { color: var(--accent); }
.italic { font-style: italic; }

/* Scroll fade-in */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Divider */
.divider {
  height: 1px; background: var(--border);
  margin: 3rem 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --nav-h: 56px; }

  /* Mobile nav */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero mobile: stack vertically */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-visual {
    height: 55vw; min-height: 260px; max-height: 400px;
    position: relative;
  }
  .hero-slide { position: absolute; }
  .hero-slide-overlay {
    background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  }
  .hero-content {
    padding: 2rem 1.5rem 3rem;
  }
  .hero-cards { grid-template-columns: repeat(3,1fr); gap: .5rem; }
  .hero-card-label { font-size: .65rem; padding: .4rem .5rem; }

  /* About mobile */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-photo {
    position: static;
    max-width: 280px;
  }

  /* Gallery photo grid smaller */
  .species-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* Lightbox arrows */
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 2.4rem; }
  .species-photos { grid-template-columns: repeat(2, 1fr); }
  .footer { flex-direction: column; text-align: center; }
}
