/* 1. Schriftart aus Datei laden */
@font-face {
  font-family: "ankacoder";
  src: url("../assets/fonts/AnkaCoder-r.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "tiltneon";
  src: url("../assets/fonts/TiltNeon-Regular-VariableFont_XROT\,YROT.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "madimione";
  src: url("../assets/fonts/MadimiOne-Regular.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

.font-ankacoder {
  font-family: "ankacoder", sans-serif;
}

.font-tiltneon {
  font-family: "tiltneon", sans-serif;
}

.font-madimione {
  font-family: "madimione", sans-serif;
}

/* 3. Dein Hover-Gradient (unverändert) */
@property --c1 {
  syntax: "<color>";
  inherits: false;
  initial-value: #ffffff;
}
@property --c2 {
  syntax: "<color>";
  inherits: false;
  initial-value: #ffffff;
}
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.gradient-hover {
  background-image: linear-gradient(
    var(--angle),
    var(--c1) 65%,
    var(--c2) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition:
    --c1 0.5s ease-in-out,
    --c2 0.5s ease-in-out,
    --angle 2s ease-in-out;
}

.gradient-hover:hover {
  --c1: #ff5f1f;
  --c2: #d81b1b;
  --angle: 360deg;
}

/* ============ THEME VARIABLES ============ */
@property --bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #1e1e1e;
}
@property --text {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffffff;
}
@property --divider {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffffff;
}
@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(255, 255, 255, 0);
}
@property --menu-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(255, 255, 255, 0.22);
}
@property --glass-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(30, 30, 30, 0.4);
}

:root {
  --bg: #1e1e1e;
  --text: #ffffff;
  --divider: #ffffff;
  --glow: rgba(255, 255, 255, 0);
  --menu-glow: rgba(255, 255, 255, 0.22);
  --glass-bg: rgba(30, 30, 30, 0.4);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --text: #1e1e1e;
  --divider: #1e1e1e;
  --glow: rgba(0, 0, 0, 0.22);
  --menu-glow: rgba(0, 0, 0, 0.22);
  --glass-bg: rgba(30, 30, 30, 0.78);
}

html {
  transition:
    --bg 0.3s ease,
    --text 0.3s ease,
    --divider 0.3s ease,
    --glow 0.3s ease,
    --menu-glow 0.3s ease,
    --glass-bg 0.3s ease;
}

html.theme-switching * {
  transition: none !important;
}

/* ============ PANELS ============ */
.theme-panel {
  box-shadow: 0 0 30px var(--glow);
}

#mobile-menu {
  box-shadow: 0 0 30px var(--menu-glow);
}

#navbar.menu-open {
  box-shadow: none;
}

.squircle {
  border-radius: 24px;
  corner-shape: squircle;
}

.i18n-fade {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    opacity 160ms ease,
    transform 160ms ease;
  will-change: opacity, transform;
}

.i18n-fade.is-hiding {
  opacity: 0;
  transform: translateY(6px);
}

#side-panel-footer > div {
  flex-wrap: nowrap;
  white-space: nowrap;
}

#mobile-menu {
  transition-property: opacity, scale;
  will-change: opacity, scale;
}

#mobile-menu hr {
  display: block;
}

html {
  scrollbar-gutter: stable;
}

#nav-links > * {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 300ms ease,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.menu-visible #nav-links > *:not(.is-hiding) {
  opacity: 1;
  transform: translateY(0);
}

body.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
}

/* ============ CAROUSEL ============ */
.carousel-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--divider);
  opacity: 0.35;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  padding: 0;
  transition:
    width 0.45s ease,
    opacity 0.3s ease,
    background-color 0.3s ease;
}

.carousel-dot.active {
  width: 64px;
  opacity: 1;
  background: color-mix(in srgb, var(--divider) 22%, transparent);
}

.carousel-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: var(--text);
}

@keyframes carouselFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.carousel-nav-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 12%, transparent);
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .carousel-nav-btn:hover {
    background: color-mix(in srgb, var(--text) 25%, transparent);
  }
  .carousel-nav-btn:active {
    transform: scale(0.92);
  }
}

.text-gradient {
  background-image: linear-gradient(90deg, #ff5f1f, #d81b1b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.carousel-slide {
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.carousel-slide.is-leaving {
  opacity: 1;
  z-index: 1;
  transition: none;
}

.carousel-slide.is-current {
  opacity: 1;
  z-index: 2;
}

.carousel-slide > video {
  display: block;
  background: transparent;
  pointer-events: none;
}

/* ============ BOUNCY BUTTON ANIMATION ============ */
.btn-bounce {
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  .btn-bounce:hover {
    transform: scale(1.06);
  }
}

@keyframes btnBounceKey {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.88);
  }
  100% {
    transform: scale(1);
  }
}

.btn-bounce.is-bouncing {
  animation: btnBounceKey 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.35);
}

