:root {
  --bg: #171717;
  --bg-secondary: #2B2D31;
  --text: #E8E6E3;
  --primary: #B46A3C;
  --accent: #D97745;
  --highlight: #3AAFA9;
  --border: #5E646D;
  --muted: rgba(232, 230, 227, 0.72);
  --soft: rgba(232, 230, 227, 0.08);
  --shadow: rgba(0, 0, 0, 0.36);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(100% - 32px, 1160px);
  margin-inline: auto;
}

.section {
  scroll-margin-top: 92px;
}

/* Sticky header and mobile-first navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(23, 23, 23, 0.84);
  border-bottom: 1px solid rgba(94, 100, 109, 0.45);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#groeg-svg {
  width: 72px;
  height: auto;
  color: var(--text);
  filter: drop-shadow(0 0 18px rgba(58, 175, 169, 0.2));
}

#groeg-svg path:not([fill]) {
  fill: currentColor;
}

#groeg-svg path[fill] {
  fill: var(--highlight);
}

.nav-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 5px;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(94, 100, 109, 0.62);
  border-radius: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  position: fixed;
  inset: 72px 0 auto;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 22px 16px 28px;
  list-style: none;
  background: rgba(23, 23, 23, 0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 50px var(--shadow);
  transform: translateY(-125%);
  transition: transform 220ms ease;
}

.nav-list.is-open {
  transform: translateY(0);
}

.nav-link {
  display: block;
  padding: 12px 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--highlight);
  text-shadow: 0 0 18px rgba(58, 175, 169, 0.55);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 72px);
  overflow: hidden;
  border-bottom: 1px solid rgba(94, 100, 109, 0.55);
}

/* Museum-like opening stage with a dark image overlay for text contrast */
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.9) 0%, rgba(23, 23, 23, 0.72) 54%, rgba(23, 23, 23, 0.38) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(23, 23, 23, 0) 34%),
    url("bilder/bg_startseite.jpg") center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  align-self: end;
  padding-block: 112px 74px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--highlight);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 12vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  color: #161616;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 1px solid rgba(217, 119, 69, 0.72);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(180, 106, 60, 0.34), 0 12px 28px var(--shadow);
}

.button-ghost {
  color: var(--text);
  background: rgba(43, 45, 49, 0.54);
  border-color: rgba(94, 100, 109, 0.76);
}

.button-ghost:hover {
  box-shadow: 0 0 24px rgba(58, 175, 169, 0.22), 0 12px 28px var(--shadow);
  border-color: var(--highlight);
}

.about,
.works,
.events,
.contact {
  padding-block: 84px;
}

/* Reusable editorial blocks */
.two-column {
  display: grid;
  gap: 36px;
}

.copy-stack {
  color: var(--muted);
  font-size: 1.02rem;
}

.copy-stack strong {
  color: var(--text);
}

.vita-grid {
  display: grid;
  gap: 1px;
  margin-top: 56px;
  overflow: hidden;
  border: 1px solid rgba(94, 100, 109, 0.6);
  background: rgba(94, 100, 109, 0.5);
}

.vita-grid article {
  padding: 26px;
  background: rgba(43, 45, 49, 0.58);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.vita-grid article:hover {
  background: rgba(43, 45, 49, 0.88);
  box-shadow: inset 0 0 0 1px rgba(58, 175, 169, 0.28);
}

.vita-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.vita-grid p,
.event-card p,
.contact p {
  margin-bottom: 0;
  color: var(--muted);
}

.section-head {
  margin-bottom: 36px;
}

.gallery {
  display: grid;
  grid-auto-flow: dense;
  gap: 12px;
}

/* Dense responsive image grid with subtle gallery interactions */
.gallery-item {
  position: relative;
  min-height: 260px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid rgba(94, 100, 109, 0.55);
  border-radius: 4px;
  cursor: zoom-in;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(23, 23, 23, 0.08), rgba(23, 23, 23, 0.72));
  opacity: 0.78;
  transition: opacity 200ms ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease, filter 360ms ease;
}

.gallery-item span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-item:hover {
  border-color: rgba(58, 175, 169, 0.72);
  box-shadow: 0 0 28px rgba(58, 175, 169, 0.16);
}

.gallery-item:hover::after {
  opacity: 0.46;
}

.gallery-item:hover img {
  filter: saturate(1.12) contrast(1.08);
  transform: scale(1.045);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

/* Events stay readable as cards on mobile and timeline rows on wider screens */
.event-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(43, 45, 49, 0.5);
  border: 1px solid rgba(94, 100, 109, 0.56);
  border-radius: 4px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.event-card:hover,
.event-card.is-current {
  border-color: rgba(180, 106, 60, 0.72);
  box-shadow: 0 0 26px rgba(180, 106, 60, 0.13);
}

.event-card:hover {
  transform: translateY(-2px);
}

.event-card time {
  color: var(--highlight);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact {
  background: linear-gradient(180deg, transparent, rgba(43, 45, 49, 0.34));
  border-top: 1px solid rgba(94, 100, 109, 0.48);
}

/* Contact form uses mailto behavior from script.js, no backend required */
.contact-grid {
  display: grid;
  gap: 36px;
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(43, 45, 49, 0.58);
  border: 1px solid rgba(94, 100, 109, 0.62);
  border-radius: 4px;
}

.contact-panel > a {
  width: max-content;
  max-width: 100%;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.contact-panel > a:hover {
  color: var(--highlight);
  text-shadow: 0 0 16px rgba(58, 175, 169, 0.48);
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  color: var(--text);
  background: rgba(23, 23, 23, 0.72);
  border: 1px solid rgba(94, 100, 109, 0.7);
  border-radius: 4px;
  padding: 12px 13px;
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(58, 175, 169, 0.16);
}

.site-footer {
  border-top: 1px solid rgba(94, 100, 109, 0.52);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  justify-content: space-between;
  padding-block: 26px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner div {
  display: flex;
  gap: 18px;
}

.footer-inner a {
  transition: color 180ms ease;
}

.footer-inner a:hover {
  color: var(--highlight);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 7, 7, 0.9);
  backdrop-filter: blur(14px);
}

/* Lightbox is intentionally simple: one focused image, one caption, one escape route */
.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  width: min(100%, 1080px);
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid rgba(94, 100, 109, 0.65);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.lightbox figcaption {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  background: rgba(43, 45, 49, 0.78);
  border: 1px solid rgba(94, 100, 109, 0.78);
  border-radius: 4px;
  cursor: pointer;
}

@media (min-width: 700px) {
  .shell {
    width: min(100% - 56px, 1160px);
  }

  .vita-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  .gallery-item {
    grid-column: span 3;
    min-height: 300px;
  }

  .gallery-item.wide {
    grid-column: span 6;
  }

  .gallery-item.tall {
    grid-row: span 2;
    min-height: 612px;
  }

  .event-card {
    grid-template-columns: 130px 1fr;
    padding: 26px 30px;
  }
}

@media (min-width: 920px) {
  .nav-toggle {
    display: none;
  }

  .nav-list {
    position: static;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
  }

  .nav-link {
    padding: 8px 0;
  }

  .hero-content {
    padding-block: 150px 92px;
  }

  .two-column,
  .contact-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    gap: 72px;
  }

  .about,
  .works,
  .events,
  .contact {
    padding-block: 118px;
  }

  .gallery-item {
    grid-column: span 2;
  }

  .gallery-item.wide {
    grid-column: span 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
