/* Abschiedsseite TSD Studio → Giga Borsch GbR. Farben aus dem GigaBorsch-Logo. */

@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/barlow-sc-400.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/barlow-sc-600.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Semi Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/barlow-sc-700.woff2") format("woff2");
}

:root {
  --night: #140c1a;
  --night-rgb: 20 12 26;
  --plum: #2b1535;
  --purple: #9a4fc4;
  --purple-soft: #bf9ade;
  --orange: #f28c28;
  --orange-hot: #ffa24a;
  --cream: #f7e6c4;
  --cream-dim: #cdbba0;
  --tsd: #d24d32;

  --font: "Barlow Semi Condensed", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 6.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

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

html {
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.is-over-mascot,
.is-over-mascot body {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--orange-hot);
}

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

/* ---- Bühne (3D-Canvas) ---- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.stage.is-ready canvas {
  opacity: 1;
}

.stage-fallback {
  display: none;
}

.no-webgl .stage canvas {
  display: none;
}

.no-webgl .stage-fallback {
  display: block;
  position: absolute;
  top: 50%;
  right: 12%;
  width: min(38vw, 440px);
  height: auto;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 3rem rgb(242 140 40 / 0.25));
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgb(var(--night-rgb) / 0.94) 0%,
    rgb(var(--night-rgb) / 0.82) 32%,
    rgb(var(--night-rgb) / 0) 56%
  );
}

/* ---- Inhalt ---- */

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 40rem);
  min-height: 100svh;
  padding: clamp(1.5rem, 5vh, 3.5rem) var(--gutter);
}

.content > * {
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.eyebrow::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  background: var(--tsd);
}

h1 {
  margin: 0.4em 0 0.45em;
  font-size: clamp(2rem, 1.1rem + 1.9vw + 1.3vh, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}

h1 + p {
  max-width: 34em;
  color: var(--cream-dim);
}

.signature {
  margin-top: 0.8em;
  font-weight: 600;
  color: var(--cream);
}

.signature::before {
  content: "– ";
}

/* Trenner mit Pixel-Quadraten wie im Logo */
.level {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: clamp(1.4rem, 3.5vh, 2.4rem) 0 clamp(1rem, 2.5vh, 1.6rem);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.level::before,
.level::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple));
}

.level::after {
  background: linear-gradient(90deg, var(--purple), transparent);
}

.level span {
  position: relative;
  padding: 0 0.9rem;
}

.level span::before,
.level span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--orange);
  transform: translateY(-50%);
}

.level span::before {
  left: 0;
}

.level span::after {
  right: 0;
}

.next {
  display: grid;
  gap: 0.7rem;
}

.next > * {
  margin: 0;
}

.next-head {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.4rem);
}

.next-logo {
  flex-shrink: 0;
  width: clamp(84px, 11vh, 132px);
  height: auto;
  filter: drop-shadow(0 0.4rem 1.6rem rgb(242 140 40 / 0.28));
  animation: float 5s ease-in-out infinite;
}

h2 {
  font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}

.accent {
  color: var(--orange);
}

.next p:not(.tagline, .hint) {
  max-width: 32em;
  color: var(--cream-dim);
}

.tagline {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}

.hint {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--purple-soft);
}

.hint-touch {
  display: none;
}

@media (pointer: coarse) {
  .hint-keys {
    display: none;
  }

  .hint-touch {
    display: block;
  }
}

.no-webgl .hint {
  display: none;
}

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 0.35em;
  border: 1px solid rgb(191 154 222 / 0.45);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: rgb(43 21 53 / 0.75);
  font-family: inherit;
  font-size: 0.85em;
  line-height: 1.5;
  text-align: center;
  color: var(--cream);
}

.legal {
  display: flex;
  gap: 0.6rem;
  margin-top: clamp(1.4rem, 4vh, 2.6rem);
  font-size: 0.92rem;
  color: var(--cream-dim);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 4vh, 2rem);
  z-index: 2;
  margin: 0;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: var(--plum);
  box-shadow: 0 0 2rem rgb(242 140 40 / 0.35);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cream);
  transform: translate(-50%, 200%);
  visibility: hidden;
  transition:
    transform 0.5s var(--ease),
    visibility 0s 0.5s;
}

.toast.is-visible {
  visibility: visible;
  transform: translate(-50%, 0);
  transition: transform 0.5s var(--ease);
}

@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}

/* ---- Gestapeltes Layout: Bühne oben, Text darunter (muss zu STACKED_QUERY in main.js passen) ---- */

@media (max-width: 899px), (orientation: portrait) {
  .stage {
    position: absolute;
    bottom: auto;
    height: 58svh;
    mask-image: linear-gradient(to bottom, #000 62%, transparent 94%);
  }

  .no-webgl .stage-fallback {
    right: 50%;
    width: min(62vw, 340px);
    transform: translate(50%, -50%);
  }

  .veil {
    display: none;
  }

  .content {
    width: 100%;
    max-width: 40rem;
    min-height: 0;
    padding-top: 53svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .next-logo {
    animation: none;
  }

  .stage canvas,
  .toast {
    transition: none;
  }
}

/* ---- Rechtstexte ---- */

.legal-page {
  width: min(100%, 46rem);
  padding: clamp(2rem, 8vh, 5rem) var(--gutter);
}

.legal-page h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.legal-page h2 {
  margin: 2em 0 0.4em;
  font-size: 1.35rem;
}

.legal-page p,
.legal-page li {
  color: var(--cream-dim);
}

.legal-page address {
  font-style: normal;
  color: var(--cream-dim);
}

.back {
  display: inline-flex;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--orange);
}

.placeholder {
  padding: 0 0.3em;
  border-radius: 4px;
  background: rgb(242 140 40 / 0.2);
  color: var(--orange-hot);
}