#navbar-logo {
  transition:
    transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
    translate 350ms cubic-bezier(0.22, 1, 0.36, 1),
    scale 350ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

#open-menu-btn,
#close-menu-btn html {
  scroll-behavior: auto;
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 9999px;
  cursor: pointer;
  color: #ffffff;
  background: rgba(30, 30, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 12px -2px rgba(30, 30, 30, 0.3);
  opacity: 0;
  pointer-events: none;
  translate: 0 12px;
  transition:
    transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.35),
    opacity 0.3s ease,
    translate 0.3s ease,
    background-color 0.2s ease;
}

.back-to-top svg {
  width: 40%;
  height: 40%;
}

.back-to-top.is-visible {
  opacity: 0.9;
  pointer-events: auto;
  translate: 0 0;
}

/* Tablet: größer */
@media (min-width: 768px) {
  .back-to-top {
    width: 52px;
    height: 52px;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
}

/* Desktop: noch größer, weiter vom Rand weg, in Markenfarbe */
@media (min-width: 1024px) {
  .back-to-top {
    width: 60px;
    height: 60px;
    right: 2.5rem;
    bottom: 2.5rem;
    background-color: #ff5f1f;
    background-image: linear-gradient(135deg, #ff5f1f, #d81b1b);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px -4px rgba(255, 95, 31, 0.5);
  }
}

@media (hover: hover) and (pointer: fine) {
  .back-to-top.is-visible:hover {
    opacity: 1;
    transform: scale(1.08);
  }
}
.back-to-top.is-visible:active {
  transform: scale(0.92);
}

/* ============ SPONSOREN ============ */
.sponsor-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.75rem 0 0.5rem;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 25%,
    black 75%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 25%,
    black 75%,
    transparent 100%
  );
}

.sponsor-track {
  display: flex;
  align-items: flex-end;
  width: max-content;
}

.sponsor-group {
  display: flex;
  align-items: flex-end;
  gap: 3rem;
  padding-right: 3rem;
  flex-shrink: 0;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

html,
body {
  overflow-x: clip;
} /* clip statt hidden, damit sticky weiter funktioniert */

.sponsor-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  object-position: bottom;
  transform-origin: bottom center;
  filter: brightness(0) invert(1); /* dark mode: weiß */
  transition:
    filter 0.35s ease,
    transform 0.35s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="light"] .sponsor-logo {
  filter: brightness(0) invert(0.118); /* light mode: #1e1e1e */
}
@media (hover: hover) and (pointer: fine) {
  .sponsor-logo:hover,
  html[data-theme="light"] .sponsor-logo:hover {
    filter: none; /* erst beim Hover farbig */
    transform: scale(1.08);
  }
}
@media (min-width: 768px) {
  .sponsor-logo {
    height: 3rem;
  }
}
@media (min-width: 1024px) {
  #sponsor_wheel {
    --fr: 3rem; /* Größe der Kehle, muss kleiner als --section-gap sein */
    position: relative;
    filter: drop-shadow(0 0 15px var(--glow));
  }
  .sponsor-band {
    position: relative;
    overflow: visible;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
    box-shadow: none;
  }
}

@supports (corner-shape: superellipse(-2)) {
  @media (min-width: 1024px) {
    .sponsor-band::before,
    .sponsor-band::after,
    #sponsor_wheel::before,
    #sponsor_wheel::after {
      content: "";
      position: absolute;
      width: var(--fr);
      height: var(--fr);
      background: var(--bg);
      pointer-events: none;
      corner-shape: superellipse(-2); /* konkaver Squircle */
    }
    /* oben links / oben rechts */
    .sponsor-band::before {
      left: 0;
      bottom: calc(100% - 1px);
      border-top-right-radius: var(--fr);
    }
    .sponsor-band::after {
      right: 0;
      bottom: calc(100% - 1px);
      border-top-left-radius: var(--fr);
    }
    /* unten links / unten rechts */
    #sponsor_wheel::before {
      left: calc(50% - 50vw);
      top: calc(100% - 1px);
      border-bottom-right-radius: var(--fr);
    }
    #sponsor_wheel::after {
      right: calc(50% - 50vw);
      top: calc(100% - 1px);
      border-bottom-left-radius: var(--fr);
    }
  }
}

.sponsor-logo.is-active,
html[data-theme="light"] .sponsor-logo.is-active {
  filter: none;
}

