/* SECTION: Design Tokens */
:root {
  /* Color palette */
  --color-bg: #f7f5f1;
  --color-surface: #fbfaf7;
  --color-surface-alt: #f0ebe2;
  --color-nav-bg: #f3eee5;
  --color-border-subtle: #e0d7c7;
  --color-border-strong: #c6b9a3;
  --color-text-main: #221b16;
  --color-text-muted: #6d6255;
  --color-accent: #c4803a;
  --color-accent-soft: #7b9a6d;
  --color-accent-strong: #8d4b1f;
  --color-note-bg: #f0ebe2;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Libre Baskerville", "Georgia", serif;

  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.08rem;
  --fs-lg: 1.3rem;
  --fs-xl: 1.9rem;
  --fs-xxl: 2.4rem;

  --lh-tight: 1.3;
  --lh-normal: 1.7;
  --lh-relaxed: 1.9;

  /* Layout */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-soft: 0 14px 35px rgba(24, 18, 7, 0.12);
  --shadow-subtle: 0 10px 22px rgba(24, 18, 7, 0.08);

  --transition-fast: 0.18s ease-out;
  --transition-med: 0.26s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, #fffaf4, #f3eee5 55%, #ebe4d8 100%);
  color: var(--color-text-main);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

/* SECTION: Scroll Progress Bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft));
  z-index: 9999;
  transform-origin: left;
}

/* SECTION: Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: rgba(243, 238, 229, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(198, 185, 163, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo img {
  height: 30px;
}

.logo span {
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* SECTION: Language Switcher */
.lang-switcher {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(198, 185, 163, 0.7);
  box-shadow: 0 1px 3px rgba(24, 18, 7, 0.1);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.22rem 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(244, 237, 227, 0.9);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-soft));
  color: #fdf9f4;
  transform: translateY(-0.5px);
}

/* SECTION: Burger */
.burger {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--color-accent-strong);
  cursor: pointer;
  padding: 0.1rem 0.1rem 0.1rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.burger:hover {
  transform: scale(1.08);
  color: var(--color-accent);
}

/* SECTION: Navigation / Sidebar */
.site-nav {
  position: fixed;
  inset: 48px 0 0 0;
  transform: translateX(-100%);
  transition: transform var(--transition-med);
  background: linear-gradient(180deg, rgba(243, 238, 229, 0.96), rgba(236, 229, 217, 0.96));
  backdrop-filter: blur(14px);
  z-index: 900;
}

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent 55%);
  pointer-events: none;
}


.site-nav.open {
  transform: translateX(0);
}

.nav-inner {
  height: 100%;
  padding: 1.4rem 1.3rem 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(198, 185, 163, 0.6);
}

.nav-brand img {
  height: 34px;
}

.nav-title {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
}

.nav-subtitle {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.nav-lang-switcher {
  margin-top: 0.2rem;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 2px solid rgba(196, 128, 58, 0.5);
  background: transparent;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.nav-list a + a {
  border-top: 1px dashed rgba(198, 185, 163, 0.6);
}


.nav-list a:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text-main);
  transform: translateX(3px);
  box-shadow: 0 6px 14px rgba(24, 18, 7, 0.12);
}

.nav-list a:hover::before {
  border-color: var(--color-accent);
}

.nav-list a.is-active {
  background: radial-gradient(circle at left, #fffaf4 0, #f0ebe2 55%, #e4d8c5 100%);
  color: var(--color-text-main);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(24, 18, 7, 0.16);
}

.nav-list a.is-active::before {
  background: var(--color-accent);
  border-color: var(--color-accent-strong);
  transform: scale(1.15);
}


/* SECTION: Main Layout */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.7rem 1.3rem 4rem;
}

.section {
  position: relative;
  margin-bottom: 3.4rem;
  padding: 1.6rem 1.4rem 1.6rem;
  background: radial-gradient(circle at top left, #fffdf9, var(--color-surface));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(224, 215, 199, 0.9);
  scroll-margin-top: 88px;
}

.section::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 185, 163, 0.7), transparent);
  opacity: 0.8;
}

.section:last-of-type::after {
  display: none;
}

