/* ============================================================
   folio.css — State S0 Styles
   Christian Voigt Portfolio — Cyberpunk Design System
   ============================================================ */

/* ============================================================
   @font-face — N27 (Atipo Foundry) — alle 12 Schnitte
   Pfade relativ zu assets/css/ → ../fonts/
   ============================================================ */

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-thin-webfont.woff2') format('woff2'),
       url('../fonts/n27-thin-webfont.woff') format('woff');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-thinitalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-thinitalic-webfont.woff') format('woff');
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-extralight-webfont.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-extralightitalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-extralightitalic-webfont.woff') format('woff');
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-light-webfont.woff2') format('woff2'),
       url('../fonts/n27-light-webfont.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-lightitalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-lightitalic-webfont.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-regular-webfont.woff2') format('woff2'),
       url('../fonts/n27-regular-webfont.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-regularitalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-regularitalic-webfont.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-medium-webfont.woff2') format('woff2'),
       url('../fonts/n27-medium-webfont.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-mediumitalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-mediumitalic-webfont.woff') format('woff');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-bold-webfont.woff2') format('woff2'),
       url('../fonts/n27-bold-webfont.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'N27';
  src: url('../fonts/n27-bolditalic-webfont.woff2') format('woff2'),
       url('../fonts/n27-bolditalic-webfont.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------
   Reset & Base
   -------------------------------------------------------- */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* State Machine übernimmt */
  background-color: #050505 !important;
}

body {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  background-color: #050505 !important;
  color: #ffffff;
  min-height: 100dvh;
  overflow: hidden; /* State Machine kontrolliert Scroll */
  cursor: none; /* Custom Cursor */
  position: relative;
}

body.has-custom-cursor * {
  cursor: none !important;
}

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

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  cursor: none;
}

/* --------------------------------------------------------
   Custom Cursor
   -------------------------------------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor__ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 0, 48, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 200ms var(--ease-out-expo),
              height 200ms var(--ease-out-expo),
              border-color 200ms ease,
              opacity 200ms ease;
  will-change: transform;
}

.cursor__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: var(--color-neon);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 60ms linear;
  will-change: transform;
}

/* Hover-State: Ring expandiert */
.cursor.is-hovering .cursor__ring {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 0, 48, 0.5);
  box-shadow: var(--neon-glow-sm);
}

.cursor.is-hovering .cursor__dot {
  transform: translate(-50%, -50%) scale(0);
}

/* --------------------------------------------------------
   FX Layers
   -------------------------------------------------------- */

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Scan-Lines */
.fx-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    var(--scanline-color) 2px,
    var(--scanline-color) 4px
  );
  animation: scanline-drift 12s linear infinite;
}

@keyframes scanline-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* Grid Overlay */
.fx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Vignette */
.fx-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    transparent 30%,
    rgba(5, 5, 5, 0.6) 70%,
    var(--vignette-color) 100%
  );
}

/* --------------------------------------------------------
   Corner Marks
   -------------------------------------------------------- */

.corner-marks {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--corner-color);
  border-style: solid;
}

.corner--tl {
  top: 24px;
  left: 24px;
  border-width: 1.5px 0 0 1.5px;
}

.corner--tr {
  top: 24px;
  right: 24px;
  border-width: 1.5px 1.5px 0 0;
}

.corner--bl {
  bottom: 24px;
  left: 24px;
  border-width: 0 0 1.5px 1.5px;
}

.corner--br {
  bottom: 24px;
  right: 24px;
  border-width: 0 1.5px 1.5px 0;
}

/* --------------------------------------------------------
   Navigation
   -------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: rgba(5, 5, 5, 0.7);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Vertikale Nav-Links — rechts, mittig */
.nav__links {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  list-style: none;
  position: fixed;
  top: 50%;
  right: clamp(20px, 3vw, 60px);
  transform: translateY(-50%);
  z-index: 110;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-size: 0.60rem;
  letter-spacing: 0.20em;
  text-align: right;
  display: block;
}

/* Status rechts oben — bleibt in der Navbar */
.nav__status {
  order: 3;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--type-display-weight);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--color-white);
  transition: color 200ms ease;
}

.nav__logo:hover {
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
}