.sponsor-info {
  display: grid;
  width: 100%;
  max-width: 28rem;
  text-align: center;
}
.sponsor-info-item {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.sponsor-info-item.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* ============ DYNAMIC ROADMAP CANVAS ============ */
.roadmap-scroll-container {
  width: 100%;
  height: clamp(380px, 50vh, 550px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  background: transparent;
  box-shadow: none;
  margin-top: 0.5rem;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 22%, var(--bg)) transparent;
}
.roadmap-scroll-container {
  user-select: none;
}

/* Container reicht bis an den Panelrand, mehr nutzbare Breite */
@media (min-width: 768px) {
  .roadmap-scroll-container {
    width: calc(100% + 4rem);
    margin-inline: -2rem;
  }
}

.roadmap-scroll-container:active {
  cursor: grabbing;
}
.roadmap-scroll-container::-webkit-scrollbar {
  height: 8px;
}
.roadmap-scroll-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}
.roadmap-scroll-container::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 22%, var(--bg));
  border-radius: 9999px;
}

.roadmap-canvas-wrapper {
  min-width: 2600px;
  width: 100%;
  height: 100%;
  position: relative;
}

#dynamic-roadmap-svg {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

#dynamic-roadmap-svg path,
#dynamic-roadmap-svg line,
#dynamic-roadmap-svg polyline {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-line {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 14%, var(--bg));
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-dot {
  fill: var(--bg);
  stroke: color-mix(in srgb, var(--text) 25%, var(--bg));
  stroke-width: 4;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27),
    stroke 0.2s ease,
    fill 0.2s ease,
    filter 0.2s ease;
  cursor: crosshair;

  /* ← DAS BEHEBT DAS FLACKERN */
  transform-box: fill-box;
  transform-origin: center;
}

@media (hover: hover) and (pointer: fine) {
  .rm-dot:hover {
    transform: scale(1.4);
    stroke: var(--text);
  }
  .rm-dot.is-active:hover {
    fill: #ff5f1f;
    filter: drop-shadow(0 0 12px rgba(255, 95, 31, 0.7));
  }
}

.rm-label {
  fill: var(--text);
  font-family: "ankacoder", monospace;
  font-size: 13px;
  text-anchor: middle;
  opacity: 0.5;
  pointer-events: none;
}

.rm-line.is-active {
  stroke: #ff5f1f;
  filter: drop-shadow(0 0 8px rgba(255, 95, 31, 0.4));
}
.rm-dot.is-active {
  stroke: #ff5f1f;
}
.rm-label.is-active {
  opacity: 1;
}
.rm-pill-bg {
  fill: var(--text);
  rx: 8;
}
.rm-pill-text {
  fill: var(--bg);
  font-family: "madimione", sans-serif;
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.rm-check-bg {
  fill: var(--bg);
  stroke: color-mix(in srgb, var(--text) 15%, var(--bg));
  stroke-width: 4;
}
.rm-check-bg.is-active {
  stroke: #ff5f1f;
}
.rm-check-tick {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 15%, var(--bg));
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rm-check-tick.is-active {
  stroke: #ff5f1f;
}

.rm-spinner-bg {
  fill: var(--bg);
}

.rm-loading-ring {
  fill: none;
  stroke: #ff5f1f;
  stroke-width: 4;
  stroke-dasharray: 22 10;
  stroke-linecap: round;
  opacity: 1;
  animation: rm-spin 1.6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 95, 31, 0.9));
}

@keyframes rm-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.device-slide {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  will-change: opacity;
}
.device-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.device-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background: var(--text);
  opacity: 0.3;
  cursor: pointer;
  transition:
    width 0.3s ease,
    opacity 0.3s ease;
}
.device-dot.is-active {
  width: 24px;
  opacity: 1;
}

#app-preview {
  height: calc(100dvh - 2rem);
  min-height: 34rem;
}

.device-slide {
  min-height: 0;
  height: 100%;
}

.device-img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* ============ GLASS-BUTTON ============ */
.glass-btn {
  color: #ffffff;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 12px -2px rgba(30, 30, 30, 0.3);
}

