@layer reset, tokens, base, layout, components, motion, print;

@property --word-ink {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


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

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

  body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }

  ul, ol { padding: 0; list-style: none; }

  img, svg { display: block; max-inline-size: 100%; }

  img { block-size: auto; }

  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
}


/* Tokens ----------------------------------------------------------------- */

@layer tokens {
  :root {
    color-scheme: light dark;

    /* Heller Modus: mattes Creme. Grüntöne bleiben, nur der Grund wird warm. */
    --bg:         light-dark(oklch(0.96 0.014 88), oklch(0.2 0.012 195));
    --bg-sunken:  light-dark(oklch(0.93 0.019 86), oklch(0.175 0.012 195));
    --ink:        light-dark(oklch(0.24 0.012 195), oklch(0.95 0.006 115));
    --ink-soft:   light-dark(oklch(0.38 0.016 195), oklch(0.83 0.012 170));
    --ink-faint:  light-dark(oklch(0.45 0.018 190), oklch(0.76 0.016 170));
    --ink-dim:    light-dark(oklch(0.5 0.02 190), oklch(0.66 0.016 170));
    --accent:     light-dark(oklch(0.33 0.02 195), oklch(0.84 0.03 165));
    --accent-hi:  light-dark(oklch(0.26 0.018 195), oklch(0.92 0.02 165));
    --on-accent:  light-dark(oklch(0.96 0.014 88), oklch(0.2 0.012 195));
    --sage:       light-dark(oklch(0.66 0.04 160), oklch(0.7 0.03 165));
    --sage-soft:  light-dark(oklch(0.88 0.03 145), oklch(0.3 0.02 175));
    --sage-text:  light-dark(oklch(0.43 0.05 165), oklch(0.8 0.04 165));
    --line:       light-dark(oklch(0.3 0.03 90 / 0.16), oklch(0.95 0.006 115 / 0.14));
    --line-hi:    light-dark(oklch(0.3 0.03 90 / 0.45), oklch(0.95 0.006 115 / 0.42));
    --focus:      light-dark(oklch(0.33 0.02 195), oklch(0.84 0.03 165));

    --font-sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --text-xs:   0.8125rem;
    --text-sm:   0.9375rem;
    --text-base: 1.0625rem;
    --text-lg:   clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
    --text-xl:   clamp(1.375rem, 1.1rem + 1.4vw, 2.125rem);
    --text-2xl:  clamp(2.125rem, 1.5rem + 3vw, 3.75rem);
    --text-3xl:  clamp(2.75rem, 1.75rem + 5.5vw, 6rem);
    --text-hero: clamp(4.25rem, 2rem + 10vw, 10rem);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-section: clamp(4.5rem, 3rem + 7vw, 9rem);

    --shell:  90rem;
    --gutter: clamp(1rem, 0.25rem + 3.5vw, 4rem);
    --nav-h:  4.5rem;
    --ring:   3.5rem;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 150ms;
    --t-base: 280ms;
    --t-slow: 420ms;
  }

  :root[data-theme="light"] { color-scheme: light; }

  :root[data-theme="dark"] { color-scheme: dark; }

  /* Kontakt und Footer bleiben in beiden Modi dunkel. */
  .contact, .footer {
    color-scheme: dark;

    --bg:   oklch(0.15 0.012 195);
    --line: oklch(0.95 0.006 115 / 0.16);
  }
}


/* Base ------------------------------------------------------------------- */

@layer base {
  html {
    scroll-padding-block-start: calc(var(--nav-h) + var(--space-4));
    -webkit-text-size-adjust: 100%;
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;

    /* Feines Korn nimmt den Flächen den digitalen Glanz. */
    &::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 150;
      pointer-events: none;
      opacity: 0.09;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .18 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
    }
  }

  h1, h2, h3 { line-height: 1.1; text-wrap: balance; }

  p { text-wrap: pretty; }

  a { color: inherit; }

  main:focus { outline: none; }

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

  .icon {
    inline-size: 1.375rem;
    block-size: 1.375rem;
    flex: none;
    fill: none;
    stroke: currentcolor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}


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

