/* ============================================================
   ULRICH CHRISTOPH EIPPER — STIFTUNG
   Redesign — Moderno & Delicado
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Jost:wght@200;300;400;500&display=swap');

/* --- Custom Properties --- */
:root {
  --canvas:       #F8F5F0;
  --canvas-dark:  #F0EDE7;
  --ink:          #201E1B;
  --ink-mid:      #3D3A36;
  --ink-light:    #6B6560;
  --accent:       #7D6248;
  --accent-light: #A08468;
  --line:         #E0D8CE;
  --nav-bg:       rgba(20, 18, 15, 0.97);

  --ff-serif: 'Cormorant Garant', Georgia, serif;
  --ff-sans:  'Jost', system-ui, -apple-system, sans-serif;

  --max-w:  1280px;
  --nav-h:  68px;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-o: cubic-bezier(0, 0, 0.2, 1);
}

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

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

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* --- Section Tag --- */
.tag {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* --- Section Title --- */
.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  border: none;
  background: none;
}

.btn--outline {
  border: 1px solid var(--ink);
  padding: 1rem 2.25rem;
  color: var(--ink);
}
.btn--outline:hover {
  background: var(--ink);
  color: var(--canvas);
}

.btn--outline-light {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 1rem 2.25rem;
  color: rgba(255,255,255,0.85);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.65);
  color: #fff;
}

.btn--text {
  color: var(--accent);
  gap: 0.5rem;
  padding: 0;
}
.btn--text:hover {
  color: var(--ink);
  gap: 0.875rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3.5rem);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.nav__brand a {
  font-family: var(--ff-serif);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.nav__brand a:hover { color: #fff; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
}

.nav__links > li { position: relative; }

.nav__links > li > a {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.nav__links > li > a:hover,
.nav__links > li.active > a {
  color: rgba(255,255,255,0.95);
}

/* Dropdown */
.dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 1.25rem);
  left: -1.25rem;
  background: var(--nav-bg);
  border-top: 1px solid var(--accent);
  min-width: 190px;
  list-style: none;
  padding: 0.625rem 0;
  transform: translateY(0.5rem);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.has-dropdown:hover .dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 0.65rem 1.375rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s, padding-left 0.25s var(--ease);
}
.dropdown li a:hover {
  color: rgba(255,255,255,0.9);
  padding-left: 1.625rem;
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.8);
  transition: all 0.35s var(--ease);
  transform-origin: center;
}
/* En páginas internas (scrolled desde PHP) las líneas son siempre visibles */
.nav.scrolled .nav__toggle span {
  background: rgba(255,255,255,0.9);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.06);
  transition: transform 10s var(--ease-o);
}

.hero.loaded .hero__img {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(20,18,15,0.1) 0%,
    rgba(20,18,15,0.25) 40%,
    rgba(20,18,15,0.72) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 8vw, 6rem) clamp(2rem, 6vw, 5rem);
  padding-top: calc(var(--nav-h) + 2rem);
  max-width: 820px;
}

.hero__label {
  display: block;
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(5rem, 13vw, 10rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 2.75rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding-bottom: 0.3rem;
  transition: all 0.35s var(--ease);
}
.hero__cta:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
  gap: 1.25rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2.75rem;
  right: clamp(2rem, 5vw, 4.5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero__scroll-label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  width: 1px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  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.65);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ============================================================
   QUOTE SECTION
   ============================================================ */
.quote-section {
  padding: clamp(5rem, 12vw, 10rem) 0;
  border-bottom: 1px solid var(--line);
}

.quote {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  font-style: normal;
}

.quote__text {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-bottom: 2.25rem;
}

.quote__line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 1.5rem;
}

.quote__cite {
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: normal;
}

/* ============================================================
   GALLERY PREVIEW
   ============================================================ */
.gallery-preview {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-bottom: 1px solid var(--line);
}

.gallery-preview .section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0.625rem;
  aspect-ratio: 16/9;
}