.glass-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.9);
  color: #1e1e1e;
}
html[data-theme="light"] .glass-btn[aria-expanded="true"] {
  background-color: #ff5f1f;
  background-image: linear-gradient(135deg, #ff5f1f, #d81b1b);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ============ INFO-PANEL ============ */
.info-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  width: 100%;
}
.info-panel.is-open {
  grid-template-rows: 1fr;
}

/* ============ ABOUT-US: BILD-RAHMEN ============ */
.img-frame {
  position: relative;
  isolation: isolate;
  --shadow-width: 90%;
  --shadow-height: 60px;
  --shadow-color: 0, 0, 0;
  --shadow-opacity: 0.3;
}

:root[data-theme="dark"] .img-frame {
  --shadow-color: 0, 0, 0;
  --shadow-opacity: 0.5;
  --shadow-height: 90px;
}

.img-frame::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--shadow-width);
  height: var(--shadow-height);
  transform: translateX(-50%);
  background: radial-gradient(
    50% 100% at 50% 100%,
    rgba(var(--shadow-color), var(--shadow-opacity)) 0%,
    rgba(var(--shadow-color), 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.img-frame > img {
  position: relative;
  z-index: 1;
}

.shine-sweep {
  background-image: linear-gradient(
    90deg,
    var(--text) 0%,
    var(--text) 35%,
    #ff5f1f 45%,
    #d81b1b 55%,
    var(--text) 65%,
    var(--text) 100%
  );
  background-size: 400% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shineSweep 8s linear infinite;
  will-change: background-position;
}

@keyframes shineSweep {
  0% {
    background-position: 100% 0;
    animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  }
  40% {
    background-position: 0% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

.diagram-path {
  transition:
    opacity 0.25s ease,
    stroke-width 0.25s ease,
    filter 0.25s ease;
}
#diagram:has(.info-btn[aria-expanded="true"]) .diagram-path {
  opacity: 0.2;
}
#diagram:has(.info-btn[data-info-target="1"][aria-expanded="true"])
  .diagram-path[data-path="1"],
#diagram:has(.info-btn[data-info-target="2"][aria-expanded="true"])
  .diagram-path[data-path="2"],
#diagram:has(.info-btn[data-info-target="3"][aria-expanded="true"])
  .diagram-path[data-path="3"] {
  opacity: 1;
  stroke-width: 4;
  filter: drop-shadow(0 0 4px rgba(242, 106, 46, 0.7));
}

.info-card {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 18px;
  border-left: 4px solid #f26a2e;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  text-align: left;
}
.info-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.info-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  color: #fff;
  background: linear-gradient(180deg, #f26a2e, #d9441f);
  box-shadow: 0 2px 6px rgba(242, 106, 46, 0.45);
}
.info-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text);
}
.info-arrow {
  color: #f26a2e;
  font-family: sans-serif;
}
.info-text {
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.85;
}
.diagram-info-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.25s ease,
    opacity 0.25s ease;
}
.diagram-info-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.diagram-info-panel > div {
  min-height: 0;
  overflow: hidden;
}

/* ============ DIAGRAMM ============ */
#diagram {
  --reserve: 16rem;
  --info-h: 0px;
  width: min(
    100%,
    max(12rem, calc((100dvh - var(--reserve) - var(--info-h)) * 3 / 5.6))
  );
  transition: width 0.3s ease;
}

@media (min-width: 768px) {
  #diagram {
    --reserve: 18rem;
  }
}

/* ============ KOMPONENTEN: DATENBLATT ============ */
.sweep-card {
  padding: 1px;
  border-radius: 26px;
  corner-shape: squircle;
  background-image: linear-gradient(
    90deg,
    var(--text) 0%,
    var(--text) 35%,
    #ff5f1f 45%,
    #d81b1b 55%,
    var(--text) 65%,
    var(--text) 100%
  );
  background-size: 400% 100%;
  animation: shineSweep 8s linear infinite;
}

.sweep-inner {
  background: var(--bg);
  border-radius: 25px;
  corner-shape: squircle;
  padding: 1.25rem 1rem 0.75rem; /* war: 1.25rem 1.25rem 0.75rem */
  text-align: left;
}

/* ---- Kennzahlen-Strip ---- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  overflow: hidden;
  border-radius: 24px;
  corner-shape: squircle;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 0.9rem 0.4rem 0.85rem;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.stat-v {
  font-family: "madimione", sans-serif;
  font-size: clamp(0.9rem, 2.6vw, 1.1rem);
  line-height: 1.15;
  background-image: linear-gradient(135deg, #ff5f1f, #d81b1b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-l {
  font-family: "tiltneon", sans-serif;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text);
  opacity: 0.55;
}

/* ---- Datasheet-Titel ---- */
.spec-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.2rem 0 0.9rem;
  font-family: "tiltneon", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

.spec-head::before,
.spec-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--divider) 40%,
    var(--divider) 60%,
    transparent
  );
  border-radius: 999px;
}

/* ---- Datasheet-Zeile (Grid: feste Key-Spalte + flexible Wert-Spalte) ---- */
.spec-row {
  display: grid;
  grid-template-columns: minmax(4.75rem, max-content) 1fr;
  align-items: center;
  column-gap: 0.6rem; /* war: 1.25rem  → spart ~10 px */
  padding: 0.85rem 0; /* war: 0.85rem 0.25rem → spart ~8 px */
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  font-family: "ankacoder", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease;
}

.spec-head + .spec-row {
  border-top: 0;
}

.spec-row:last-child {
  padding-bottom: 0.6rem;
}

@media (hover: hover) and (pointer: fine) and (max-width: 899px) {
  .spec-row:hover {
    background: color-mix(in srgb, var(--text) 3%, transparent);
  }
}

/* Key: klein, gesperrt, dezent */
.spec-k {
  font-family: "tiltneon", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.04em; /* war: 0.06em → etwas kompakter */
  text-transform: uppercase;
  opacity: 0.5;
  white-space: nowrap;
}

