/* ═══════════════════════════════════════════════════════════════════════════
   Christoph Kalscheuer Fotografie — styles.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DM Sans · lokal eingebunden ─────────────────────────────────────────── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

:root {
  --bg:          #FAFAF7;
  --text:        #2A2A28;
  --text-mid:    #5C5955;
  --text-light:  #8A8680;
  --accent:      #C4A882;
  --accent-dark: #A08968;
  --white:       #FFFFFF;
  --font:        'DM Sans', 'Helvetica Neue', sans-serif;
  --ease:        0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gap:         1.2rem;
  --shadow:      0 8px 40px rgba(42,42,40,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAVIGATION ─────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--ease), box-shadow var(--ease), padding var(--ease);
}
nav.scrolled {
  background: rgba(250,250,247,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(42,42,40,0.08);
  padding: 0.9rem 3rem;
}
.nav-brand {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--ease);
}
.nav-brand:hover { opacity: 0.7; }
.nav-brand .brand-sub {
  font-weight: 400;
  color: var(--text-light);
  margin-left: 0.55em;
}
nav.hero-nav .nav-brand {
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
nav.hero-nav .nav-brand .brand-sub { color: rgba(255,255,255,0.6); }
nav.scrolled .nav-brand            { color: var(--text); text-shadow: none; }
nav.scrolled .nav-brand .brand-sub { color: var(--text-light); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-light);
  transition: color var(--ease);
  position: relative;
}
nav.hero-nav .nav-links a        { color: rgba(255,255,255,0.8); }
nav.scrolled .nav-links a        { color: var(--text-light); }
.nav-links a:hover                { color: var(--text); }
nav.hero-nav .nav-links a:hover  { color: var(--white); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; z-index: 200;
}
.hamburger span {
  width: 26px; height: 1.5px; background: var(--text);
  transition: all 0.3s ease;
}
nav.hero-nav .hamburger span { background: var(--white); }
nav.scrolled .hamburger span { background: var(--text); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── HERO ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #111;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide  { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.hero-slide.active img { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.02) 40%,
    rgba(0,0,0,0.28) 100%);
  z-index: 1;
}
.hero-indicator {
  position: absolute; bottom: 3rem; right: 3rem;
  display: flex; gap: 8px; z-index: 2;
}
.hero-dot {
  width: 32px; height: 2px;
  background: rgba(255,255,255,0.3); cursor: pointer; transition: all var(--ease);
}
.hero-dot.active { background: var(--white); width: 48px; }

/* ─── SECTION HEADER ─────────────────────────────────────────────────── */
.section-header { text-align: center; padding: 5rem 2rem 2.5rem; }
.section-header h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--text); margin-bottom: 0.8rem;
}
.section-header .divider { width: 36px; height: 1px; background: var(--accent); margin: 0 auto 1rem; }
.section-header p { font-size: 0.8rem; font-weight: 400; color: var(--text-light); letter-spacing: 0.18em; text-transform: uppercase; }

/* ─── FILTER BAR ─────────────────────────────────────────────────────── */
.filter-bar { display: flex; justify-content: center; gap: 0.6rem; padding: 0 2rem 2.5rem; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: none; border: 1px solid transparent;
  padding: 0.55rem 1.3rem; cursor: pointer;
  color: var(--text-light); border-radius: 2px; transition: all var(--ease);
}
.filter-btn:hover  { color: var(--text); border-color: rgba(42,42,40,0.22); }
.filter-btn.active { color: var(--text); border-color: var(--text); }