@layer layout {
  .shell {
    inline-size: 100%;
    max-inline-size: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .section { padding-block: var(--space-section); }

  .section--sunken { background: var(--bg-sunken); }

  .section__grid { display: grid; gap: var(--space-6) var(--space-12); }

  .section__body {
    container-type: inline-size;
    min-inline-size: 0;
  }

  @media (width >= 60rem) {
    .section__grid { grid-template-columns: 11rem minmax(0, 1fr); }

    .section__label {
      position: sticky;
      inset-block-start: calc(var(--nav-h) + var(--space-6));
      align-self: start;
    }
  }
}


/* Components ------------------------------------------------------------- */

@layer components {
  .skip-link {
    position: fixed;
    inset-block-start: var(--space-2);
    inset-inline-start: var(--space-2);
    z-index: 200;
    padding: var(--space-3) var(--space-4);
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-200%);

    &:focus { transform: none; }
  }

  /* Navigation */

  .nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
    background: var(--bg);
    border-block-end: 1px solid transparent;
    transition: border-color var(--t-base), translate var(--t-slow) var(--ease);

    &.is-hidden { translate: 0 -100%; }

    &.is-scrolled { border-block-end-color: var(--line); }

    /* Lesefortschritt */
    &::after {
      content: "";
      position: absolute;
      inset-inline: 0;
      inset-block-end: -1px;
      block-size: 2px;
      background: var(--sage);
      transform: scaleX(var(--scroll, 0));
      transform-origin: left;
    }
  }

  .nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    block-size: var(--nav-h);
  }

  .nav__logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex: none;
    margin-inline-end: auto;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-decoration: none;
  }

  .nav__logo-dot {
    inline-size: 0.375rem;
    block-size: 0.375rem;
    border-radius: 50%;
    background: var(--sage);
  }

  .theme-switch {
    position: relative;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    padding: 3px;
    border: 1px solid var(--line-hi);
    border-radius: 999px;

    &[hidden] { display: none; }

    /* Der helle Knopf gleitet unter die gewählte Option. */
    &::before {
      content: "";
      position: absolute;
      inset-block: 3px;
      inset-inline-start: 3px;
      inline-size: calc(50% - 3px);
      border-radius: 999px;
      background: var(--accent);
      transition: translate var(--t-slow) var(--ease);
    }

    &[data-mode="dark"]::before { translate: 100% 0; }
  }

  .theme-switch__option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    min-block-size: 2.25rem;
    min-inline-size: 2.5rem;
    padding-inline: var(--space-2);
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color var(--t-base);

    & .icon { inline-size: 1.125rem; block-size: 1.125rem; }

    &[aria-pressed="true"] { color: var(--on-accent); }
  }

  .theme-switch__label { display: none; }

  @media (width >= 30rem) {
    .theme-switch__label { display: inline; }

    .theme-switch__option { padding-inline: var(--space-3); }
  }

  .nav__menu {
    order: 1;
    display: flex;
    align-items: center;
    gap: clamp(var(--space-4), 2.5vw, var(--space-8));
    min-inline-size: 0;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .nav__link {
    position: relative;
    display: inline-block;
    padding-block: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color var(--t-fast);

    &::after {
      content: "";
      position: absolute;
      inset-inline: 0;
      inset-block-end: 0.25rem;
      block-size: 2px;
      background: var(--sage);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform var(--t-base) var(--ease);
    }

    &[aria-current] { color: var(--ink); }

    &[aria-current]::after { transform: scaleX(1); }

    @media (hover: hover) {
      &:hover { color: var(--ink); }

      &:hover::after { transform: scaleX(1); }
    }
  }

  .nav__link--cta {
    padding: var(--space-2) var(--space-4);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    border-radius: 3px;
    transition: background-color var(--t-fast);

    &::after { display: none; }

    &[aria-current] { color: var(--on-accent); }

    @media (hover: hover) {
      &:hover { background: var(--accent-hi); color: var(--on-accent); }
    }
  }

  .nav__toggle {
    order: 3;
    display: grid;
    place-content: center;
    gap: 5px;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    margin-inline-end: calc(var(--space-2) * -1);
    cursor: pointer;

    &[hidden] { display: none; }

    & span {
      inline-size: 1.375rem;
      block-size: 2px;
      background: var(--ink);
      transition: transform var(--t-base) var(--ease), opacity var(--t-fast);
    }

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

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

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

  /* Ohne JS bleibt die Navigation als scrollbare Zeile bedienbar. */
  @media (width < 48rem) {
    .nav[data-enhanced] .nav__menu {
      position: fixed;
      inset: var(--nav-h) 0 0;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: var(--space-4);
      padding: var(--space-8) var(--gutter);
      overflow-y: auto;
      background: var(--bg);
      border-block-start: 1px solid var(--line);
      visibility: hidden;
      opacity: 0;

      /* Transition nur beim Öffnen, sonst blitzt das Overlay beim Laden auf. */
      &.is-open {
        visibility: visible;
        opacity: 1;
        transition: opacity var(--t-base);
      }
    }

    .nav[data-enhanced] .nav__link { font-size: var(--text-xl); }

    .nav[data-enhanced] .nav__link--cta {
      margin-block-start: var(--space-4);
      padding: var(--space-3) var(--space-6);
      font-size: var(--text-base);
    }
  }

  @media (width >= 48rem) {
    .nav__toggle, .nav__toggle[hidden] { display: none; }

    /* Ein gemeinsamer Strich gleitet zwischen den Links. */
    .nav[data-enhanced] .nav__menu {
      position: relative;
      overflow: visible;

      &::after {
        content: "";
        position: absolute;
        inset-block-end: 0.25rem;
        inset-inline-start: 0;
        inline-size: var(--ind-w, 0);
        block-size: 2px;
        background: var(--sage);
        opacity: var(--ind-o, 0);
        translate: var(--ind-x, 0) 0;
        transition: translate var(--t-slow) var(--ease), inline-size var(--t-slow) var(--ease), opacity var(--t-fast);
      }
    }

    .nav[data-enhanced] .nav__link::after { display: none; }
  }

  html:has(.nav__menu.is-open) { overflow: hidden; }

  /* Buttons und Links */

  .btn {
    display: inline-flex;
    align-items: center;
    min-block-size: 3rem;
    padding: var(--space-3) var(--space-6);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color var(--t-fast);

    @media (hover: hover) {
      &:hover { background: var(--accent-hi); }
    }

    &:active { transform: translateY(1px); }
  }

  .btn, .to-top { transition: background-color var(--t-fast), translate 500ms var(--ease), opacity var(--t-base), visibility var(--t-base), scale var(--t-base) var(--ease); }

  /* Nach oben, der Ring zeigt den Lesefortschritt */
  .to-top {
    position: fixed;
    inset-block-end: var(--space-6);
    inset-inline-end: var(--gutter);
    z-index: 90;
    display: grid;
    place-items: center;
    inline-size: 3.25rem;
    block-size: 3.25rem;
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    box-shadow: 0 0 0 1px var(--line);

    &[data-enhanced]:not(.is-visible) { visibility: hidden; opacity: 0; scale: 0.8; }

    & .icon { grid-area: 1 / 1; inline-size: 1.25rem; block-size: 1.25rem; }
  }

  .to-top__ring {
    grid-area: 1 / 1;
    inline-size: 100%;
    block-size: 100%;
    rotate: -90deg;
    overflow: visible;

    & circle { fill: none; stroke: var(--line); stroke-width: 2; }

    & .to-top__progress {
      stroke: var(--sage-text);
      stroke-dasharray: 1;
      stroke-dashoffset: calc(1 - var(--scroll, 0));
    }
  }

  /* Lichtfleck folgt dem Zeiger */
  .has-spotlight {
    position: relative;
    isolation: isolate;

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      opacity: 0;
      background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--sage) 26%, transparent), transparent 70%);
      transition: opacity var(--t-base);
    }

    &:hover::before { opacity: 1; }
  }

  /* Überschriften: Wörter steigen aus einer Maske auf */
  .title-word {
    display: inline-block;
    padding-block-end: 0.14em;
    margin-block-end: -0.14em;
    overflow: clip;

    & > span { display: inline-block; }
  }

  .title-pending .title-word > span { transform: translateY(110%); }

  .is-split .title-word > span {
    transition: transform 850ms var(--ease);
    transition-delay: calc(var(--i) * 70ms);
  }

  .letter-word { display: inline-block; white-space: nowrap; }

  .letter { display: inline-block; transition: font-weight 220ms var(--ease); }

  .text-link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--sage);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
    transition: text-decoration-color var(--t-fast);

    @media (hover: hover) {
      &:hover { text-decoration-color: currentcolor; }
    }
  }

  /* Hero */

  .hero { display: grid; }

  .hero__text {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-inline-size: 0;
    padding-block: calc(var(--nav-h) + var(--space-8)) var(--space-12);
    padding-inline: var(--gutter);
  }

  .hero__canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
    inline-size: 100%;
    block-size: 100%;
    color: var(--sage);
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent 25%, black 75%);
  }

  .hero__eyebrow {
    margin-block-end: var(--space-6);
    font-size: var(--text-sm);
    font-weight: 550;
    color: var(--ink-soft);
  }

  .hero__title { margin-block-end: var(--space-6); }

  .hero__name {
    display: block;
    margin-block-end: var(--space-6);
    margin-inline-start: -0.04em;
    font-size: var(--text-hero);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.045em;
  }

  .hero__line {
    display: block;
    clip-path: inset(-0.1em -1em -0.04em -1em);

    & > span { display: block; }
  }

  .hl {
    background: linear-gradient(var(--sage), var(--sage)) 0 100% / 100% 2px no-repeat;
    padding-block-end: 0.05em;
  }

  .hero__headline {
    display: block;
    max-inline-size: 22ch;
    font-size: var(--text-xl);
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink-soft);
  }

  .hero__sub { max-inline-size: 46ch; color: var(--ink-soft); }

  .hero__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4) var(--space-8);
    margin-block-start: var(--space-8);
  }

  .hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-6);
    margin-block-start: var(--space-8);
    font-size: var(--text-sm);
    color: var(--ink-soft);

    & a {
      display: inline-block;
      padding-block: var(--space-1);
      text-decoration: underline;
      text-decoration-color: var(--line-hi);
      text-underline-offset: 0.3em;
      transition: color var(--t-fast), text-decoration-color var(--t-fast);

      @media (hover: hover) {
        &:hover { color: var(--ink); text-decoration-color: var(--sage); }
      }
    }
  }

  .hero__figure {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;

    & picture { display: block; aspect-ratio: 4 / 5; overflow: clip; }

    & img {
      inline-size: 100%;
      block-size: 100%;
      object-fit: cover;
      object-position: calc(50% + var(--px, 0%)) calc(35% + var(--py, 0%));
      transition: object-position 900ms var(--ease);
      background: var(--sage-soft);
    }

    & figcaption {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 0 var(--space-4);
      padding: var(--space-3) var(--gutter) var(--space-3) var(--space-4);
      font-size: var(--text-xs);
      color: var(--ink-soft);
    }
  }

  .hero__caption-name { font-weight: 650; color: var(--ink); }

  .hero__caption-tag { white-space: nowrap; }

  @media (width >= 60rem) {
    .hero {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
      min-block-size: 100svh;
    }

    .hero__text {
      padding-inline-start: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
      padding-inline-end: var(--space-8);
    }

    .hero__figure {
      padding-block-start: var(--nav-h);

      & picture { position: relative; flex: 1; aspect-ratio: auto; min-block-size: 0; }

      & img { position: absolute; inset: 0; }
    }
  }

  /* Abschnittsköpfe */

  .section__label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--sage-text);
  }

  .section__header { margin-block-end: var(--space-12); }

  .section__title {
    max-inline-size: 18ch;
    font-size: var(--text-2xl);
    font-weight: 750;
    letter-spacing: -0.03em;
  }

  .section__intro {
    max-inline-size: 58ch;
    margin-block-start: var(--space-4);
    color: var(--ink-soft);
  }

  /* Laufband: bewegt sich nur beim Scrollen */

  .marquee {
    overflow: clip;
    padding-block: var(--space-6);
    border-block: 1px solid var(--line);
    background: var(--bg);
  }

  .marquee__track {
    display: flex;
    gap: var(--space-12);
    inline-size: max-content;
    font-size: clamp(2.25rem, 1.5rem + 3.5vw, 5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    white-space: nowrap;
    color: var(--sage-text);
    opacity: 0.74;
    transform: skewX(var(--skew, 0deg));

    & span { display: flex; align-items: center; gap: var(--space-12); }

    & span::after {
      content: "";
      inline-size: 0.5rem;
      block-size: 0.5rem;
      border-radius: 50%;
      background: currentcolor;
    }
  }

  .marquee--reverse .marquee__track { margin-inline-start: -30%; }

  /* Vision */

  .vision { display: grid; gap: var(--space-12); }

  .vision__statement {
    max-inline-size: 58ch;
    color: var(--ink-soft);
  }

  .vision__lead {
    margin-block-end: var(--space-6);
    font-size: var(--text-xl);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink);
  }

  .pillar {
    position: relative;
    padding-block: var(--space-6);
    border-block-start: 1px solid var(--line);
    font-size: var(--text-sm);
    color: var(--ink-soft);

    &:last-child { border-block-end: 1px solid var(--line); }

    /* Der Punkt in Lesehöhe wird per Linie markiert. */
    &::after {
      content: "";
      position: absolute;
      inset-inline: 0;
      inset-block-start: -1px;
      block-size: 2px;
      background: var(--sage-text);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 600ms var(--ease);
    }

    &.is-focus::after { transform: scaleX(1); }
  }

  .pillar__title {
    margin-block-end: var(--space-2);
    font-size: var(--text-base);
    font-weight: 650;
    color: var(--ink);
  }

  /* Der Leitsatz steht neben dem Titel, Text und Grundsätze darunter. */
  @container (width >= 52rem) {
    .vision-layout {
      display: grid;
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      gap: var(--space-12) var(--space-16);

      & .section__header { grid-area: 1 / 1; margin-block-end: 0; }
    }

    .vision, .vision__statement { display: contents; }

    .vision__lead { grid-area: 1 / 2; align-self: end; margin-block-end: 0; }

    .vision__statement > p:not(.vision__lead) { grid-area: 2 / 1; color: var(--ink-soft); }

    .pillars { grid-area: 2 / 2; }
  }

  /* Werdegang */

  .station { position: relative; padding-block-end: var(--space-6); }

  .station:not(:last-child)::before {
    content: "";
    position: absolute;
    inset-block: var(--ring) 0;
    inset-inline-start: calc(var(--ring) / 2 - 1px);
    inline-size: 2px;
    background: var(--sage);
    transform-origin: top;
  }

  .station__head { font: inherit; }

  .station__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    inline-size: 100%;
    text-align: start;

    &:not(:disabled) { cursor: pointer; }
  }

  .station__ring {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    inline-size: var(--ring);
    block-size: var(--ring);
    border: 2px solid var(--line-hi);
    border-radius: 50%;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    transition: background-color var(--t-base), border-color var(--t-base), color var(--t-base);
  }

  .station--current .station__ring {
    border-color: var(--sage);
    background: var(--sage-soft);
    color: var(--accent);

    &::after {
      content: "";
      position: absolute;
      inset-block-start: -2px;
      inset-inline-end: -2px;
      inline-size: 0.875rem;
      block-size: 0.875rem;
      border: 2px solid var(--bg-sunken);
      border-radius: 50%;
      background: var(--sage);
    }
  }

  @media (hover: hover) {
    .station__toggle:not(:disabled):hover .station__ring { border-color: var(--sage); color: var(--ink); }
  }

  .station__toggle[aria-expanded="true"] .station__ring,
  .station__toggle[aria-expanded="true"]:hover .station__ring {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
  }

  .station__label { display: block; min-inline-size: 0; }

  .station__company {
    display: block;
    font-size: var(--text-sm);
    font-weight: 650;
    line-height: 1.3;
  }

  .station__period {
    display: block;
    margin-block-start: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.35;
    color: var(--ink-faint);
  }

  .station__detail { display: grid; grid-template-rows: 1fr; }

  .timeline[data-enhanced] .station__detail {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--t-slow) var(--ease), visibility var(--t-slow);

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

  .station__clip { overflow: hidden; min-block-size: 0; }

  .station__panel {
    position: relative;
    margin: var(--space-4) 3px 3px calc(var(--ring) + var(--space-4));
    padding: var(--space-6);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: var(--text-sm);
    color: var(--ink-soft);

    & p { max-inline-size: 62ch; }
  }

  .station__meta {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--sage-text);
  }

  .station__role {
    margin-block: var(--space-1) var(--space-3);
    padding-inline-end: var(--space-8);
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink);
  }

  .station__pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2) var(--space-6);
    margin-block-start: var(--space-6);

    & button { min-block-size: 2.75rem; font-size: var(--text-sm); cursor: pointer; }

    & button:only-child { margin-inline-start: auto; }
  }

  .station__areas {
    display: grid;
    gap: var(--space-3) var(--space-8);
    margin-block-start: var(--space-4);
    padding-block-start: var(--space-4);
    border-block-start: 1px solid var(--line);

    & dt { font-size: var(--text-xs); font-weight: 600; color: var(--ink-faint); }

    & dd { color: var(--ink); }
  }

  .station__close {
    position: absolute;
    inset-block-start: var(--space-2);
    inset-inline-end: var(--space-2);
    display: grid;
    place-items: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    border-radius: 50%;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background-color var(--t-fast), color var(--t-fast);

    @media (hover: hover) {
      &:hover { background: var(--accent); color: var(--on-accent); }
    }
  }

  /* Horizontal nur mit JS: dort ist immer höchstens ein Panel offen.
     Ohne JS bleibt die vertikale Liste mit allen Texten. */
  @container (width >= 44rem) {
    .timeline[data-enhanced] {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      column-gap: var(--space-4);

      & .station { display: contents; }

      & .station:not(:last-child)::before { content: none; }

      & .station__head { position: relative; grid-row: 1; }

      & .station:not(:last-child) .station__head::after {
        content: "";
        position: absolute;
        inset-block-start: calc(var(--ring) / 2 - 1px);
        inset-inline-start: var(--ring);
        inline-size: calc(100% + var(--space-4) - var(--ring));
        block-size: 2px;
        background: var(--sage);
        transform-origin: left;
      }

      & .station__toggle { flex-direction: column; align-items: flex-start; }

      & .station__detail { grid-row: 2; grid-column: 1 / -1; }

      & .station__panel { margin: var(--space-6) 3px 3px; padding: var(--space-8); }
    }

    .station__areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* Skills */

  .skills { display: grid; gap: var(--space-8) var(--space-16); align-items: center; }

  .radar svg { inline-size: 100%; max-inline-size: 30rem; block-size: auto; margin-inline: auto; overflow: visible; }

  .radar__ring { fill: none; stroke: var(--line); }

  .radar__axis { stroke: var(--line); }

  .radar__sweep {
    stroke: var(--sage-text);
    stroke-width: 2;
    opacity: 0;
    transform-origin: 230px 200px;
  }

  .radar__shape {
    fill: color-mix(in oklch, var(--sage) 28%, transparent);
    stroke: var(--sage);
    stroke-width: 2;
    stroke-linejoin: round;
  }

  .radar__dot {
    fill: var(--bg);
    stroke: var(--sage-text);
    stroke-width: 2;
    transition: fill var(--t-fast);
  }

  .radar__hit { fill: transparent; }

  .radar__point { cursor: pointer; }

  .radar__dot { transition: fill var(--t-fast), r var(--t-base) var(--ease); }

  .radar__point.is-active .radar__dot { fill: var(--sage-text); r: 8px; }

  .radar__label {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 550;
    fill: var(--ink-soft);
    transition: fill var(--t-fast);
  }

  .radar__label.is-active { fill: var(--ink); }

  .radar__tick {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--ink-faint);
  }

  .skill {
    border-block-end: 1px solid var(--line);
    transition: color var(--t-fast);

    &:first-child { border-block-start: 1px solid var(--line); }

    /* Gedimmt über Farbe statt Transparenz, damit der Kontrast erhalten bleibt. */
    &.is-dimmed {
      color: var(--ink-dim);

      & .skill__level { color: var(--ink-dim); }

      & .skill__fill { opacity: 0.5; }
    }
  }

  .skill__toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 var(--space-4);
    inline-size: 100%;
    padding-block: var(--space-3);
    text-align: start;

    &:not(:disabled) { cursor: pointer; }
  }

  .skill__name { font-size: var(--text-sm); font-weight: 650; }

  .skills[data-enhanced] .skill__level::after {
    content: "+" / "";
    display: inline-block;
    inline-size: 1em;
    margin-inline-start: var(--space-2);
    text-align: center;
    transition: rotate var(--t-base) var(--ease);
  }

  .skill.is-open .skill__level::after { rotate: 45deg; }

  .skill__detail { display: grid; grid-template-rows: 1fr; }

  .skills[data-enhanced] .skill__detail {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--t-slow) var(--ease), visibility var(--t-slow);
  }

  .skills[data-enhanced] .skill.is-open .skill__detail { grid-template-rows: 1fr; visibility: visible; }

  .skill__clip { overflow: hidden; min-block-size: 0; }

  .skill__note {
    padding-block-end: var(--space-4);
    font-size: var(--text-sm);
    color: var(--ink-soft);
  }

  .skill__level {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-faint);
  }

  .skill__track {
    display: none;
    flex-basis: 100%;
    block-size: 3px;
    margin-block-start: var(--space-2);
    background: var(--line);
    overflow: hidden;
  }

  .skill__fill {
    display: block;
    block-size: 100%;
    inline-size: 0;
    background: var(--sage-text);
    transition: inline-size 900ms var(--ease);
  }

  .skills[data-enhanced] .skill__track { display: block; }

  .skills.is-in .skill__fill { inline-size: var(--value); }

  .radar:empty { display: none; }

  @container (width >= 44rem) {
    .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .skills:has(.radar:empty) { grid-template-columns: minmax(0, 1fr); }
  }

  /* Kennzahlen und Rollen */

  .kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8) var(--space-4);
    margin-block-end: var(--space-16);
  }

  .kpi { display: flex; flex-direction: column; padding-block-start: var(--space-3); border-block-start: 2px solid var(--ink); }

  .kpi__value {
    font-size: var(--text-3xl);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
  }

  .kpi__label { margin-block-start: var(--space-2); font-weight: 650; line-height: 1.3; }

  .kpi__sub {
    font-size: var(--text-xs);
    line-height: 1.4;
    color: var(--ink-faint);
  }

  .role {
    display: grid;
    gap: var(--space-1) var(--space-8);
    padding-block: var(--space-6);
    border-block-start: 1px solid var(--line-hi);
    font-size: var(--text-sm);
    color: var(--ink-soft);
    transition: border-color var(--t-base), background-color var(--t-slow);

    &:last-child { border-block-end: 1px solid var(--line-hi); }

    /* Sprungziel aus dem Hero und den Skills */
    &:target {
      background: var(--sage-soft);
      box-shadow: -1rem 0 var(--sage-soft), 1rem 0 var(--sage-soft);
    }

    @media (hover: hover) {
      &:hover { border-block-start-color: var(--ink); }
    }
  }

  .role__meta {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--sage-text);
  }

  .role__title {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink);
  }

  @container (width >= 40rem) {
    .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }

  @container (width >= 52rem) {
    .role { grid-template-columns: 11rem minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }

    .role__title { margin-block: 0; }

    .role > p:last-child { max-inline-size: 58ch; }
  }

  /* Kontakt und Footer */

  .contact {
    position: relative;
    overflow: clip;
    background: var(--bg);
    color: var(--ink);
    isolation: isolate;
  }

  .contact__deco {
    position: absolute;
    inset-block-end: -10%;
    inset-inline-end: -5%;
    z-index: -1;
    inline-size: min(32rem, 90vw);
    block-size: auto;
    pointer-events: none;

    & circle {
      fill: none;
      stroke: var(--sage);
      stroke-opacity: 0.28;
      stroke-dasharray: 20 80;
    }
  }

  .contact__title {
    font-size: var(--text-3xl);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .contact__sub {
    margin-block: var(--space-6) var(--space-12);
    color: var(--ink-soft);
  }

  .contact__links { max-inline-size: 44rem; border-block-start: 1px solid var(--line); }

  .contact__links li {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    border-block-end: 1px solid var(--line);
    transition: border-color var(--t-fast);

    @media (hover: hover) {
      &:hover { border-block-end-color: var(--ink); }
    }
  }

  .contact__copy {
    flex: none;
    min-block-size: 2.75rem;
    padding-inline: var(--space-2);
    font-size: var(--text-sm);
    color: var(--ink-soft);
    cursor: pointer;
    transition: color var(--t-fast);

    &[hidden] { display: none; }

    @media (hover: hover) {
      &:hover { color: var(--ink); }
    }
  }

  .contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-8);
    margin-block-start: var(--space-8);

    & button { cursor: pointer; }

    & button[hidden] { display: none; }
  }

  .contact__link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--space-4);
    min-block-size: 3.5rem;
    min-inline-size: 0;
    padding-block: var(--space-3);
    font-size: clamp(1.0625rem, 0.95rem + 0.8vw, 1.5rem);
    font-weight: 550;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: padding-inline-start var(--t-base) var(--ease);

    & .icon { color: var(--sage-text); }

    @media (hover: hover) {
      &:hover { padding-inline-start: var(--space-2); }
    }
  }

  .contact__value { min-inline-size: 0; overflow-wrap: anywhere; }

  .footer {
    padding-block: var(--space-6);
    background: var(--bg);
    border-block-start: 1px solid var(--line);
    font-size: var(--text-xs);
    color: var(--ink-faint);
  }

  /* Rechts bleibt Platz für den Nach-oben-Button. */
  .footer__content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-1) var(--space-8);
    padding-inline-end: calc(var(--gutter) + 4rem);
  }
}