/* Wert-Zelle: rechtsbündig, umbruchfähig */
.spec-row > span:not(.spec-k) {
  display: block;
  min-width: 0;
  text-align: right;
  text-wrap: balance; /* ← das ist der Trick */
}

/* Gestapelte Werte – nur für Zeilen mit data-stack="true" */
.spec-row[data-stack="true"] > span:not(.spec-k) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15em;
}

.spec-row[data-stack="true"] > span:not(.spec-k) > span {
  display: block;
}

/* ============ KOMPONENTEN: VIDEO ============ */
.cmp-video {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 24px;
  corner-shape: squircle;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.cmp-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease;
}
.cmp-video video.is-current {
  opacity: 1;
  z-index: 2;
}
.cmp-video video.is-leaving {
  opacity: 1;
  z-index: 1;
  transition: none;
}

/* ============ TM-ZEICHEN ============ */
.tm {
  font-family: "tiltneon";
  font-size: 0.6em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.05em;
}

/* ============ KOMPONENTEN: BESCHREIBUNG ============ */
.cmp-desc-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cmp-desc-head,
.cmp-desc-foot {
  display: flex;
  align-items: center;
  width: 75%;
  height: 1rem;
}

.cmp-desc-head {
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cmp-desc-head > span:not(.cmp-desc-line) {
  line-height: 1;
}

.cmp-desc-foot {
  margin-top: 0.5rem;
}

.cmp-desc-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--divider) 40%,
    var(--divider) 60%,
    transparent
  );
  border-radius: 999px;
}

.cmp-desc {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  text-align: center;
  font-family: "tiltneon";
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0.8;
}

/* ============ DIAGRAMM: KLEINE HANDYS ============ */
@media (max-width: 430px) and (max-height: 700px) {
  #system-card {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  #diagram {
    --reserve: 7rem;
    width: min(
      100%,
      max(17rem, calc((100dvh - var(--reserve) - var(--info-h)) * 3 / 5.6))
    );
  }
  #diagram span.whitespace-nowrap {
    font-size: 1rem;
  }
}

/* ============ INSTALL-BUTTON: "NICHT VERFÜGBAR" ============ */
@keyframes btnDenyShake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-8px);
  }
  30% {
    transform: translateX(8px);
  }
  45% {
    transform: translateX(-6px);
  }
  60% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateX(3px);
  }
}

.store-item a.glass-btn {
  transition:
    background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-item a.glass-btn.is-denied {
  background-color: #dc3838;
  background-image: none;
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  box-shadow:
    0 0 28px rgba(220, 56, 56, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.15);
  animation: btnDenyShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ============ DEVICE FRAME + SCREEN VIDEO ============ */
.device-frame {
  position: relative;
  height: 100%;
  width: fit-content;
  margin: 0 auto;
  --screen-top: 3.2%;
  --screen-right: 4.5%;
  --screen-bottom: 3.2%;
  --screen-left: 4.5%;
  --screen-radius: 1.5rem;
}

.device-slide[data-os="iOS"] .device-frame {
  --screen-top: 2.4%;
  --screen-right: 5.3%;
  --screen-bottom: 2.5%;
  --screen-left: 5.3%;
  --screen-radius: 1.8rem;
}

.device-slide[data-os="Android"] .device-frame {
  --screen-top: 1.2%;
  --screen-right: 3.5%;
  --screen-bottom: 1.2%;
  --screen-left: 2.8%;
  --screen-radius: 0.7rem;
}

.device-screen {
  position: absolute;
  top: var(--screen-top);
  right: var(--screen-right);
  bottom: var(--screen-bottom);
  left: var(--screen-left);
  z-index: 1;
  border-radius: var(--screen-radius);
  overflow: hidden;
  background: #000;
}

.device-screen .device-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device-frame > .device-img {
  position: relative;
  z-index: 2;
  height: 100%;
  width: auto;
  max-width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}
#navbar.menu-open #navbar-logo {
  transform: translate(10vw, 15px) scale(1.25);
}

#navbar.menu-open #close-menu-btn {
  transform: translate(-9vw, 15px) scale(1.5);
}

@media (min-width: 768px) {
  #navbar.menu-open #navbar-logo {
    transform: translate(11vw, 15px) scale(1.25);
  }

  #navbar.menu-open #close-menu-btn {
    transform: translate(-10vw, 15px) scale(1.5);
  }
}

@media (min-width: 1024px) {
  #navbar.menu-open #navbar-logo {
    transform: translate(110px, 20px) scale(1.25);
  }

  #navbar.menu-open #close-menu-btn {
    transform: translate(-100px, 20px) scale(1.5);
  }
}

/* ============ TEAM PICTURE SCHATTEN ============ */
/* In beiden Modi derselbe Schatten wie im Light Mode der Theme Panels */
.team-card {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.22);
}

#navbar-desktop {
  filter: drop-shadow(0 0 30px var(--glow));
}

