/* ============================================================
   Lars Walter – Fine Art Photography
   style.css
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white:      #fafaf9;
  --off-white:  #f5f4f2;
  --light-gray: #e2e0db;
  --mid-gray:   #9a9690;
  --dark:       #0d0d0b;
  --accent:     #0d0d0b;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --nav-height: 72px;
  --transition: 0.35s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  color: var(--dark);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  mix-blend-mode: normal;
}

/* Transparent over hero, white on scroll */
.nav--transparent {
  background: transparent;
}

.nav--solid {
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--white);
  transition: color var(--transition);
}

.nav--solid .nav__logo {
  color: var(--dark);
}

.nav__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__social-link {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.nav--solid .nav__social-link {
  color: var(--mid-gray);
}

.nav__social-link:hover {
  color: var(--white);
}

.nav--solid .nav__social-link:hover {
  color: var(--dark);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
}

.nav--solid .nav__links a {
  color: var(--mid-gray);
}

.nav__links a:hover,
.nav--solid .nav__links a:hover {
  color: var(--dark);
}

.nav__links a.active {
  color: var(--white);
}

.nav--solid .nav__links a.active {
  color: var(--dark);
}

/* DE/EN toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-toggle__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: color var(--transition);
}

.nav--solid .lang-toggle__btn {
  color: var(--light-gray);
}

.lang-toggle__btn.active {
  color: var(--white);
}

.nav--solid .lang-toggle__btn.active {
  color: var(--dark);
}

.lang-toggle__sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.6rem;
}

.nav--solid .lang-toggle__sep {
  color: var(--light-gray);
}

/* Burger (mobile) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: background var(--transition);
}

.nav--solid .nav__burger span {
  background: var(--dark);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: #d8d6d1; /* fallback before image loads */
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 8s ease;
}

/* subtle Ken-Burns on load */
.hero__bg img.loaded {
  transform: scale(1.03);
}

/* overlay: stärkeres Dunkel für Textlesbarkeit */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.28) 0%,
    rgba(0,0,0,0.22) 40%,
    rgba(0,0,0,0.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 1px 24px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 1.1s 0.3s forwards;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 12px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeUp 1.1s 0.65s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 1s 1.2s forwards;
  text-decoration: none;
  cursor: pointer;
}

.hero__scroll span {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  animation: scrollLine 2s 1.8s ease-in-out infinite;
}

/* ---------- Hero – Minimal Variante (kein Bild) ---------- */
.hero--minimal {
  background: var(--white);
}

.hero--minimal .hero__name,
.hero__name--dark {
  color: var(--dark);
  text-shadow: none;
}

.hero--minimal .hero__subtitle,
.hero__subtitle--dark {
  color: var(--mid-gray);
  text-shadow: none;
}

.hero--minimal .hero__scroll span,
.hero__scroll--dark span {
  color: var(--mid-gray);
}

.hero--minimal .hero__scroll-line,
.hero__scroll--dark .hero__scroll-line {
  background: var(--light-gray);
}

.hero--minimal .hero__scroll-line::after,
.hero__scroll--dark .hero__scroll-line::after {
  background: var(--dark);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollLine {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ---------- Page sections ---------- */
.section {
  padding: 120px 48px;
}

.section--narrow {
  max-width: 860px;
  margin: 0 auto;
}

.section__label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 48px;
}

/* ---------- Page Header (Work, About, Contact) ---------- */
.page-header {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 56px;
  padding-left: 48px;
  padding-right: 48px;
  border-bottom: 1px solid var(--light-gray);
}

.page-header__label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 16px;
}

.page-header__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--dark);
}

/* ---------- Work Grid ---------- */
.work-grid {
  padding: 48px 48px 120px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* last item wenn ungerade Anzahl: keine Sonderbehandlung mehr nötig */
.work-grid__item:last-child:nth-child(3n - 2),
.work-grid__item:last-child:nth-child(3n - 1) {
  grid-column: span 1;
}

.work-grid__item {
  position: relative;
  overflow: hidden;
  background: var(--off-white);
  text-decoration: none;
  display: block;
}

/* Seitenverhältnis: quadratisch */
.work-grid__item::before {
  content: '';
  display: block;
  padding-top: 100%;
}

/* Alle Items gleich: quadratisch */

/* Hintergrund-Container: hält Bild + Placeholder */
.work-grid__bg {
  position: absolute;
  inset: 0;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-grid__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
}
.work-grid__img.loaded {
  opacity: 1;
}

/* Placeholder-Icon (sichtbar wenn kein Bild geladen) */
.work-grid__placeholder-icon {
  width: 36px;
  height: 36px;
  opacity: 0.2;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s;
}

/* Sobald Bild lädt, Icon verstecken */
.work-grid__bg:not(.no-cover) .work-grid__placeholder-icon {
  opacity: 0;
}

/* Wenn onerror feuert → .no-cover auf .work-grid__bg gesetzt */
.work-grid__bg.no-cover .work-grid__img {
  display: none;
}
.work-grid__bg.no-cover .work-grid__placeholder-icon {
  opacity: 0.2;
}

/* Hover-Overlay */
.work-grid__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,13,11,0.82) 0%, rgba(13,13,11,0.35) 45%, rgba(13,13,11,0) 75%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 32px;
}

.work-grid__item:hover .work-grid__img {
  transform: scale(1.04);
}

.work-grid__title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.2;
  opacity: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.work-grid__subtitle {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-top: 6px;
  opacity: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* Immer sichtbare Beschriftung (unter dem Bild, kein Hover) — Mobile Fallback */
.work-grid__caption {
  padding: 16px 0 4px;
  display: none;
}

.work-grid__caption-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--dark);
}

.work-grid__caption-sub {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--light-gray);
}

.footer__copy {
  font-size: 0.7rem;
  color: var(--mid-gray);
  letter-spacing: 0.06em;
}

.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer__links a {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-gray);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--dark);
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav {
    padding: 0 20px;
  }

  .nav__logo {
    font-size: 1.05rem;
  }

  /* Lang toggle ausblenden wenn Burger aktiv */
  .nav__right {
    gap: 16px;
  }

  .nav__links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 99;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    font-size: 0.9rem;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.75);
    padding: 8px 0; /* größere Touch-Fläche */
  }

  .nav__links a:hover {
    color: #ffffff;
  }

  .nav__burger {
    display: flex;
    z-index: 101;
  }

  /* Hero auf Mobile */
  .hero {
    min-height: 100svh;
  }

  .hero__content {
    padding: 0 20px;
  }

  .hero__scroll {
    bottom: 24px;
  }

  /* Sections */
  .section {
    padding: 72px 20px;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 32px 20px;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  /* Page Header */
  .page-header {
    padding: calc(var(--nav-height) + 48px) 20px 40px;
  }

  /* Work Grid: 1 Spalte auf Mobile */
  .work-grid {
    padding: 32px 0 80px;
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .work-grid__item:last-child:nth-child(3n - 2),
  .work-grid__item:last-child:nth-child(3n - 1) {
    grid-column: span 1;
  }

  .work-grid__item::before,
  .work-grid__item:last-child:nth-child(3n - 2)::before,
  .work-grid__item:last-child:nth-child(3n - 1)::before {
    padding-top: 110%;
  }

  /* Auf Mobile: Overlay immer halb sichtbar, Caption unterhalb */
  .work-grid__overlay {
    background: rgba(13, 13, 11, 0.35);
  }

  .work-grid__title,
  .work-grid__subtitle {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
