:root {
  --cream: #f1ede4;
  --cream-2: #ece7db;
  --ink: #201d18;
  --ink-soft: #4a453c;
  --line: rgba(32, 29, 24, 0.12);
  --nav-h: 4.5rem;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

/* Nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  --nav-font-size: 0.85rem;
}

/* .nav__bar carries the translucent glass background. .nav__links (the
   mobile dropdown) gets its own identical background instead of nesting
   inside this element — Safari doesn't reliably render backdrop-filter
   when it's nested inside another backdrop-filter element. */
.nav__bar {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(241, 237, 228, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav__brand {
  font-size: var(--nav-font-size);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav__links {
  position: absolute;
  top: 0;
  right: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  height: 100%;
  font-size: var(--nav-font-size);
}

.nav__links__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.nav__links a {
  display: grid;
  justify-items: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav__links a .nav__label {
  grid-area: 1 / 1;
  transition: font-weight 0.2s ease;
}

.nav__links a::after {
  content: attr(data-label);
  grid-area: 1 / 1;
  font-weight: 600;
  visibility: hidden;
  pointer-events: none;
}

.nav__links a:hover,
.nav__links a.is-active {
  opacity: 1;
  font-weight: 600;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* Layout: sticky image rail (left) + scrolling text column (right) */

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.rail__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.07);
  filter: blur(18px);
  transition:
    opacity 1.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 1.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.rail__img.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  z-index: 1;
}

.rail__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.rail__gl.is-ready {
  opacity: 1;
  z-index: 2;
}

/* paper texture runs continuously behind the whole text column */
.content-col {
  background-color: var(--cream);
  background-image: url("../images/paper-texture.jpg");
  background-repeat: repeat;
  background-size: 500px auto;
  padding-top: var(--nav-h);
}

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5.5rem);
  scroll-margin-top: var(--nav-h);
}

.panel__mobile-image {
  display: none;
}

.panel__inner {
  max-width: 40rem;
}

/* Typography */

.name {
  margin: 0 0 0.5rem;
  line-height: 1;
}

.name img {
  display: block;
  height: clamp(1.25rem, 2.15vw, 1.75rem);
  width: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.welcome {
  font-size: clamp(1rem, 3vw, 1.50rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}

.role {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 2.75rem;
}

.eyebrow {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

.prose p {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 1.4rem;
}

.prose h3 {
  font-weight: 400;
  font-size: 1.15rem;
  margin: 2.25rem 0 1rem;
}

.prose a {
  text-decoration: none;
}

.prose + .prose {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.prose--contact p {
  font-size: 1rem;
}

/* Legal pages (Impressum, Datenschutz) — single text column, no rail */

.legal {
  background-color: var(--cream);
  background-image: url("../images/paper-texture.jpg");
  background-repeat: repeat;
  background-size: 500px auto;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.legal__inner {
  max-width: 44rem;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 6vw, 5.5rem) 4rem;
}

.legal h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 2.5rem;
}

.legal h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2.5rem 0 0.85rem;
}

.legal h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}

.legal p,
.legal li {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 2rem clamp(1.5rem, 6vw, 5.5rem);
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--cream);
}

.footer p {
  margin: 0;
}

.footer__links {
  display: flex;
  gap: 1.25rem;
}

.footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Responsive: rail becomes a normal in-flow image per panel */

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .rail {
    display: none;
  }

  .panel {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 4rem;
  }

  .panel__mobile-image {
    display: block;
    height: 60vh;
    background-size: cover;
    background-position: center;
  }

  .panel__inner {
    max-width: none;
    padding: 3rem 1.5rem 0;
  }

  .nav {
    --nav-font-size: 0.85rem;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto;
    display: grid;
    grid-template-rows: 0fr;
    background: rgba(241, 237, 228, 0.32);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    visibility: hidden;
    transition: grid-template-rows 0.25s ease, visibility 0.25s;
  }

  .nav__links.is-open {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  .nav__links__inner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0.5rem clamp(1.25rem, 4vw, 3rem) 1.25rem;
  }

  .nav__links a {
    justify-items: start;
    width: 100%;
    padding: 0.75rem 0;
  }
}