.nav__logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-neon);
  box-shadow: var(--neon-glow-sm);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.nav__link {
  font-weight: var(--type-nav-weight);
  font-size: 0.60rem;
  letter-spacing: var(--type-nav-spacing);
  color: var(--color-silver);
  text-transform: uppercase;
  position: relative;
  transition: color 200ms ease;
  text-align: right;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-neon);
  box-shadow: var(--neon-glow-sm);
  transition: width 300ms var(--ease-out-expo);
}

.nav__link:hover {
  color: var(--color-white);
}

.nav__link:hover::after {
  width: 100%;
}

/* Status Dot */
.nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.nav__status-label {
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: var(--type-label-spacing);
  color: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------
   AI Badge
   -------------------------------------------------------- */

.ai-badge {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: var(--container-pad);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 0, 48, 0.3);
  background: rgba(255, 0, 48, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.ai-badge__icon {
  color: var(--color-neon);
  font-size: 0.7rem;
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* --------------------------------------------------------
   Main & Three.js Container
   -------------------------------------------------------- */

.main {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.three-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.three-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.three-fallback {
  position: absolute;
  inset: 0;
  /* CSS-only fallback: animated radial neon pulse when no video is present */
  background:
    radial-gradient(ellipse 60% 50% at 65% 50%, rgba(255, 0, 48, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 65% 50%, rgba(255, 0, 48, 0.04) 0%, transparent 60%);
  animation: fallback-pulse 4s ease-in-out infinite alternate;
}

@keyframes fallback-pulse {
  0%   { opacity: 0.6; }
  100% { opacity: 1.0; }
}

.three-fallback__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------
   Hero — State S0
   -------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--container-pad);
  padding-top: calc(var(--nav-height) + 48px);
  pointer-events: auto;
}

/* Eyebrow */
.hero__eyebrow {
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--color-neon);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.7;
}

/* Headline */
.hero__headline {
  font-weight: var(--type-display-weight);
  font-size: clamp(3.2rem, 7vw, 7.5rem);
  letter-spacing: var(--type-display-spacing);
  line-height: 0.92;
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
}

.hero__headline-static {
  display: block;
  opacity: 0.9;
}

.hero__headline-glitch-wrap {
  display: block;
  position: relative;
}

.hero__headline-glitch {
  display: inline-block;
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
  position: relative;
}

/* Glitch-Artefakt via CSS */
.hero__headline-glitch::before,
.hero__headline-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.hero__headline-glitch.is-glitching::before {
  opacity: 0.7;
  color: #00f0ff;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  transform: translateX(-3px);
  animation: glitch-clip-1 80ms steps(1) infinite;
}

.hero__headline-glitch.is-glitching::after {
  opacity: 0.7;
  color: #ff0030;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  transform: translateX(3px);
  animation: glitch-clip-2 80ms steps(1) infinite;
}

@keyframes glitch-clip-1 {
  0%  { clip-path: polygon(0 10%, 100% 10%, 100% 35%, 0 35%); transform: translateX(-4px); }
  25% { clip-path: polygon(0 50%, 100% 50%, 100% 65%, 0 65%); transform: translateX(3px); }
  50% { clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%); transform: translateX(-2px); }
  75% { clip-path: polygon(0 75%, 100% 75%, 100% 90%, 0 90%); transform: translateX(4px); }
}

@keyframes glitch-clip-2 {
  0%  { clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%); transform: translateX(3px); }
  25% { clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%); transform: translateX(-3px); }
  50% { clip-path: polygon(0 70%, 100% 70%, 100% 85%, 0 85%); transform: translateX(2px); }
  75% { clip-path: polygon(0 40%, 100% 40%, 100% 55%, 0 55%); transform: translateX(-4px); }
}

/* Divider */
.hero__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 280px;
}

.hero__divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-neon), transparent);
}

.hero__divider-line:last-child {
  background: linear-gradient(90deg, transparent, rgba(255, 0, 48, 0.2));
}

.hero__divider-diamond {
  font-size: 0.4rem;
  color: var(--color-neon);
  box-shadow: var(--neon-glow-sm);
}

/* Subline */
.hero__subline {
  font-weight: var(--type-body-weight);
  font-style: var(--type-body-style);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--color-silver);
  max-width: 440px;
  margin-bottom: 40px;
}