/* ─── PHOTO GRID ─────────────────────────────────────────────────────── */
.grid-container { max-width: 1440px; margin: 0 auto; padding: 0 2rem 5rem; }
.masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(320px, 33.5vw, 490px);
  gap: var(--gap);
  grid-auto-flow: row;
}
.grid-item.wide { grid-column: span 2; }
.grid-item {
  position: relative; overflow: hidden; cursor: pointer; border-radius: 2px;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  background: var(--bg);
}
.grid-item.visible { opacity: 1; transform: translateY(0); }
.grid-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.grid-item:not(.wide) img {
  object-fit: contain;
  object-position: center center;
}
.grid-item:hover img { transform: scale(1.04); }
.grid-item .overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.62) 100%);
  opacity: 0; transition: opacity var(--ease);
  display: flex; align-items: flex-end; padding: 1.4rem;
}
.grid-item:hover .overlay { opacity: 1; }
.overlay-text h3 { font-size: 1rem; font-weight: 500; color: var(--white); margin-bottom: 0.2rem; }
.overlay-text span { font-size: 0.67rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

/* ─── LIGHTBOX ───────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(250,250,247,0.97);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
  padding: 5rem 4rem 3rem;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lb-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.1rem;
  max-width: min(90vw, calc(90vh * 1.5));
  max-height: calc(92vh - 3rem);
}
.lb-content img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 6rem);
  width: auto; height: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
  transform: scale(0.96); transition: transform 0.4s ease;
}
.lightbox.open .lb-content img { transform: scale(1); }
.lightbox-caption { text-align: center; white-space: nowrap; }
.lightbox-caption h3 { font-size: 1rem; font-weight: 500; color: var(--text); margin-bottom: 0.3rem; }
.lightbox-caption span { font-size: 0.68rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-light); }
.lightbox-close {
  position: absolute; top: 2rem; right: 2rem;
  width: 44px; height: 44px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border: none; background: none;
}
.lightbox-close::before,
.lightbox-close::after { content: ''; position: absolute; width: 24px; height: 1px; background: var(--text); }
.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after  { transform: rotate(-45deg); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; cursor: pointer; border: none; background: none; opacity: 0.4; transition: opacity var(--ease); }
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 1.5rem; } .lb-next { right: 1.5rem; }
.lb-nav svg { width: 20px; height: 20px; stroke: var(--text); fill: none; stroke-width: 1.5; }

/* ─── ABOUT ──────────────────────────────────────────────────────────── */
.about-section { border-top: 1px solid rgba(42,42,40,0.08); padding: 6rem 2rem; }
.about-inner { max-width: 860px; margin: 0 auto; display: flex; gap: 4.5rem; align-items: center; }
.about-photo {
  flex-shrink: 0; width: 220px; height: 220px;
  border-radius: 2px; overflow: hidden; background: #E5E3DE; position: relative;
}
.about-photo-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px dashed rgba(42,42,40,0.25);
}
.about-photo-placeholder svg { width: 32px; height: 32px; stroke: var(--text-light); fill: none; stroke-width: 1.2; opacity: 0.5; }
.about-photo-placeholder span { font-size: 0.62rem; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-light); }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; z-index: 1; }
.about-text .eyebrow { font-size: 0.63rem; font-weight: 400; letter-spacing: 0.42em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 1.2rem; }
.about-text blockquote { font-size: clamp(1rem, 1.8vw, 1.32rem); font-weight: 300; font-style: italic; line-height: 1.65; color: var(--text); margin-bottom: 1.5rem; }
.about-text .signature { font-size: 0.88rem; font-weight: 400; color: var(--text-mid); letter-spacing: 0.06em; }

/* ─── KONTAKT ────────────────────────────────────────────────────────── */
.contact-section { border-top: 1px solid rgba(42,42,40,0.08); }
.contact-container { max-width: 620px; margin: 0 auto; padding: 0 2rem 6rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group input,
.form-group textarea {
  width: 100%; padding: 0.9rem 1.1rem;
  font-family: var(--font); font-size: 0.9rem; font-weight: 400;
  color: var(--text); background: transparent;
  border: 1px solid rgba(42,42,40,0.22); border-radius: 2px;
  outline: none; transition: border-color var(--ease); -webkit-appearance: none;
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--text); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }
.submit-btn {
  align-self: flex-start;
  font-family: var(--font); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.9rem 2.2rem; background: var(--text); color: var(--white);
  border: none; border-radius: 2px; cursor: pointer;
  display: flex; align-items: center; gap: 0.6rem; transition: opacity var(--ease);
}
.submit-btn:hover { opacity: 0.78; }
.submit-btn svg { width: 14px; height: 14px; stroke: var(--white); fill: none; stroke-width: 2; }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(42,42,40,0.08);
  padding: 2.5rem 3rem; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-brand { font-size: 0.8rem; font-weight: 400; letter-spacing: 0.12em; color: var(--text-mid); }
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); text-decoration: none; transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ─── SUBPAGES (Impressum, Datenschutz) ──────────────────────────────── */
.subpage-hero {
  padding: 10rem 2rem 4rem;
  max-width: 760px;
  margin: 0 auto;
}
.subpage-hero h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.subpage-hero .divider { width: 36px; height: 1px; background: var(--accent); margin: 1.5rem 0 2rem; }