/* Items: 5 visible on homepage */
.g-item {
  position: relative;
  overflow: hidden;
  display: block;
  background: var(--canvas-dark);
}

.g-item:nth-child(1) { grid-column: 1 / 6;  grid-row: 1 / 3; }
.g-item:nth-child(2) { grid-column: 6 / 9;  grid-row: 1; }
.g-item:nth-child(3) { grid-column: 9 / 13; grid-row: 1; }
.g-item:nth-child(4) { grid-column: 6 / 10; grid-row: 2; }
.g-item:nth-child(5) { grid-column: 10 / 13; grid-row: 2; }

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-o);
}
.g-item:hover img { transform: scale(1.05); }

.g-item__info {
  position: absolute;
  inset: 0;
  background: rgba(20,18,15,0);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: background 0.4s var(--ease);
}
.g-item:hover .g-item__info { background: rgba(20,18,15,0.32); }

.g-item__label {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.35s var(--ease);
}
.g-item:hover .g-item__label { opacity: 1; transform: translateY(0); }

.gallery-preview .btn { margin-top: 2.5rem; }

/* ============================================================
   BIOGRAPHY TEASER
   ============================================================ */
.bio-teaser {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-bottom: 1px solid var(--line);
}

.bio-teaser__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.bio-teaser__image-wrap {
  position: relative;
}

.bio-teaser__image-wrap::before {
  content: '';
  position: absolute;
  top: -1.75rem;
  left: -1.75rem;
  right: 1.75rem;
  bottom: 1.75rem;
  border: 1px solid var(--line);
  z-index: 0;
}

.bio-teaser__image-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top center;
}

.bio-teaser__text h2 {
  font-family: var(--ff-serif);
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 1.75rem;
}

.bio-teaser__text p {
  color: var(--ink-light);
  line-height: 1.85;
  max-width: 500px;
  font-size: 1.0625rem;
}

/* ============================================================
   FOUNDATION SECTION
   ============================================================ */
.foundation-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--ink);
}

.foundation-section .tag { color: var(--accent-light); }
.foundation-section .section-title { color: rgba(255,255,255,0.9); }

.foundation-section .section-header { margin-bottom: 2rem; }

.foundation-text {
  max-width: 660px;
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  font-size: 1.0625rem;
  margin-bottom: 3rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2.75rem clamp(1.5rem, 5vw, 4rem);
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__brand-name {
  font-family: var(--ff-serif);
  font-size: 1.125rem;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  display: block;
}

.footer__brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  display: block;
  margin-top: 0.25rem;
}