/* CTAs */
.hero__ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-weight: var(--type-nav-weight);
  font-size: 0.7rem;
  letter-spacing: var(--type-nav-spacing);
  text-transform: uppercase;
  padding: 14px 28px;
  position: relative;
  transition: all 250ms var(--ease-out-expo);
}

.btn--primary {
  background-color: var(--color-neon);
  color: var(--color-bg);
  box-shadow: var(--neon-glow-md);
}

.btn--primary:hover {
  background-color: #ff1a47;
  box-shadow: var(--neon-glow-lg);
  transform: translateY(-2px);
}

.btn--primary .btn__arrow {
  transition: transform 250ms var(--ease-out-expo);
}

.btn--primary:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--ghost {
  border: 1px solid rgba(255, 0, 48, 0.4);
  color: var(--color-silver);
  background: transparent;
}

.btn--ghost:hover {
  border-color: rgba(255, 0, 48, 0.8);
  color: var(--color-white);
  box-shadow: var(--neon-glow-sm);
  background: rgba(255, 0, 48, 0.05);
}

/* --------------------------------------------------------
   State Indicator — vertikale Pips rechts
   -------------------------------------------------------- */

.state-indicator {
  position: fixed;
  right: var(--container-pad);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.state-indicator__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.state-indicator__item {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.state-indicator__label {
  font-weight: var(--type-label-weight);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.state-indicator__item:hover .state-indicator__label,
.state-indicator__item.is-active .state-indicator__label {
  opacity: 1;
  transform: translateX(0);
}

.state-indicator__pip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 0;
}

.state-indicator__bar {
  display: block;
  width: 2px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.15);
  transition: all 300ms var(--ease-out-expo);
}

.state-indicator__item.is-active .state-indicator__bar {
  width: 3px;
  height: 32px;
  background-color: var(--color-neon);
  box-shadow: var(--neon-glow-sm);
}

.state-indicator__pip:hover .state-indicator__bar {
  background-color: rgba(255, 0, 48, 0.5);
  height: 24px;
}

/* --------------------------------------------------------
   Data-Readout — unten links
   -------------------------------------------------------- */

.data-readout {
  position: fixed;
  bottom: 36px;
  left: var(--container-pad);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.data-readout__line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-weight: var(--type-label-weight);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
}

.data-readout__key {
  color: rgba(255, 0, 48, 0.45);
  min-width: 40px;
}

.data-readout__val {
  color: rgba(255, 255, 255, 0.18);
}

/* --------------------------------------------------------
   EKG Line — unten rechts
   -------------------------------------------------------- */

.ekg-container {
  position: fixed;
  bottom: 28px;
  right: calc(var(--container-pad) + 16px);
  z-index: 90;
  width: clamp(160px, 20vw, 300px);
  height: 60px;
  pointer-events: none;
  opacity: 0.4;
}

.ekg-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ekg-line {
  fill: none;
  stroke: var(--color-neon);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
  animation: ekg-draw 4s linear infinite;
  filter: drop-shadow(0 0 3px rgba(255, 0, 48, 0.8));
}

@keyframes ekg-draw {
  0%   { stroke-dashoffset: 600; opacity: 0; }
  5%   { opacity: 1; }
  80%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* --------------------------------------------------------
   Scroll Hint — Mitte unten
   -------------------------------------------------------- */

.scroll-hint {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: scroll-hint-bob 2.5s ease-in-out infinite;
}

.scroll-hint__text {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

.scroll-hint__arrow {
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
}

@keyframes scroll-hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(5px); opacity: 1; }
}

/* --------------------------------------------------------
   Particle System — CSS animated
   -------------------------------------------------------- */

.particles {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  animation: particle-float var(--d) ease-in-out infinite alternate;
}

.particle--red {
  background-color: var(--color-neon);
  box-shadow: 0 0 6px rgba(255, 0, 48, 0.9);
}

.particle--white {
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.particle--silver {
  background-color: rgba(200, 210, 220, 0.5);
  box-shadow: 0 0 4px rgba(200, 210, 220, 0.3);
}

@keyframes particle-float {
  0%   { transform: translateY(0px) scale(1); opacity: 0.4; }
  33%  { opacity: 1; }
  66%  { opacity: 0.6; }
  100% { transform: translateY(-30px) scale(0.6); opacity: 0.1; }
}

/* --------------------------------------------------------
   State Transitions (Content fade)
   -------------------------------------------------------- */

.main.is-transitioning {
  pointer-events: none;
}

.hero.fade-out {
  animation: content-fade-out 200ms var(--ease-out-expo) forwards;
}

.hero.fade-in {
  animation: content-fade-in 400ms var(--ease-out-expo) forwards;
}

@keyframes content-fade-out {
  to { opacity: 0; transform: translateY(-12px); }
}

@keyframes content-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------
   Stagger fade-in auf Hero-Kinder
   -------------------------------------------------------- */

.hero > * {
  animation: hero-stagger 600ms var(--ease-out-expo) both;
}

.hero > *:nth-child(1) { animation-delay: 200ms; }
.hero > *:nth-child(2) { animation-delay: 350ms; }
.hero > *:nth-child(3) { animation-delay: 450ms; }
.hero > *:nth-child(4) { animation-delay: 550ms; }
.hero > *:nth-child(5) { animation-delay: 650ms; }

@keyframes hero-stagger {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------
   Responsive
   -------------------------------------------------------- */

@media (max-width: 768px) {
  .nav__links {
    display: none; /* Mobile: Burger kommt später */
  }

  .state-indicator {
    right: 12px;
  }

  .state-indicator__label {
    display: none;
  }

  .hero__headline {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }

  .hero__subline {
    font-size: 0.875rem;
  }

  .ai-badge {
    right: 12px;
  }

  .ekg-container {
    display: none;
  }

  .data-readout {
    bottom: 60px;
  }
}

/* --------------------------------------------------------
   Glitch Peak Flash — State Transition Midpoint
   -------------------------------------------------------- */

body.glitch-peak .fx-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(255, 0, 48, 0.08) 1px,
    rgba(255, 0, 48, 0.08) 3px
  );
  animation: none;
}

body.glitch-peak::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 0, 48, 0.04);
  pointer-events: none;
  animation: glitch-flash 160ms steps(1) forwards;
}