/* ============ DESKTOP-NAVBAR: alle Segmente schalten synchron ============ */
/* Eigene, NICHT animierte Theme-Werte nur für die Navbar. Dadurch faden die
   Fill-Flächen nicht mehr, sondern wechseln im selben Moment wie die
   Kappen- und Logo-Bilder. */
#navbar-desktop {
  --bg: #1e1e1e;
  --text: #ffffff;
  --glow: rgba(255, 255, 255, 0);
}

html[data-theme="light"] #navbar-desktop {
  --bg: #ffffff;
  --text: #1e1e1e;
  --glow: rgba(0, 0, 0, 0.22);
}

#navbar-desktop,
#navbar-desktop * {
  transition: none !important;
}

/* Schnappschuss der alten Navbar, die beim Theme-Wechsel ausfadet */
.navbar-ghost {
  position: absolute;
  z-index: 50;
  pointer-events: none;
}
.navbar-ghost > header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  translate: none !important;
  transform: none !important;
}

/* ============ DESKTOP-NAVBAR: HOVER-FADES ============ */
/* Erlaubt weiche Hover-Übergänge für Textlinks und Mini-Buttons.
   Der Theme-Wechsel bleibt weiterhin hart/synchron (via .theme-switching). */

#navbar-desktop nav a,
#navbar-desktop nav button {
  transition:
    color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    scale 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.35) !important;
}

/* Sanftes Skalieren beim Hover */
#navbar-desktop nav a {
  display: inline-block; /* nötig, falls es mal keine Flex-Items sind */
  transform-origin: center center;
  scale: 1;
  will-change: scale;
}
#navbar-desktop nav a:hover {
  scale: 1.08; /* etwas mehr, weil 5 % kaum sichtbar ist */
}

/* Optional: Mini-Buttons (Theme / Sprache) auch leicht skalieren */
#navbar-desktop nav button {
  scale: 1;
}
#navbar-desktop nav button:hover {
  scale: 1.08;
}

/* Während des Theme-Wechsels alles hart schalten */
html.theme-switching #navbar-desktop nav a,
html.theme-switching #navbar-desktop nav button {
  transition: none !important;
}

/* ============ DESKTOP-NAVBAR: BUTTONS OHNE .btn-bounce-HOVER-TRANSFORM ============ */
/* Höhere Specificity reicht – KEIN !important, sonst wird die Click-Animation
   (btnBounceKey-Keyframes) überstimmt und der Bounce ist unsichtbar. */
#navbar-desktop nav button.btn-bounce:hover {
  transform: none;
}

/* ============ DESKTOP-NAVBAR: RESPONSIVE SIZING ============ */
/* Startet kompakt bei 1024px (lg) und wächst smooth bis 120px bei ~1400px.
   --cap-h (Fill-Höhe) wird bewusst größer gehalten, damit die Links
   vertikal atmen können. Der Name skaliert sanft mit. */

#navbar-desktop {
  /* Fallback für alles außerhalb des Media-Query */
  --nav-h: 120px;
  --cap-h: calc(var(--nav-h) * 0.62);
  --logo-h: calc(var(--nav-h) * 1.146);
  --nav-font: calc(var(--nav-h) * 0.2);
  --btn-size: max(30px, calc(var(--nav-h) * 0.32));
}

@media (min-width: 1024px) {
  #navbar-desktop {
    /* 96px bei 1024 → 120px bei ~1400 → deckelt danach */
    --nav-h: clamp(96px, calc(10vw - 6px), 120px);
    /* Fill-Höhe deutlich größer als vorher (vorher 0.592) → mehr Platz */
    --cap-h: calc(var(--nav-h) * 0.68);
    /* Buttons skalieren mit, aber mit Untergrenze für Touchbarkeit */
    --btn-size: clamp(30px, calc(var(--nav-h) * 0.34), 40px);
    /* Schrift skaliert mit der Navbar, aber lesbar bleibend */
    --nav-font: clamp(16px, calc(var(--nav-h) * 0.19), 22px);
  }
}

/* Gaps und Padding in den Navs responsiv machen */
#navbar-desktop nav {
  gap: clamp(0.75rem, 1.8vw, 4rem);
  padding-left: clamp(0.75rem, 1.2vw, 1.25rem);
  padding-right: clamp(0.75rem, 1.2vw, 1.25rem);
}

/* ==== VERTIKALE ZENTRIERUNG DER NAV-LINKS ==== */
/* Der entscheidende Punkt: line-height:1 + inline-flex sorgt dafür, dass
   die Links exakt mittig in der Fill-Höhe sitzen, ohne Zeilen-Baseline-
   Verschiebung durch die Schrift-Metriken. */
#navbar-desktop nav > a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

#navbar-desktop nav > div {
  /* Die Buttons sitzen in einem Flex-Container – der muss auch sauber
     vertikal zentriert sein, sonst sitzen Theme/Lang-Buttons höher/tiefer. */
  display: flex;
  align-items: center;
}