.subpage-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.subpage-content h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 2.8rem 0 0.9rem;
}
.subpage-content h2:first-child { margin-top: 0; }
.subpage-content p {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 0.8rem;
}
.subpage-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
.subpage-content a:hover { color: var(--accent-dark); }
.subpage-content .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color var(--ease);
}
.subpage-content .back-link:hover { color: var(--text); text-decoration: none; }
.subpage-content .back-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
/* ── Tablet (769 px – 1100 px): 4 Spalten beibehalten ── */
@media (max-width: 1100px) {
  nav { padding: 1.2rem 2rem; }
  nav.scrolled { padding: 0.7rem 2rem; }
  /* 32 vw ≈ 3:2-Verhältnis für 2-spaltige Querformat-Bilder */
  .masonry { grid-auto-rows: clamp(200px, 32vw, 420px); }
  .grid-container { padding: 0 1.5rem 4rem; }
  /* Hochformat-Zellen: cover statt contain → keine Ränder */
  .grid-item:not(.wide) img { object-fit: cover; object-position: center top; }
  /* Hero: Breite bestimmt Höhe (3:2) → kein seitlicher Anschnitt */
  .hero { height: auto; aspect-ratio: 3 / 2; min-height: unset; }
}

/* ── Navigation: Hamburger ab 960 px ── */
@media (max-width: 960px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2rem; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease; z-index: 150;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { color: var(--text) !important; font-size: 1rem; }
}

/* ── Mobil (≤ 768 px): 1 Spalte, Bilder ungekürzt ── */
@media (max-width: 768px) {
  /* Hero: Hochformat-Motive (2:3) → Breite bestimmt Höhe, kein seitlicher Anschnitt */
  .hero { aspect-ratio: 2 / 3; }
  nav { padding: 1.2rem 1.5rem; }
  nav.scrolled { padding: 0.7rem 1.5rem; }
  .nav-brand { font-size: 0.75rem; letter-spacing: 0.12em; }
  .masonry { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .grid-item.wide { grid-column: span 1; }
  .grid-item img {
    position: static;
    width: 100%; height: auto;
    object-fit: initial; object-position: initial;
  }
  .grid-item:not(.wide) img { object-fit: initial; object-position: initial; }
  .grid-item:hover img { transform: none; }
  .grid-container { padding: 0 1rem 3rem; }
  .section-header { padding: 3.5rem 1.5rem 2rem; }
  .filter-bar { padding: 0 1rem 1.5rem; gap: 0.4rem; }
  .filter-btn { padding: 0.45rem 0.9rem; font-size: 0.72rem; }
  .about-section { padding: 4rem 1.5rem; }
  .about-inner { flex-direction: column; gap: 2.5rem; text-align: center; }
  .about-photo { margin: 0 auto; width: 180px; height: 180px; }
  .contact-container { padding: 0 1.5rem 4rem; }
  .form-row { grid-template-columns: 1fr; }
  .submit-btn { align-self: stretch; justify-content: center; }
  footer { padding: 2rem 1.5rem; flex-direction: column; text-align: center; }
  .lightbox { padding: 4rem 0.5rem 1.5rem; }
  .lb-prev { left: 0.25rem; } .lb-next { right: 0.25rem; }
  .lb-content img { max-height: calc(90vh - 5rem); }
  .subpage-hero { padding: 7rem 1.5rem 3rem; }
  .subpage-content { padding: 0 1.5rem 4rem; }
}