@keyframes glitch-flash {
  0%   { opacity: 1; transform: translateX(0); }
  25%  { opacity: 0.6; transform: translateX(-4px); }
  50%  { opacity: 1; transform: translateX(3px); }
  75%  { opacity: 0.4; transform: translateX(-2px); }
  100% { opacity: 0; transform: translateX(0); }
}

/* RGB-Shift auf Hero während Peak */
body.glitch-peak .hero__headline {
  animation: rgb-shift 160ms steps(1) forwards;
}

@keyframes rgb-shift {
  0%   { text-shadow: -3px 0 #00f0ff, 3px 0 #ff0030; }
  33%  { text-shadow:  3px 0 #00f0ff, -3px 0 #ff0030; }
  66%  { text-shadow: -2px 0 #ff0030, 2px 0 #00f0ff; }
  100% { text-shadow: none; }
}

/* ============================================================
   SHARED SECTION HERO — alle States (ersetzt altes .hero)
   ============================================================ */

.s-hero {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--container-pad);
  padding-top: calc(var(--nav-height) + 64px);
  padding-left: clamp(48px, 7vw, 120px);
  pointer-events: auto;
}

.s-hero__eyebrow {
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--color-neon);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.7;
}

.s-hero__headline {
  font-weight: var(--type-display-weight);
  font-size: clamp(3.2rem, 7vw, 7.5rem);
  letter-spacing: var(--type-display-spacing);
  line-height: 0.92;
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
}

.s-hero__headline-static {
  display: block;
  opacity: 0.9;
}

/* S0 Glitch-Wort */
.s-hero__headline-glitch-wrap {
  display: block;
  position: relative;
}

.s-hero__headline-glitch {
  display: inline-block;
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
  position: relative;
}

.s-hero__headline-glitch::before,
.s-hero__headline-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}

.s-hero__headline-glitch.is-glitching::before {
  opacity: 0.7;
  color: #00f0ff;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  transform: translateX(-3px);
  animation: glitch-clip-1 80ms steps(1) infinite;
}

.s-hero__headline-glitch.is-glitching::after {
  opacity: 0.7;
  color: #ff0030;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  transform: translateX(3px);
  animation: glitch-clip-2 80ms steps(1) infinite;
}

