/* ============================================================
   Mitzscherlich — Startseite Entwurf B: „Die klare Linie"
   Helle Gegenthese zu Entwurf A: Tageslicht, Grotesk, Goldfaden.
   ============================================================ */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/newsreader-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/newsreader-italic-latin.woff2') format('woff2');
}

:root {
  --bone: #faf8f3;
  --white: #ffffff;
  --sand: #efebe2;
  --ink: #131a1d;
  --ink-soft: #2a3438;
  --muted: #5a625f;
  --brass: #a3854e;
  --brass-deep: #8a6f3e;
  --champagne: #e2cf9f;
  --line: rgba(19, 26, 29, 0.12);
  --line-strong: rgba(19, 26, 29, 0.3);
  --aqua: rgba(151, 186, 180, 0.18);

  --font-display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(88px, 12vw, 150px);
  --header-h: 84px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.03rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

::selection {
  background: var(--champagne);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.875rem;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- Typografie ---------- */

.display-1 {
  font-size: clamp(2.7rem, 7vw, 5.9rem);
  font-weight: 620;
  font-stretch: 94%;
  line-height: 1.01;
  letter-spacing: -0.034em;
  text-wrap: balance;
}

.display-2 {
  font-size: clamp(1.95rem, 4vw, 3.2rem);
  font-weight: 600;
  font-stretch: 95%;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.display-1 em,
.display-2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 360;
  font-stretch: 100%;
  letter-spacing: -0.012em;
}

.kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}

p {
  color: var(--muted);
}

.copy-lg {
  font-size: 1.14rem;
  line-height: 1.75;
}

.note {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- Layout ---------- */

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

.section {
  position: relative;
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) - 8px);
}

.section--white {
  background: var(--white);
}

.section-head {
  display: grid;
  gap: 22px;
  max-width: 780px;
  margin-bottom: clamp(44px, 6vw, 72px);
}

/* Leitlinie: feine Linie mit Knoten am linken Rand jeder Sektion */

@media (min-width: 1140px) {
  .rail .container {
    position: relative;
  }

  .rail .container::before {
    content: '';
    position: absolute;
    left: -56px;
    top: 10px;
    bottom: calc(-1 * var(--section-y) + 20px);
    width: 1px;
    background: linear-gradient(180deg, var(--brass) 0%, rgba(163, 133, 78, 0.25) 100%);
    transform-origin: top;
  }

  .rail .container::after {
    content: '';
    position: absolute;
    left: -59.5px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brass);
  }

  .rail--last .container::before {
    bottom: 40%;
  }

  @supports (animation-timeline: view()) {
    .rail .container::before {
      animation: rail-draw linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
  }
}

@keyframes rail-draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ink {
  background: var(--ink);
  color: var(--bone);
}

.btn--ink:hover {
  background: var(--ink-soft);
  color: var(--champagne);
}

.btn--line {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--line:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bone);
}

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink);
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.header--hidden {
  transform: translateY(-100%);
}

.header--solid {
  background: rgba(250, 248, 243, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.menu-open .header {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: none;
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1;
}

.brand__mark {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__sub {
  font-size: 0.585rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.62;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 38px);
}

.nav__link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav__link:hover {
  opacity: 1;
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__link--muted {
  opacity: 0.5;
}

.nav .btn {
  min-height: 46px;
  padding: 0 22px;
  font-size: 0.875rem;
}

/* ---------- Mobiles Menü ---------- */

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}

.nav-toggle span:nth-child(1) {
  top: 18px;
}

.nav-toggle span:nth-child(2) {
  top: 26px;
}

.menu-open .nav-toggle span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.menu-open .nav-toggle span:nth-child(2) {
  top: 22px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 16px) var(--gutter) 48px;
  background: var(--bone);
  color: var(--ink);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), visibility 0s linear 0.4s;
}

.menu-open .menu {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.4s var(--ease-out);
}

.menu-open {
  overflow: hidden;
}

.menu__links {
  display: grid;
  gap: 8px;
}

.menu__link {
  font-size: clamp(2rem, 8vw, 2.9rem);
  font-weight: 620;
  font-stretch: 94%;
  letter-spacing: -0.03em;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.25s;
}

.menu__link:hover {
  color: var(--brass-deep);
}

.menu-open .menu__link {
  opacity: 1;
  transform: none;
}

.menu-open .menu__link:nth-child(2) { transition-delay: 0.05s; }
.menu-open .menu__link:nth-child(3) { transition-delay: 0.1s; }
.menu-open .menu__link:nth-child(4) { transition-delay: 0.15s; }
.menu-open .menu__link:nth-child(5) { transition-delay: 0.2s; }

.menu__foot {
  margin-top: clamp(36px, 8vh, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.menu__foot a:hover {
  color: var(--brass-deep);
}