.section + .section {
  margin-top: 2.4rem;
}

/* SECTION: Typography */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0 0 0.6rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: #2b2017;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--fs-xxl);
  margin: 0 0 0.6rem;
}

h2 {
  font-size: var(--fs-xl);
  margin: 0 0 0.8rem;
}

h3 {
  font-size: var(--fs-lg);
  margin: 2rem 0 0.4rem;
}

.lead {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

.section-intro {
  font-size: var(--fs-md);
  margin-bottom: 1.2rem;
}

p {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  margin: 0 0 1rem;
}

strong {
  font-weight: 600;
}

/* SECTION: Notes */
.note {
  background: var(--color-note-bg);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.1rem 1.1rem 1.3rem;
  border-left: 4px solid var(--color-accent);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  box-shadow: 0 8px 20px rgba(24, 18, 7, 0.06);
  margin: 1.6rem 0;
}

/* SECTION: Back to Top Button */
.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.6rem;
  z-index: 950;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(198, 185, 163, 0.9);
  background: radial-gradient(circle at top left, #fffdf9, #f3eee5);
  color: var(--color-accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(24, 18, 7, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition-med), transform var(--transition-med), box-shadow var(--transition-fast), background var(--transition-fast);
}

.back-to-top:hover {
  box-shadow: 0 14px 30px rgba(24, 18, 7, 0.24);
  background: radial-gradient(circle at top left, #fffaf4, #efe7da);
}

.back-to-top:active {
  transform: translateY(14px) scale(0.97);
  box-shadow: 0 6px 16px rgba(24, 18, 7, 0.2);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* SECTION: Footer */
footer {
  border-top: 1px solid rgba(198, 185, 163, 0.7);
  background: rgba(243, 238, 229, 0.98);
  padding: 1.4rem 1rem 1.6rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* SECTION: Responsive Layout */
@media (min-width: 880px) {
  body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: radial-gradient(circle at top left, #fffaf4, #f1ebe1 60%, #e3d6c4 100%);
  }

  .site-header {
    display: none;
  }

  .site-nav {
    position: sticky;
    inset: 0;
    transform: none;
    border-right: 1px solid rgba(198, 185, 163, 0.8);
    box-shadow: 8px 0 30px rgba(24, 18, 7, 0.1);
  }

  main {
    padding: 3.3rem 2.9rem 4rem;
  }

  .section {
    padding: 1.8rem 1.9rem 2rem;
  }

  #progress {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  main {
    max-width: 880px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 2.1rem;
  }
}


#backToTop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #5c6ac4, #2fb6ad);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  filter: brightness(1.1);
}

.language-switcher {
  position: fixed;
  left: 1rem;
  bottom: 50%;
  transform: translateY(50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 998;
}

.language-switcher .lang {
  display: block;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #5f6b78;
  border: 1px solid #d8dde6;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.language-switcher .lang:hover {
  color: #5c6ac4;
  border-color: #5c6ac4;
  background: #ffffff;
}

.language-switcher .lang.active {
  color: #ffffff;
  background: linear-gradient(135deg, #5c6ac4, #2fb6ad);
  border-color: transparent;
  cursor: default;
}

/* Mobile: hide or move */
@media (max-width: 768px) {
  .language-switcher {
    left: auto;
    right: 1rem;
    bottom: 5.5rem; /* über Back-to-Top Button */
    flex-direction: row;
  }
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 2rem);
  background: #ffffff;
  border: 1px solid #d8dde6;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 1.2rem 1.4rem;
  z-index: 1000;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-banner p {
  margin: 0 0 0.9rem 0;
  color: #1f2933;
}

.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-btn.accept {
  background: linear-gradient(135deg, #5c6ac4, #2fb6ad);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.cookie-btn.accept:hover {
  opacity: 0.9;
}

.cookie-link {
  font-size: 0.75rem;
  color: #5f6b78;
  text-decoration: underline;
}

/* Mobile Anpassung */
@media (max-width: 480px) {
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-btn.accept {
    width: 100%;
  }

  .cookie-link {
    text-align: center;
  }
}