/* S1–S4 Accent-Zeile (statt Glitch) */
.s-hero__headline-accent {
  display: block;
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
}

.s-hero__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 280px;
}

.s-hero__divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-neon), transparent);
}

.s-hero__divider-line:last-child {
  background: linear-gradient(90deg, transparent, rgba(255,0,48,0.2));
}

.s-hero__divider-diamond {
  font-size: 0.4rem;
  color: var(--color-neon);
}

.s-hero__subline {
  font-weight: var(--type-body-weight);
  font-style: var(--type-body-style);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--color-silver);
  max-width: 440px;
  margin-bottom: 40px;
}

.s-hero__ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Stagger Fade-In für alle Section-Heros */
.s-hero > * {
  animation: hero-stagger 600ms var(--ease-out-expo) both;
}

.s-hero > *:nth-child(1) { animation-delay: 200ms; }
.s-hero > *:nth-child(2) { animation-delay: 350ms; }
.s-hero > *:nth-child(3) { animation-delay: 450ms; }
.s-hero > *:nth-child(4) { animation-delay: 550ms; }
.s-hero > *:nth-child(5) { animation-delay: 650ms; }
.s-hero > *:nth-child(6) { animation-delay: 750ms; }

/* Fade Transitions */
.s-hero.fade-out {
  animation: content-fade-out 200ms var(--ease-out-expo) forwards;
}

.s-hero.fade-in {
  animation: content-fade-in 400ms var(--ease-out-expo) forwards;
}

/* ============================================================
   S1 — WORK
   ============================================================ */

/* Projekt-Filter */
.work-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto 32px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.work-filter__btn {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-weight: var(--type-nav-weight);
  font-size: 0.62rem;
  letter-spacing: var(--type-nav-spacing);
  color: var(--color-silver);
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  background: transparent;
  text-transform: uppercase;
  transition: all 200ms ease;
}

.work-filter__btn:hover,
.work-filter__btn.is-active {
  color: var(--color-white);
  border-color: rgba(255, 0, 48, 0.5);
  background: rgba(255, 0, 48, 0.05);
}

/* Projekt-Grid */
.work-grid {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.work-grid__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.work-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  transition: border-color 300ms ease;
}

.work-card:hover {
  border-color: rgba(255, 0, 48, 0.3);
}

.work-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.work-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out-expo);
  filter: grayscale(0.2);
}

.work-card:hover .work-card__img {
  transform: scale(1.04);
}

.work-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,0.8), transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.work-card:hover .work-card__overlay {
  opacity: 1;
}

.work-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.work-card__placeholder-icon {
  font-size: 2rem;
  color: rgba(255, 0, 48, 0.2);
  transition: color 300ms ease;
}

.work-card:hover .work-card__placeholder-icon {
  color: rgba(255, 0, 48, 0.5);
}

.work-card__placeholder-num {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.1);
}

.work-card__meta {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-card__cat {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--color-neon);
  text-transform: uppercase;
  opacity: 0.7;
}

.work-card__title {
  font-weight: var(--type-title-weight);
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  letter-spacing: var(--type-title-spacing);
  color: var(--color-white);
  text-transform: uppercase;
  line-height: 1.15;
}

.work-card__year {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

/* ============================================================
   S2 — METHOD
   ============================================================ */

.method-steps {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad) 48px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.method-step {
  display: grid;
  grid-template-columns: 60px 1fr 20px;
  gap: 24px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.method-step:last-child {
  border-bottom: none;
}

.method-step__num {
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--color-neon);
  opacity: 0.5;
  padding-top: 4px;
}

.method-step__title {
  font-weight: var(--type-title-weight);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: var(--type-title-spacing);
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.method-step__text {
  font-weight: var(--type-body-weight);
  font-style: var(--type-body-style);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-silver);
  max-width: 480px;
  margin-bottom: 16px;
}

.method-step__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.method-step__tags li {
  font-weight: var(--type-label-weight);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.method-step__connector {
  position: absolute;
  left: 29px;
  bottom: -1px;
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,0,48,0.3), transparent);
}

.method-manifesto {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px var(--container-pad) 64px;
  pointer-events: auto;
}