.footer__nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__nav a {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s;
}
.footer__nav a:hover { color: rgba(255,255,255,0.75); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-h) + 5rem) clamp(1.5rem, 5vw, 4rem) 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.page-header .page-title {
  font-family: var(--ff-serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 0.75rem;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */

/* Filter bar */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: var(--max-w);
  margin: 0 auto 2.5rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.filter-btn {
  font-family: var(--ff-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20,18,15,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
  padding: 2rem;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
  padding: 0.25rem 0.5rem;
}
.lightbox-close:hover { color: #fff; }

.lightbox__inner {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  max-height: 90vh;
  max-width: calc(100vw - 160px); /* espacio para botones prev/next */
}
.lightbox__img-wrap {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.lightbox-img {
  max-height: 80vh;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.lightbox__details {
  flex: 0 0 240px;
  color: rgba(255,255,255,0.9);
  padding-top: 0.5rem;
  overflow-y: auto;
  max-height: 80vh;
}

/* Imágenes panorámicas: layout vertical */
.lightbox.panoramic .lightbox__inner {
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  overflow-y: auto;
  max-height: 90vh;
}
.lightbox.panoramic .lightbox-img {
  max-height: 60vh;
  max-width: calc(100vw - 160px);
}
.lightbox.panoramic .lightbox__details {
  flex: none;
  width: 100%;
  max-width: 680px;
  max-height: none;
  text-align: center;
}
.lightbox.panoramic .lightbox__meta-row {
  justify-content: center;
}
.lightbox__year {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 0 0 0.5rem;
}
.lightbox__title {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 1.75rem;
  color: #fff;
}
.lightbox__meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lightbox__meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.lightbox__meta-label {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.lightbox__meta-row span:last-child {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
}

.gallery-page {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 9rem);
}

/* Work count */
.gallery-count {
  max-width: var(--max-w);
  margin: 0 auto 1.25rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.gallery-masonry {
  columns: 4;
  column-gap: 0.625rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* Pagination */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 4rem clamp(1.5rem, 5vw, 4rem) 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.gallery-pagination__btn {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
  transition: color 0.2s, border-color 0.2s;
}
.gallery-pagination__btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.gallery-pagination__pages {
  display: flex;
  gap: 0.5rem;
}
.gallery-pagination__page {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--ink-light);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.gallery-pagination__page:hover { color: var(--ink); border-color: var(--line); }
.gallery-pagination__page.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.gallery-masonry__item {
  break-inside: avoid;
  margin-bottom: 0.625rem;
  position: relative;
  overflow: hidden;
  display: block;
  background: var(--canvas-dark);
}

.gallery-masonry__item img {
  width: 100%;
  display: block;
  transition: transform 0.8s var(--ease-o);
}
.gallery-masonry__item:hover img { transform: scale(1.04); }

.gallery-masonry__item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,18,15,0);
  transition: background 0.4s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.gallery-masonry__item:hover .gallery-masonry__item__overlay {
  background: rgba(20,18,15,0.3);
}

/* ============================================================
   BIOGRAPHY PAGE
   ============================================================ */
.bio-page {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 9rem);
}

.bio-page__grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: clamp(3rem, 7vw, 7rem);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.bio-page__portrait {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.bio-page__portrait img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
}

.timeline {
  margin: 2.5rem 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: none; }

.timeline__year {
  font-family: var(--ff-serif);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}

.timeline__desc {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.65;
}

.bio-page__text h3 {
  font-family: var(--ff-serif);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2.5rem 0 0.875rem;
}

.bio-page__text p {
  color: var(--ink-light);
  line-height: 1.85;
  font-size: 1.0625rem;
}

.bio-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.bio-skill {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.375rem 0.875rem;
}

/* ============================================================
   STIFTUNG PAGE
   ============================================================ */

/* Subnav sticky */
.stiftung-subnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.stiftung-subnav .container {
  padding-top: 0;
  padding-bottom: 0;
}

.stiftung-subnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.stiftung-subnav ul::-webkit-scrollbar { display: none; }

.stiftung-subnav a {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.stiftung-subnav a:hover,
.stiftung-subnav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.stiftung-page {
  padding: 0;
}

.stiftung-intro {
  max-width: 760px;
  margin: 0 auto clamp(4rem, 8vw, 7rem);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.stiftung-intro p {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--ink-mid);
  line-height: 1.8;
}

.stiftung-areas {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.stiftung-areas__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  margin-bottom: 4rem;
}

.stiftung-area {
  padding: 2.5rem 2rem;
  background: var(--canvas-dark);
  border-top: 2px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.stiftung-area:hover {
  border-color: var(--accent);
  background: var(--canvas);
}

.stiftung-area__number {
  font-family: var(--ff-serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--line);
  line-height: 1;
  margin-bottom: 1.25rem;
}

.stiftung-area h3 {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.stiftung-area p {
  font-size: 0.9375rem;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s var(--ease-o), transform 0.9s var(--ease-o);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .g-item:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 3; }
  .g-item:nth-child(2) { grid-column: 4 / 7; grid-row: 1; }
  .g-item:nth-child(3) { grid-column: 4 / 7; grid-row: 2; }
  .g-item:nth-child(4) { grid-column: 1 / 4; grid-row: 3; aspect-ratio: 16/9; }
  .g-item:nth-child(5) { grid-column: 4 / 7; grid-row: 3; }

  .gallery-masonry { columns: 3; }
  .stiftung-areas__grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox__inner { flex-direction: column; }
  .lightbox__details { flex: none; width: 100%; }
  .lightbox-img { max-height: 55vh; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    padding: calc(var(--nav-h) + 1.5rem) clamp(1.5rem, 5vw, 3rem) 2rem;
    gap: 0;
    overflow-y: auto;
    z-index: 999;
  }
  .nav__links.open > li > a {
    display: block;
    padding: 1.125rem 0;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .dropdown {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border-top: none;
    background: none;
    padding: 0.375rem 0 0.375rem 1.25rem;
    display: none;
  }
  .has-dropdown.open-sub .dropdown { display: block; }
  .nav__toggle { display: flex; }

  .bio-teaser__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .bio-teaser__image-wrap::before { display: none; }
  .bio-teaser__image-wrap img { max-width: 380px; }

  .bio-page__grid { grid-template-columns: 1fr; }
  .bio-page__portrait { position: static; max-width: 360px; }
}

/* ── Stiftung responsive grids ─────────────────────────────── */
.st-grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(3rem, 7vw, 8rem);
  max-width: 1100px;
}
.st-grid-1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 8rem);
  max-width: 1100px;
}
.st-grid-stifterin {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  max-width: 1100px;
}

@media (max-width: 860px) {
  .st-grid-1-2,
  .st-grid-1-1,
  .st-grid-stifterin {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .st-grid-stifterin img {
    max-height: 320px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .gallery-masonry { columns: 2; }
  .stiftung-areas__grid { grid-template-columns: 1fr; }

  .g-item:nth-child(1) { grid-column: 1 / 7; grid-row: 1; aspect-ratio: 1; }
  .g-item:nth-child(2) { grid-column: 1 / 4; grid-row: 2; }
  .g-item:nth-child(3) { grid-column: 4 / 7; grid-row: 2; }
  .g-item:nth-child(4) { grid-column: 1 / 7; grid-row: 3; aspect-ratio: 16/9; }
  .g-item:nth-child(5) { display: none; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__nav { gap: 1.5rem; }
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
  font-family: var(--ff-sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--accent);
}

.form-field--error input,
.form-field--error textarea {
  border-bottom-color: #c0392b;
}

.form-error {
  font-size: 0.8125rem;
  color: #c0392b;
  margin-top: 0.2rem;
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 3rem 2.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card__img-link {
  display: block;
  overflow: hidden;
}

.blog-card__img {
  height: 240px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s var(--ease);
}

.blog-card__img-link:hover .blog-card__img {
  transform: scale(1.04);
}

.blog-card__body {
  padding: 1.5rem 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__date {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.blog-card__title {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--accent);
}

.blog-card__excerpt {
  color: var(--ink-light);
  font-size: 0.9375rem;
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.25rem;
}

.blog-card__more {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  align-self: flex-start;
}

.blog-card__more:hover {
  opacity: 0.7;
}

/* Article body */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--ink);
}

.article-body h2 {
  font-family: var(--ff-serif);
  font-size: 1.875rem;
  font-weight: 300;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
}

.article-body h3 {
  font-family: var(--ff-serif);
  font-size: 1.375rem;
  font-weight: 300;
  margin: 2rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-light);
}

/* ============================================================
   LEGAL PAGES (Impressum, Datenschutz)
   ============================================================ */
.legal-text {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
}

.legal-text h2 {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 300;
  margin: 2.5rem 0 0.75rem;
  color: var(--ink);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.legal-text p {
  margin-bottom: 1.25rem;
  color: var(--ink-light);
}

.legal-text strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── Lightbox nav (slider) ─────────────────────────────────── */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lightbox-nav:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox__counter {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

@media (max-width: 680px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ── Stiftung Aktivitäten row ──────────────────────────────── */
.st-aktivitaet {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) {
  .st-aktivitaet {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.lightbox__description {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  line-height: 1.75;
  font-style: italic;
}