/* ==== NAME TRACEAID: SKALIERT JETZT SANFT MIT ==== */
#navbar-desktop nav > a:first-child img {
  width: clamp(6.75rem, 9vw, 8.5rem); /* 108px → 136px */
  flex-shrink: 0;
}

/* ============ MITTLERES LOGO: KEIN DURCHGEHENDER STREIFEN ============ */
/* Die Fills und der Mittelbereich zeigen jetzt dieselbe Hintergrundfarbe
   wie die Seite. Der optische "Notch" um das Hexagon entsteht durch die
   natürliche Transparenz zwischen den Grid-Spalten. Das Hexagon bleibt
   vollständig sichtbar, weil keine Rechteck-Fläche mehr seine Ränder
   überdeckt. */
#navbar-desktop > a.squircle,
#navbar-desktop > a:not([href]) {
  isolation: isolate;
}

/* ============ NAVBAR: BILDER NICHT DRAGBAR ============ */
#navbar img,
#navbar svg,
#navbar-desktop img,
#navbar-desktop svg {
  -webkit-user-drag: none;
  user-select: none;
}

/* ============ DESKTOP-NAVBAR: EIN FILL, MITTE-HEXAGON ============ */
/* Der Fill ist ein durchgehender Balken. Das Hexagon ist ein normales
   Flex-Child, übersteht oben und unten (overflow visible), und die Navs
   liegen mit z-20 über dem Hexagon (z-10). */
#navbar-desktop .navbar-fill {
  overflow: visible;
}

/* ============ SAMSUNG (ANDROID): VIDEO OBEN/UNTEN BESCHNEIDEN ============ */
.device-slide[data-os="Android"] .device-screen .device-video {
  transform: scaleY(1.04); /* etwas mehr Höhe → oben/unten wird abgeschnitten */
  transform-origin: center;
}

/* ============ CANSAT ANIMATION GLOW ============ */
.cansat-glow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  transition: background 0.3s ease;
  pointer-events: none;
}

/* Dark Mode: Weißer Blur */
html[data-theme="dark"] .cansat-glow {
  background: rgba(255, 255, 255, 0.3);
}

/* Light Mode: Schwarzer Blur */
html[data-theme="light"] .cansat-glow {
  background: rgba(255, 95, 31, 0.3);
}

@media (min-width: 1024px) {
  .team-card {
    box-shadow: none;
    overflow: visible;
    background: none;
  }
  .team-photo {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.22);
  }
  .team-text {
    margin-top: 0;
    box-shadow: 0 0 30px var(--glow);
  }
}
/* ============ HERO BADGE ============ */
@media (min-width: 1024px) {
  .hero-badge {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.22);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hero-badge span {
    color: #1e1e1e;
    opacity: 1;
  }
}

:root {
  --section-gap: 2rem;
}

@media (min-width: 1024px) {
  :root {
    --section-gap: 5rem;
  }

  /* Die Karte füllt den sichtbaren Bereich exakt, kein Restabstand mehr unten */
  #cansat-animation {
    min-height: 0;
    max-height: none;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  /* gleicht das 1.5rem padding-bottom des Sticky-Containers aus */
  .pin-section {
    margin-bottom: -1.5rem;
  }

  /* Panel weg, Seite ist weiß -> immer dunkle Farben */
  .lg-flat {
    --bg: #ffffff;
    --text: #1e1e1e;
    --divider: #1e1e1e;
    --glow: transparent;
  }
}

@media (min-width: 1024px) {
  .pin-section,
  .team-wrap,
  .explain-wrap {
    width: clamp(46rem, 60vw, 100%);
    margin-inline: auto;
  }
}

@media (min-width: 1024px) {
  .sponsor-info {
    display: none;
  }
}

/* ============ HERO: optisch tiefer zentrieren ============ */
/* Der Flex-Container zentriert den Inhalt bereits. Das Padding-top
   verschiebt ihn zusätzlich nach unten. Effektive Verschiebung =
   die Hälfte dieses Werts (weil `items-center` im gepaddeten
   Content-Box zentriert). */
@media (min-width: 1024px) {
  .pin-sticky {
    padding-top: clamp(4rem, 10vh, 12rem);
  }
}

/* ============ EXPLAIN: ab lg zwei getrennte Panels ============ */
@media (min-width: 1024px) {
  .explain-card {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }
  .explain-text,
  .explain-media {
    background: var(--bg);
    box-shadow: 0 0 30px var(--glow);
  }
}

/* ============ MISSION: KOMPONENTEN ALS ZWEI BLÖCKE (wie Startseite) ============ */
@media (min-width: 1024px) {
  .cmp-card {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }
  .cmp-media-block,
  .cmp-sheet-block {
    background: var(--bg);
    box-shadow: 0 0 30px var(--glow);
  }
}

