/* Reset, typography, layout primitives, header, footer, buttons */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.65 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--on-dark); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: .6rem 1rem;
  background: var(--text);
  color: var(--on-dark);
  font-weight: 500;
}
.skip-link:focus { top: .75rem; color: var(--on-dark); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .75em 1.4em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out), color .3s var(--ease-out), transform .3s var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: var(--on-dark); }
.btn--primary:hover { background: var(--accent); color: var(--on-dark); }
.btn--ghost { border-color: var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--on-dark); }
.btn--small { min-height: 40px; padding: .5em 1.1em; font-size: var(--step--1); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--text); }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out);
}
.site-header.is-scrolled,
.nav-open .site-header {
  background: var(--bg);
  border-color: var(--line);
}
.site-header__inner {
  height: 100%;
  width: min(100% - 2 * var(--gutter), 1400px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

.logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--text);
  border-radius: 50%;
  font: 500 .8rem/1 var(--font-mono);
  letter-spacing: .04em;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.logo:hover { color: var(--text); }
.logo:hover .logo__mark { background: var(--text); color: var(--on-dark); }
.logo__name { font-weight: 500; letter-spacing: -.01em; }

.nav__list { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.nav__list a {
  position: relative;
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  transition: color .3s var(--ease-out);
}
.nav__list a:hover, .nav__list a[aria-current] { color: var(--text); }
.nav__list a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
}
.nav__extra { display: none; }

.site-header__actions { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child  { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child  { top: 21px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .logo__name, .hide-mobile { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    background: var(--bg);
    padding: var(--space-l) var(--gutter);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease-out), visibility 0s .35s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transition: opacity .35s var(--ease-out); }
  .nav-open { overflow: hidden; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    display: block;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line);
    font: 400 var(--step-2)/1.2 var(--font-display);
    color: var(--text);
  }
  .nav__list a[aria-current]::after { display: none; }
  .nav__list a[aria-current] { color: var(--accent); }
  .nav__extra { display: block; }
}
/* Without JavaScript the toggle cannot work: hide it, the page stays fully reachable by scrolling */
@media (max-width: 960px) { html:not(.js) .nav-toggle { display: none; } }

/* "Effekte aus" switch */
.fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 40px;
  padding: 0 .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: var(--step--1);
  color: var(--muted);
  cursor: pointer;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.fx-toggle:hover { color: var(--text); border-color: var(--text); }
.fx-toggle[aria-pressed="true"] svg { color: var(--text); }
html:not(.js) .fx-toggle { display: none; }
@media (max-width: 1180px) {
  .fx-toggle { width: 40px; padding: 0; justify-content: center; }
  .fx-toggle__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Lenis smooth scrolling takes over from the browser's own smooth scrolling */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* Privacy notice (bottom left, small, never covers the navigation) */
.privacy-note {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 70;
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.privacy-note.is-visible { opacity: 1; transform: none; }
.privacy-note__title { font: 400 var(--step-1)/1.2 var(--font-display); }
.privacy-note__text { margin-top: .35rem; font-size: var(--step--1); color: var(--muted); }
.privacy-note__ok { margin-top: .8rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--space-m); font-size: var(--step--1); color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-m); justify-content: space-between; align-items: center; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

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