/* Bühne — dark stage, typography-first. Black room, one spotlight, text. */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-italic.woff2") format("woff2");
}

:root {
  --bg: #0d0d0f;
  --text: #e8e4dc;
  --text-dim: #a8a49c;
  --text-faint: #6d6a64;
  --accent: #c9973f; /* warm spotlight amber */
  --accent-dim: #8f6f42;
  --zaphod-tint: #7a8a94; /* cool gray */
  --zaphod-border: #3a4147;
  --hairline: rgba(232, 228, 220, 0.09);
  --measure: 66ch;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Moving spotlights — three independent amber washes, each run by its
   own "operator": zigzag, occasional bounce, free to cross and overlap. ── */
.spotlights {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.spot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 175, 90, 0.55) 0%, rgba(201, 151, 63, 0.32) 32%, transparent 70%);
  filter: blur(4px);
}

.spot-a {
  width: 50vw;
  height: 50vw;
  min-width: 400px;
  min-height: 400px;
  top: -16%;
  left: -12%;
  animation: spot-a-move 52s ease-in-out infinite;
}

.spot-b {
  width: 42vw;
  height: 42vw;
  min-width: 340px;
  min-height: 340px;
  bottom: -18%;
  right: -10%;
  animation: spot-b-move 64s ease-in-out infinite;
}

.spot-c {
  width: 36vw;
  height: 36vw;
  min-width: 280px;
  min-height: 280px;
  top: 32%;
  left: 48%;
  animation: spot-c-move 46s ease-in-out infinite;
}

/* Irregular waypoints and a couple of overshoot easings per path so each
   light reads as hand-operated — zigzag with the odd bounce — rather than
   a smooth, predictable sweep. Durations are deliberately not round
   multiples of each other so the three rarely repeat the same crossing. */