/* Bewegung: Scroll-Effekte laufen nur mit dem Scrollen, stehen also von selbst. ---- */

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

    /* Hero: Einstieg beim Laden */
    .hero__line > span { animation: line-in 900ms var(--ease) both; }

    .hero__line + .hero__line > span { animation-delay: 90ms; }

    .hero__eyebrow,
    .hero__headline,
    .hero__sub,
    .hero__cta,
    .hero__facts { animation: fade-up 700ms var(--ease) both; }

    .hero__headline { animation-delay: 220ms; }

    .hero__sub { animation-delay: 300ms; }

    .hero__cta { animation-delay: 380ms; }

    .hero__facts { animation-delay: 460ms; }

    .hl { animation: draw-under 800ms var(--ease) 650ms both; }

    .hl + .hl { animation-delay: 900ms; }

    .hero__figure img { scale: 1.08; animation: settle 1.4s var(--ease) both; }

    /* Werdegang */
    .timeline[data-enhanced] {
      & .station::before,
      & .station__head::after { transition: transform 700ms var(--ease); }

      & .station:nth-child(2)::before,
      & .station:nth-child(2) .station__head::after { transition-delay: 120ms; }

      & .station:nth-child(3)::before,
      & .station:nth-child(3) .station__head::after { transition-delay: 240ms; }

      & .station:nth-child(4)::before,
      & .station:nth-child(4) .station__head::after { transition-delay: 360ms; }

      &:not(.is-in) .station::before { transform: scaleY(0); }

      &:not(.is-in) .station__head::after { transform: scaleX(0); }
    }

    .station__toggle[aria-expanded="true"] .station__ring { animation: ring-pop 420ms var(--ease); }

    .station__detail.is-open .station__panel > * { animation: fade-up 500ms var(--ease) both; }

    .station__detail.is-open .station__role { animation-delay: 60ms; }

    .station__detail.is-open .station__panel > p:nth-of-type(3) { animation-delay: 120ms; }

    .station__detail.is-open .station__areas { animation-delay: 180ms; }

    .timeline.is-in .station__ring { animation: ring-in 600ms var(--ease) both; }

    .timeline.is-in .station:nth-child(2) .station__ring { animation-delay: 120ms; }

    .timeline.is-in .station:nth-child(3) .station__ring { animation-delay: 240ms; }

    .timeline.is-in .station:nth-child(4) .station__ring { animation-delay: 360ms; }

    .timeline.is-in .station:nth-child(5) .station__ring { animation-delay: 480ms; }

    .skills.is-in .radar__sweep { animation: sweep 1.5s var(--ease) both; }

    @supports (animation-timeline: scroll()) {
      .nav::after {
        animation: grow-x linear both;
        animation-timeline: scroll(root);
      }

      .hero__name {
        animation: hero-weight linear both;
        animation-timeline: scroll(root);
        animation-range: 0 350px;
      }

      .hero__figure img {
        animation: settle 1.4s var(--ease) both, hero-drift linear both;
        animation-timeline: auto, scroll(root);
        animation-range: normal, 0 100vh;
      }

      .to-top__progress {
        animation: ring-fill linear both;
        animation-timeline: scroll(root);
      }

      .marquee__track {
        animation: marquee linear both;
        animation-timeline: view();
      }

      .marquee--reverse .marquee__track { animation-direction: reverse; }

      .reveal {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
      }

      .pillar, .role, .kpi, .skill, .contact__links li {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 5% entry 70%;
      }

      .kpi:nth-child(2) { animation-range: entry 15% entry 80%; }

      .kpi:nth-child(3) { animation-range: entry 25% entry 90%; }

      .kpi:nth-child(4) { animation-range: entry 35% entry 100%; }

      .vision__lead { view-timeline-name: --lead; }

      /* Nur der Mischwert wird animiert: light-dark() löst sich in Keyframes nicht je Modus auf. */
      .word {
        color: color-mix(in oklch, var(--ink) var(--word-ink), var(--ink-dim));
        animation: word-ink linear both;
        animation-timeline: --lead;
        animation-range: cover calc(12% + var(--p) * 30%) cover calc(20% + var(--p) * 30%);
      }

      .contact { view-timeline-name: --contact; }

      .contact__deco {
        animation: deco-spin linear both;
        animation-timeline: --contact;
      }

      .contact__deco circle {
        animation: deco-turn linear both;
        animation-timeline: --contact;
      }
    }

    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

    ::view-transition-new(root) { z-index: 1; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }

  @keyframes line-in {
    from { transform: translateY(105%); }
    to   { transform: translateY(0); }
  }

  @keyframes fade-up {
    from { opacity: 0; transform: translateY(0.75rem); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes draw-under {
    from { background-size: 0% 2px; }
    to   { background-size: 100% 2px; }
  }

  @keyframes settle {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
  }

  @keyframes hero-drift {
    from { translate: 0 0; }
    to   { translate: 0 -5%; }
  }

  @keyframes ring-in {
    from { opacity: 0; scale: 0.5; }
    to   { opacity: 1; scale: 1; }
  }

  @keyframes ring-fill {
    from { stroke-dashoffset: 1; }
    to   { stroke-dashoffset: 0; }
  }

  @keyframes sweep {
    0%   { opacity: 1; rotate: 0deg; }
    85%  { opacity: 1; }
    100% { opacity: 0; rotate: 360deg; }
  }

  @keyframes ring-pop {
    50% { transform: scale(1.12); }
  }

  @keyframes grow-x {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }

  @keyframes hero-weight {
    from { font-weight: 900; }
    to   { font-weight: 300; }
  }

  @keyframes marquee {
    from { translate: 0 0; }
    to   { translate: -30% 0; }
  }

  @keyframes reveal {
    from { opacity: 0; translate: 0 1.5rem; }
    to   { opacity: 1; translate: 0 0; }
  }

  @keyframes word-ink {
    from { --word-ink: 0%; }
    to   { --word-ink: 100%; }
  }

  @keyframes deco-spin {
    from { rotate: -30deg; }
    to   { rotate: 30deg; }
  }

  @keyframes deco-turn {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -100; }
  }
}


