:root {
  --text-color: rgba(235, 226, 220, 0.90);
  --brand-color: rgba(223, 221, 200, 0.92);
  --shadow-color: rgba(0, 0, 0, 0.28);
  --page-bg: #080706;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--page-bg);
}

html {
  height: 100%;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text-color);
  font-family: "Lekton", monospace;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--page-bg);
  pointer-events: none;
}

.background__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;

  opacity: 0.96;
  filter: brightness(0.92);
  transform: scale(1.025);
  transform-origin: 50% 50%;

  --bg-move-duration: 24000ms;
  --bg-opacity-duration: 20000ms;
  --bg-awake-duration: 2800ms;

  transition:
    object-position var(--bg-move-duration) cubic-bezier(.34,.04,.24,1),
    transform var(--bg-move-duration) cubic-bezier(.34,.04,.24,1),
    filter var(--bg-awake-duration) ease,
    opacity var(--bg-opacity-duration) ease;

  will-change: object-position, transform, filter, opacity;
}

.background__image.is-awake {
  filter: brightness(1);
  opacity: 1;
}

.background__image.is-absent {
  opacity: 0.055;
}

.background__veil {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  --veil-opacity-duration: 22000ms;
  transition: background var(--veil-opacity-duration) ease, opacity var(--veil-opacity-duration) ease;
}

.background__veil.is-thin {
  background: rgba(0, 0, 0, 0.04);
}

.background__veil.is-dense {
  background: rgba(0, 0, 0, 0.22);
}

/*
 * Keine Bubble-Ebene mehr.
 * Stattdessen arbeitet der Hintergrund mit langsamer Opacity- und Veil-Steuerung.
 */
.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.fragment {
  position: absolute;
  z-index: 1;
  margin: 0;
  padding: 0;

  max-width: min(48vw, 44rem);

  font: 400 clamp(0.78rem, 0.72rem + 0.20vw, 1.02rem) / 1.34 "Lekton", monospace;
  letter-spacing: 0.014em;
  color: var(--text-color);
  text-shadow: 0 1px 16px var(--shadow-color);

  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;

  user-select: none;
  -webkit-user-select: none;
}

.fragment.is-quiet {
  opacity: 0.78;
}

.fragment.is-small {
  font-size: clamp(0.72rem, 0.68rem + 0.16vw, 0.92rem);
}

.brand {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  color: var(--brand-color);
}

.brand__mark {
  position: absolute;
  top: clamp(1.25rem, 2.6vw, 2.6rem);
  left: clamp(1.25rem, 2.6vw, 2.6rem);
  width: clamp(1.6rem, 2.65vw, 2.75rem);
  height: auto;
  display: block;
  opacity: 0.92;
}

.brand__name {
  position: absolute;
  right: clamp(1.25rem, 2.6vw, 2.6rem);
  bottom: clamp(1.2rem, 2.4vw, 2.4rem);

  font: 400 clamp(0.72rem, 0.68rem + 0.14vw, 0.88rem) / 1 "Lekton", monospace;
  letter-spacing: 0.29em;
  text-indent: 0.29em;
  white-space: nowrap;
  opacity: 0.90;
}

.noscript {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 10;
  font: 400 0.85rem/1.3 "Lekton", monospace;
  color: var(--text-color);
}

@media (max-width: 760px) {
  .fragment {
    max-width: min(74vw, 30rem);
    font-size: clamp(0.74rem, 2.8vw, 0.94rem);
    line-height: 1.30;
  }

  .brand__mark {
    top: 1.15rem;
    left: 1.15rem;
    width: 1.75rem;
  }

  .brand__name {
    right: 1.1rem;
    bottom: 1.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-indent: 0.24em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .background__image {
    transition: none !important;
    object-position: 50% 50% !important;
    transform: scale(1.025) !important;
    opacity: 0.96 !important;
    filter: brightness(0.92) !important;
  }

  .background__veil {
    transition: none !important;
    background: rgba(0, 0, 0, 0.12) !important;
  }

  .fragment {
    text-rendering: optimizeLegibility;
  }
}