/* ============ HERO-CAROUSEL: hochkant + passt in die Viewport-Höhe ============ */
#traceaid-explain {
  /* Platz, den alles AUSSER dem Video braucht (Padding, Titel, Controls, Text, CTA) */
  --explain-reserve: 30rem;
}

@media (min-width: 1024px) {
  #traceaid-explain {
    /* ab lg liegt der Text daneben, es bleiben nur Padding + Controls */
    --explain-reserve: 12rem;
  }
}

#hero-carousel {
  aspect-ratio: 4 / 5;
  /* Breite = kleinster Wert aus: verfügbare Breite, 26rem, und der Breite,
     bei der das Video (4:5) noch in die Resthöhe passt. Mindestens 11rem. */
  width: min(
    100%,
    26rem,
    max(11rem, calc((100dvh - var(--explain-reserve)) * 0.8))
  );
  margin-inline: auto;
}

#carousel-track {
  position: absolute;
  inset: 0;
  height: auto;
}

/* ============ EXPLAIN: Glow hinter dem Video (nur lg, nur Dark Mode) ============ */
.explain-glow {
  display: none;
}

@media (min-width: 1024px) {
  .explain-media {
    position: relative;
    overflow: hidden; /* Blur wird am Panelrand abgeschnitten, wie bei der CanSat-Box */
  }

  /* Video + Controls liegen über dem Glow */
  .explain-media > *:not(.explain-glow) {
    position: relative;
    z-index: 1;
  }

  .explain-glow {
    display: block;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
    background: transparent;
    transition: background 0.3s ease;
  }

  html[data-theme="dark"] .explain-glow {
    background: rgba(255, 255, 255, 0.3); /* gleicher Wert wie .cansat-glow */
  }
}

/* AT&S: zwei Bilder übereinander, Ruhe vs. Hover/aktiv */
.sponsor-swap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
}

/* Idle: fertige Version, kein Weiß-Filter */
html .sponsor-logo.sponsor-logo--idle {
  filter: none; /* Dark Mode: weißer Block, dunkle Schrift */
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.35s ease;
}
html[data-theme="light"] .sponsor-logo.sponsor-logo--idle {
  /* Macht den Hintergrund dunkel und die Schrift knackig weiß */
  filter: grayscale(1) brightness(1.5) contrast(2);
}

/* Farbige Version liegt darüber, unsichtbar und ohne Filter */
.sponsor-logo--active {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  filter: none !important;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

/* Hover (Desktop) */
@media (hover: hover) and (pointer: fine) {
  .sponsor-swap:hover .sponsor-logo--active {
    opacity: 1;
    transform: scale(1.08);
  }
  .sponsor-swap:hover .sponsor-logo--idle {
    opacity: 0;
    transform: scale(1.08);
  }
}

/* Aktiv in der mobilen Marquee: JS setzt is-active auf beide Bilder */
.sponsor-logo--active.is-active {
  opacity: 1;
}
.sponsor-logo--idle.is-active {
  opacity: 0;
}

/* ============ LENIS SMOOTH SCROLL ============ */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* ============ SPONSOREN: mehr Platz zwischen den Logos (md+) ============ */
@media (min-width: 768px) {
  .sponsor-group {
    gap: 5rem;
    padding-right: 5rem;
  }
}

@media (min-width: 1024px) {
  .sponsor-group {
    gap: 6rem;
    padding-right: 6rem;
  }
}

/* ============ KONSISTENTE GROSSE ABSTÄNDE (lg) ============ */
@media (min-width: 1024px) {
  :root {
    /* Justierbar: 10vh–20vh. Tune-Wert je nach Bildschirm */
    --big-gap: 15vh;
  }

  #traceaid-explain,
  #sponsor_wheel,
  #progress_bar,
  #footer,
  main > .mx-auto.w-full.max-w-4xl {
    margin-top: var(--big-gap);
  }
}

/* ============ SPONSOREN: HOVER VON MITTE AUS (md+) ============ */
@media (min-width: 768px) {
  .sponsor-logo {
    transform-origin: center center !important;
  }
}

/* ============ ABOUT SEITE: GROSSE ABSTÄNDE (lg) ============ */
@media (min-width: 1024px) {
  .about-section {
    margin-top: var(--big-gap);
  }
}

/* ============ ICON SCATTER (Mission Updates) ============ */
.scatter-icon {
  position: absolute;
  width: var(--size);
  height: var(--size);
  background-color: var(--text); /* Passt sich hell/dunkel an */
  opacity: var(--opacity);
  transform: rotate(var(--rot));
  -webkit-mask: var(--icon-url) center/contain no-repeat;
  mask: var(--icon-url) center/contain no-repeat;
}

/* ============ PAGE TRANSITION ============ */

/* Nativer Cross-Fade zwischen Seiten (Chrome/Edge/Safari 18.2+) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