.method-manifesto__quote {
  border-left: 2px solid rgba(255, 0, 48, 0.4);
  padding-left: 24px;
  font-weight: var(--type-body-weight);
  font-style: var(--type-body-style);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.5);
  max-width: 520px;
}

.method-manifesto__quote cite {
  display: block;
  margin-top: 12px;
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(255, 0, 48, 0.5);
  font-style: normal;
}

/* ============================================================
   S3 — SERVICES
   ============================================================ */

.services-list {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  pointer-events: auto;
}

.service-item {
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
  transition: border-color 300ms ease;
  cursor: default;
}

.service-item:hover {
  border-color: rgba(255, 0, 48, 0.3);
}

.service-item:hover .service-item__title {
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
}

.service-item:hover .service-item__arrow {
  color: var(--color-neon);
  transform: translateX(4px);
}

.service-item__num {
  font-weight: var(--type-label-weight);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255, 0, 48, 0.4);
}

.service-item__title {
  font-weight: var(--type-title-weight);
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: var(--type-title-spacing);
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: color 300ms ease, text-shadow 300ms ease;
}

.service-item__desc {
  font-weight: var(--type-body-weight);
  font-style: var(--type-body-style);
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(200, 210, 220, 0.4);
  max-width: 420px;
  margin-bottom: 10px;
}

.service-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
}

.service-item__tags li {
  font-weight: var(--type-label-weight);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.22);
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.service-item__arrow {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.2);
  transition: color 300ms ease, transform 300ms var(--ease-out-expo);
  justify-self: end;
}

.services-cta {
  position: relative;
  z-index: 10;
  padding: 40px var(--container-pad) 64px;
  max-width: var(--container-max);
  margin: 0 auto;
  pointer-events: auto;
}

/* ============================================================
   S4 — CONTACT
   ============================================================ */

.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.contact-availability__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.contact-availability__text {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: rgba(0, 255, 136, 0.6);
  text-transform: uppercase;
}

.contact-split {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad) 64px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  pointer-events: auto;
}

/* Direkt */
.contact-direct__label {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: rgba(255, 0, 48, 0.5);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.contact-direct__email {
  display: block;
  font-weight: var(--type-title-weight);
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  letter-spacing: 0.04em;
  color: var(--color-white);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 200ms ease, text-shadow 200ms ease;
}

.contact-direct__email:hover {
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
}

.contact-direct__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.contact-social-link:hover {
  opacity: 1;
}

.contact-social-link:not(:hover) {
  opacity: 0.5;
}

.contact-social-link__platform {
  font-weight: var(--type-label-weight);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--color-neon);
  min-width: 24px;
}

.contact-social-link__handle {
  font-weight: var(--type-body-weight);
  font-size: 0.85rem;
  color: var(--color-silver);
}

/* Formular */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  font-weight: var(--type-label-weight);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: rgba(255, 0, 48, 0.5);
  text-transform: uppercase;
}

.contact-form__input {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  outline: none;
  transition: border-color 200ms ease, background 200ms ease;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  width: 100%;
}

.contact-form__input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.contact-form__input:focus {
  border-color: rgba(255, 0, 48, 0.5);
  background: rgba(255, 0, 48, 0.03);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,0,48,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.contact-form__submit {
  align-self: flex-start;
  margin-top: 8px;
}

.contact-form__feedback {
  font-weight: var(--type-label-weight);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 10px 14px;
  border: 1px solid;
  margin-top: 8px;
}

.contact-form__feedback[data-status="ok"] {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.04);
}

.contact-form__feedback[data-status="error"] {
  color: var(--color-neon);
  border-color: rgba(255, 0, 48, 0.3);
  background: rgba(255, 0, 48, 0.04);
}

/* ============================================================
   Nav active state
   ============================================================ */

.nav__link.is-active {
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
}

.nav__link.is-active::after {
  width: 100%;
}

/* ============================================================
   Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .fx-scanlines,
  .ekg-line,
  .scroll-hint,
  .particle,
  .s-hero > *,
  .hero > * {
    animation: none !important;
  }

  .s-hero > *,
  .hero > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Responsive S1–S4
   ============================================================ */