@keyframes spot-a-move {
  0%   { transform: translate(0, 0) scale(1); }
  13%  { transform: translate(13vw, -7vh) scale(1.1); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  26%  { transform: translate(5vw, 9vh) scale(0.9); }
  39%  { transform: translate(19vw, 3vh) scale(1.15); }
  54%  { transform: translate(8vw, -13vh) scale(1); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  68%  { transform: translate(22vw, -2vh) scale(1.12); }
  84%  { transform: translate(3vw, 11vh) scale(0.93); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes spot-b-move {
  0%   { transform: translate(0, 0) scale(1); }
  17%  { transform: translate(-10vw, 7vh) scale(1.08); }
  31%  { transform: translate(-3vw, -10vh) scale(0.92); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  47%  { transform: translate(-17vw, -4vh) scale(1.1); }
  61%  { transform: translate(-7vw, 12vh) scale(1); }
  76%  { transform: translate(-19vw, 5vh) scale(1.14); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  90%  { transform: translate(-4vw, -8vh) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes spot-c-move {
  0%   { transform: translate(0, 0) scale(1); }
  10%  { transform: translate(-9vw, -6vh) scale(0.95); }
  24%  { transform: translate(6vw, -12vh) scale(1.12); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  38%  { transform: translate(14vw, -3vh) scale(0.94); }
  53%  { transform: translate(-4vw, 9vh) scale(1.1); }
  67%  { transform: translate(-13vw, 2vh) scale(0.96); animation-timing-function: cubic-bezier(.65, -0.4, .35, 1.4); }
  82%  { transform: translate(2vw, 11vh) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ── Cotoaga.ai sigil — floating watermark, upper right. ── */
.sigil {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 1;
  width: clamp(156px, 21vw, 276px);
  height: auto;
  opacity: 0.55;
  pointer-events: none;
  animation: sigil-float 14s ease-in-out infinite;
}

@keyframes sigil-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@media (max-width: 900px) {
  .sigil {
    display: none;
  }
}

/* ── cotoaga.ai wordmark — link, upper left. ── */
.cotoaga-mark {
  position: fixed;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 1;
  opacity: 0.7;
  transition: opacity 0.2s var(--ease);
}

.cotoaga-mark:hover,
.cotoaga-mark:focus-visible {
  opacity: 1;
}

.cotoaga-mark img {
  display: block;
  width: clamp(120px, 14vw, 180px);
  height: auto;
}

@media (max-width: 900px) {
  .cotoaga-mark {
    display: none;
  }
}

/* Slow down, don't flatten: swapping to a near-static keyframe under
   reduced-motion made the effect read as simply broken rather than
   calmer. Keep the same zigzag/bounce shape, just paced more gently. */
@media (prefers-reduced-motion: reduce) {
  .spot-a { animation-duration: 130s; }
  .spot-b { animation-duration: 160s; }
  .spot-c { animation-duration: 115s; }

  .sigil {
    animation: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* background lives on html only — an opaque body background would paint
     above the negative-z-index .spotlights layer and hide it entirely */
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.buehne {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7rem) 1.5rem var(--space-2xl);
}

p {
  margin: 0 0 var(--space-md);
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-md);
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.mode-toggle + h2 {
  margin-top: var(--space-md);
}

.page-title {
  position: relative;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3xs);
}

.page-title::before {
  content: "";
  position: absolute;
  top: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(26rem, 90vw);
  height: 20rem;
  background: radial-gradient(ellipse at center, rgba(201, 151, 63, 0.16), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* KHAOS-Milliways wordmark — the source SVG has no fill (black on
   transparent), so it's rendered as a mask painted with the text color
   instead of an <img>, which would be invisible on a dark background. */
.title-logo {
  display: block;
  width: min(420px, 90vw);
  aspect-ratio: 500 / 170;
  background-color: var(--text);
  mask: url("/assets/img/wordmark.svg") no-repeat center / contain;
  -webkit-mask: url("/assets/img/wordmark.svg") no-repeat center / contain;
}

.subtitle {
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: var(--space-xl);
}

.duration,
.regie {
  font-style: italic;
  opacity: 0.7;
}

.duration {
  display: block;
  margin-bottom: var(--space-2xs);
}

.speaker {
  font-style: normal;
  font-weight: 700;
  font-size: 0.92em;
  letter-spacing: 0.05em;
  color: #d9a35f;
}

em.regie {
  padding: 0 0.05em;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

p a {
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 0.15em;
}

p a:hover,
p a:focus-visible {
  text-decoration-color: var(--accent);
}

blockquote {
  border-left: 2px solid var(--accent);
  margin: var(--space-lg) 0;
  padding: 0.2rem 0 0.2rem var(--space-md);
  font-style: italic;
  font-size: 1.05em;
  color: var(--text-dim);
}

blockquote p {
  margin-bottom: var(--space-2xs);
}

blockquote p:last-child {
  font-style: normal;
  font-size: 0.85em;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: var(--space-lg) 0;
}

/* Zaphod layer — backstage. Must never blur with the script. Hidden until toggled. */
.zaphod {
  font-family: var(--mono);
  color: var(--zaphod-tint);
  display: none;
}

aside.zaphod {
  font-size: 0.85rem;
  border-left: 2px solid var(--zaphod-border);
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  margin: var(--space-lg) 0;
  line-height: 1.6;
}

aside.zaphod p {
  margin-bottom: var(--space-sm);
}

span.zaphod {
  font-size: 0.85em;
}

body.mode-zaphod aside.zaphod {
  display: block;
}

body.mode-zaphod span.arthur {
  display: none;
}

body.mode-zaphod span.zaphod {
  display: inline;
}

.mode-toggle {
  display: inline-flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-lg);
}

.mode-toggle button {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-faint);
  padding: 0.1rem 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.mode-toggle button:hover {
  color: var(--text-dim);
}

.mode-toggle button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* No JS: hide the toggle entirely, Arthur mode is the CSS default. */
.no-js .mode-toggle {
  display: none;
}

/* ── Menükarte ── */
nav.menue {
  margin-top: var(--space-lg);
}

.menue-row {
  display: block;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--hairline);
}

.menue-row:first-child {
  border-top: none;
  padding-top: 0;
}

.menue-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: var(--space-2xs);
  transition: color 0.2s var(--ease);
}

.menue-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
}

.menue-title {
  font-size: 1.3rem;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.menue-meta {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
  white-space: nowrap;
}

.menue-row:hover .menue-title,
.menue-row:focus-visible .menue-title {
  color: var(--accent);
}

.menue-row:hover .menue-kicker,
.menue-row:focus-visible .menue-kicker {
  color: var(--accent);
}

.menue-rezeptur {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
}

.menue-rezeptur .menue-title {
  font-size: 1.05rem;
  color: var(--text-dim);
}

.menue-rezeptur:hover .menue-title {
  color: var(--accent);
}

.gang-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer.impressum {
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-top: 1px solid var(--hairline);
}

footer.impressum a {
  margin-right: var(--space-md);
}