/* Druck ------------------------------------------------------------------ */

@layer print {
  @media print {
    :root, .contact, .footer {
      color-scheme: light;

      --bg: #fff;
      --bg-sunken: #fff;
      --ink: #000;
      --ink-soft: #222;
      --ink-faint: #333;
      --accent: #000;
      --sage-text: #333;
      --line: #bbb;
      --line-hi: #888;
    }

    body { font-size: 11pt; }

    *, *::before, *::after { animation: none !important; }

    body::after, .marquee, .to-top, .hero__canvas { display: none; }

    .title-word > span { transform: none !important; }

    .nav, .skip-link, .hero__cta, .hero__facts, .contact__deco, .contact__copy, .contact__actions, .station__close, .station__pager { display: none; }

    .hero { min-block-size: 0; }

    .hero__text { padding-block-start: 0; }

    .hero__figure { max-inline-size: 6cm; }

    .section { padding-block: 1.5rem; }

    .section__label { position: static; }

    /* Im Druck stehen alle Stationen untereinander, sonst überlagern sich die Texte. */
    .timeline[data-enhanced] {
      display: block;

      & .station { display: block; padding-block-end: var(--space-4); }

      & .station::before, & .station__head::after { content: none; }

      & .station__toggle { flex-direction: row; align-items: center; }

      & .station__detail { grid-template-rows: 1fr; visibility: visible; transition: none; }

      & .station__panel { margin: var(--space-2) 0 0; padding: 0; border: 0; }

      & .station__meta, & .station__role { display: none; }
    }

    .skills[data-enhanced] .skill__fill { inline-size: var(--value); transition: none; }

    .skills[data-enhanced] .skill__detail { grid-template-rows: 1fr; visibility: visible; transition: none; }

    .skills[data-enhanced] .skill__level::after { content: none; }

    .role, .pillar, .station, .skill { break-inside: avoid; }
  }
}