@media (max-width: 768px) {
  .contact-split {
    grid-template-columns: 1fr;
  }

  .method-step {
    grid-template-columns: 40px 1fr;
  }

  .method-step__connector {
    display: none;
  }

  .service-item {
    grid-template-columns: 40px 1fr;
  }

  .service-item__arrow {
    display: none;
  }

  .work-grid__items {
    grid-template-columns: 1fr 1fr;
  }

  /* Show burger on mobile */
  .nav__burger {
    display: flex;
  }

  /* Mobile menu links: animated in when overlay opens */
  .mobile-menu.is-open .mobile-menu__link {
    transform: translateY(0);
  }

  .mobile-menu.is-open .mobile-menu__list li:nth-child(1) .mobile-menu__link { transition-delay: 40ms; }
  .mobile-menu.is-open .mobile-menu__list li:nth-child(2) .mobile-menu__link { transition-delay: 100ms; }
  .mobile-menu.is-open .mobile-menu__list li:nth-child(3) .mobile-menu__link { transition-delay: 160ms; }
  .mobile-menu.is-open .mobile-menu__list li:nth-child(4) .mobile-menu__link { transition-delay: 220ms; }
  .mobile-menu.is-open .mobile-menu__list li:nth-child(5) .mobile-menu__link { transition-delay: 280ms; }
}

/* ============================================================
   Burger Button
   ============================================================ */

.nav__burger {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 600;
  position: relative;
}

.nav__burger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s var(--ease-out-expo), opacity 0.2s ease, background-color 0.2s ease;
  transform-origin: center;
}

/* X state */
.nav__burger.is-open .nav__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--color-neon);
}

.nav__burger.is-open .nav__burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__burger.is-open .nav__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--color-neon);
}

/* ============================================================
   Mobile Menu Overlay
   ============================================================ */

body.menu-open {
  overflow: hidden;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 5, 5, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out-expo);
}

/* Scanline texture overlay */
.mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.15) 3px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.mobile-menu__list li {
  overflow: hidden;
}

.mobile-menu__link {
  display: inline-block;
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2.5rem, 11vw, 6rem);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out-expo), color 0.2s ease, text-shadow 0.2s ease;
  padding: 4px 0;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  color: var(--color-neon);
  text-shadow: var(--neon-text-glow);
  outline: none;
}

.mobile-menu__link.is-active {
  color: var(--color-neon);
}

/* ============================================================
   Single Project — Detail Page
   ============================================================ */

.main--single {
  padding-top: calc(var(--nav-height) + 48px);
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  padding-bottom: 120px;
}

/* Back link */
.single-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-spacing);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 200ms ease;
}

.single-back:hover,
.single-back:focus-visible {
  color: var(--color-neon);
  outline: none;
}

.single-back__arrow {
  font-size: 1rem;
  transition: transform 200ms var(--ease-out-expo);
}

.single-back:hover .single-back__arrow {
  transform: translateX(-4px);
}

/* Hero */
.single-hero {
  margin-bottom: 72px;
}

.single-hero__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 48px;
}

.single-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-out-expo);
}

.single-hero__thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(5, 5, 5, 0.7) 100%);
}

.single-hero__eyebrow {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-spacing);
  color: var(--color-neon);
  margin-bottom: 16px;
}

.single-hero__title {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin-bottom: 24px;
}

.single-hero__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.single-hero__divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.single-hero__divider-diamond {
  color: var(--color-neon);
  font-size: 0.6rem;
}

/* Meta list */
.single-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 28px;
}

.single-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.single-hero__meta-item dt {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: var(--type-label-weight);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.3);
}

.single-hero__meta-item dd {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text);
}

/* Tags */
.single-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.single-hero__tag {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.6rem;
  font-weight: var(--type-label-weight);
  letter-spacing: 0.1em;
  color: var(--color-neon);
  border: 1px solid rgba(255, 0, 48, 0.35);
  padding: 4px 10px;
}

/* Body content */
.single-body {
  border-top: 1px solid var(--color-border);
  padding-top: 56px;
  margin-bottom: 80px;
}

.single-body__content {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text);
  max-width: 720px;
}

.single-body__content h2,
.single-body__content h3 {
  font-weight: 700;
  color: var(--color-white);
  margin-top: 2em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
}

.single-body__content h2 { font-size: 1.5rem; }
.single-body__content h3 { font-size: 1.15rem; }

.single-body__content p { margin-bottom: 1.25em; }

.single-body__content a {
  color: var(--color-neon);
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 48, 0.4);
}

.single-body__content a:hover {
  text-decoration-color: var(--color-neon);
}

.single-body__content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em 0;
}

/* Prev/Next nav */
.single-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border-top: 1px solid var(--color-border);
  padding-top: 48px;
}

.single-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: border-color 200ms ease, background 200ms ease;
}

.single-nav__item:hover,
.single-nav__item:focus-visible {
  border-color: rgba(255, 0, 48, 0.35);
  background: rgba(255, 0, 48, 0.03);
  outline: none;
}

.single-nav__item--next {
  text-align: right;
}

.single-nav__dir {
  font-size: 1.2rem;
  color: var(--color-neon);
  transition: transform 200ms var(--ease-out-expo);
}

.single-nav__item--prev:hover .single-nav__dir { transform: translateX(-4px); }
.single-nav__item--next:hover .single-nav__dir { transform: translateX(4px); }

.single-nav__label {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.58rem;
  font-weight: var(--type-label-weight);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.3);
}

.single-nav__title {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

/* Single — Responsive */
@media (max-width: 768px) {
  .main--single {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .single-nav {
    grid-template-columns: 1fr;
  }

  .single-nav__item--next {
    text-align: left;
  }
}

/* ============================================================
   HUD Tracking Overlay
   ============================================================ */

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

/* Scan-Rahmen — umschließt den rechten 3D-Bereich */
.hud__scan-frame {
  position: fixed;
  right: clamp(20px, 3vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  width: 42vw;
  height: 70vh;
  max-width: 680px;
}

.hud__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 0, 48, 0.45);
  border-style: solid;
  transition: opacity 600ms ease;
}

.hud__corner--tl { top: 0;    left: 0;  border-width: 1px 0 0 1px; }
.hud__corner--tr { top: 0;    right: 0; border-width: 1px 1px 0 0; }
.hud__corner--bl { bottom: 0; left: 0;  border-width: 0 0 1px 1px; }
.hud__corner--br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* Scan-Linie */
.hud__scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,0,48,0.5), transparent);
  animation: hud-scan 3.5s linear infinite;
  opacity: 0.7;
}

@keyframes hud-scan {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 0.7; }
  95%  { opacity: 0.7; }
  100% { top: 100%; opacity: 0; }
}

/* Daten-Readout — links vom Brain, unterhalb der Mitte */
.hud__data {
  position: fixed;
  left: clamp(48px, 7vw, 120px);
  bottom: clamp(60px, 10vh, 120px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
  max-width: 210px;
  z-index: 15;
}

.hud__data-label {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.55rem;
  font-weight: 100;
  letter-spacing: 0.18em;
  color: var(--color-neon);
  margin-bottom: 4px;
  opacity: 0.8;
}

.hud__stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 0, 48, 0.25);
}

.hud__stat-key {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.52rem;
  font-weight: 100;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.hud__stat-val {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
  transition: color 300ms ease;
}

.hud__stat-val.is-updating {
  color: var(--color-neon);
}

/* Progress Bar */
.hud__data-bar {
  height: 1px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.hud__data-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--color-neon);
  transition: width 1.2s var(--ease-out-expo);
  box-shadow: 0 0 6px rgba(255,0,48,0.8);
}

/* Code-Readout */
.hud__data-code {
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.50rem;
  font-weight: 100;
  letter-spacing: 0.14em;
  color: rgba(255,0,48,0.45);
  animation: hud-blink 2.2s step-end infinite;
}

@keyframes hud-blink {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1.0; }
}

/* Koordinaten */
.hud__coords {
  position: fixed;
  bottom: clamp(20px, 4vh, 40px);
  right: clamp(20px, 3vw, 60px);
  display: flex;
  gap: 16px;
  font-family: 'N27', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.50rem;
  font-weight: 100;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.22);
}

/* HUD bei State-Transition ausblenden */
.hud.is-transitioning .hud__data { opacity: 0; transition: opacity 200ms ease; }
.hud.is-transitioning .hud__stats { opacity: 0; }

/* Mobile: HUD vereinfachen */
@media (max-width: 768px) {
  .hud__data { display: none; }
  .hud__scan-frame { width: 80vw; right: 10%; }
  .hud__coords { display: none; }
}
