/* ============================================================
   LEON MICHEL — Design System
   Palette: Dunkelwarm (Filmnacht), Akzent: warmweißes Creme
   Typografie: Cormorant (Display) + Switzer (Body)
   ============================================================ */

:root {
  /* Typ-Skala (fluid) */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.4rem, 0.5rem + 5.5vw, 6rem);

  /* Abstände */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Farben – warm-dunkel, filmisch */
  --color-bg:       #0e0c0a;         /* Tiefschwarz, warm getönt */
  --color-surface:  rgba(14,12,10, 0.88);
  --color-text:     #f0ece4;         /* Warmes Creme */
  --color-text-muted: rgba(240,236,228, 0.55);
  --color-text-faint: rgba(240,236,228, 0.30);
  --color-accent:   #c8b89a;         /* Warmes Sandgold */

  /* Schriften */
  --font-display: 'Cormorant', 'Georgia', serif;
  --font-body:    'Switzer', 'Helvetica Neue', sans-serif;

  /* Übergänge */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-panel: 480ms;
  --duration-fast: 180ms;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  padding: 0;
}

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

svg {
  display: block;
}

/* ---- HINTERGRUND-VIDEO ---- */
#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Sanfter Einblend-Effekt beim Laden */
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

#bg-video.loaded {
  opacity: 1;
}

/* ---- VIGNETTE (Dunkelrand, keine Box) ---- */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  /* Radiales Vignette-Gradient – Mitte bleibt heller sichtbar */
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%,
      transparent 0%,
      rgba(10, 8, 6, 0.15) 60%,
      rgba(10, 8, 6, 0.50) 100%),
    linear-gradient(
      to bottom,
      rgba(10,8,6,0.20) 0%,
      transparent 20%,
      transparent 75%,
      rgba(10,8,6,0.35) 100%
    );
  pointer-events: none;
}

/* ---- CENTER STAGE (Name, frei im Raum) ---- */
.center-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  /* Kein Hintergrund, keine Box */
  pointer-events: none; /* Klicks durch, außer auf Buttons */
}

.center-stage > * {
  pointer-events: auto;
}

/* Name: groß, Cormorant, sehr leicht */
.name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.0;
  color: var(--color-text);
  /* Zarter Textschatten für Lesbarkeit über jedem Video */
  text-shadow:
    0 2px 40px rgba(10, 8, 6, 0.6),
    0 1px 8px  rgba(10, 8, 6, 0.4);
  margin-bottom: var(--space-6);
}

/* Rolle / Untertitel */
.role {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-shadow: 0 1px 12px rgba(10, 8, 6, 0.5);
  margin-bottom: var(--space-6);
}

/* Panel-Navigation */
.panel-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-sep {
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

.panel-trigger {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(200, 184, 154, 0.4);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.panel-trigger:hover,
.panel-trigger:focus-visible,
.panel-trigger[aria-expanded="true"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  outline: none;
}

/* ---- STEUERUNG (unten Mitte) ---- */
.controls {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  gap: var(--space-6);
  /* Feste Breite verhindert Positionsverschiebung beim Sprachwechsel */
  min-width: 120px;
  justify-content: center;
}

.controls button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 44px;
  height: 41px;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.controls button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.controls button:hover,
.controls button:focus-visible {
  color: var(--color-text);
  transform: scale(1.1);
  outline: none;
}

/* Reload-Button: Drehanimation */
/* (layout kommt von .controls button) */

/* Sound-Button: unsichtbares Label-Platzhalter */
#sound-toggle::after {
  content: '';
  display: block;
  height: 9px;
  width: 1px;
  flex-shrink: 0;
}

/* Lang-Toggle Label */
#lang-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  transition: color var(--duration-fast) var(--ease-out);
  line-height: 1;
  white-space: nowrap;
  position: relative;
  top: -1px;
}

#lang-toggle:hover #lang-label,
#lang-toggle:focus-visible #lang-label {
  color: var(--color-text-muted);
}

.reload-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  transition: color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

#reload-btn:hover .reload-label,
#reload-btn:focus-visible .reload-label {
  color: var(--color-text-muted);
}

#reload-btn:hover svg,
#reload-btn:focus-visible svg {
  animation: spin-once 0.5s var(--ease-out) forwards;
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ---- VIDEO CREDIT (unten rechts) ---- */
#video-credit {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 10;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  max-width: 280px;
  text-align: right;
  line-height: 1.4;
  /* Einblenden beim Wechsel */
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}

#video-credit.visible {
  opacity: 1;
}

#video-credit em {
  font-family: var(--font-display);
  font-style: italic;
}

/* ---- SIDE PANELS ---- */
.side-panel {
  position: fixed;
  top: 0;
  height: 100dvh;
  z-index: 20;
  background: var(--color-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: var(--space-12) var(--space-10);
  overflow-y: auto;
  /* Panels außerhalb des Viewports */
  transition: transform var(--duration-panel) var(--ease-out),
              visibility 0s var(--duration-panel);
  visibility: hidden;
}

.side-panel--left {
  left: 0;
  width: min(620px, 96vw);
  transform: translateX(-100%);
  border-right: 1px solid rgba(240, 236, 228, 0.06);
}

.side-panel--right {
  right: 0;
  width: min(360px, 90vw);
  transform: translateX(100%);
  border-left: 1px solid rgba(240, 236, 228, 0.06);
}

.side-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform var(--duration-panel) var(--ease-out),
              visibility 0s 0s;
}

/* Panel Schließen-Button */
.panel-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.panel-close svg {
  width: 18px;
  height: 18px;
}

.panel-close:hover,
.panel-close:focus-visible {
  color: var(--color-text);
  transform: rotate(90deg);
  outline: none;
}

/* Panel Inhalt */
.panel-content {
  padding-top: var(--space-4);
}

.side-panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: var(--space-10);
  line-height: 1.1;
}

.vita-block {
  margin-bottom: var(--space-8);
}

.vita-block h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.vita-block p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 100%;
}



/* Vita-Liste mit hängendem Einzug */
.vita-list {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vita-list dt {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-top: 0;
}

.vita-list dd {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0;
}

.vita-list dd em {
  font-style: italic;
}

/* Vita-Intro-Fließtext: kein hanging indent */
.vita-intro p {
  padding-left: 0;
  text-indent: 0;
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.85;
}

.vita-intro {
  border-bottom: 1px solid rgba(240, 236, 228, 0.08);
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-8);
}

/* Kontakt-Link */
.contact-link {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  font-style: italic;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: var(--space-1, 2px);
  display: inline-block;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.contact-note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  line-height: 1.6;
}

/* ---- FOKUS (global, unauffällig) ---- */
:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #bg-video { opacity: 1; }
}

/* ---- MOBILE ---- */
@media (max-width: 600px) {
  .name {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }

  .role {
    font-size: clamp(0.6rem, 2.2vw, 0.8rem);
    letter-spacing: 0.10em;
  }

  #video-credit {
    display: none;
  }

  .controls {
    bottom: var(--space-6);
    gap: var(--space-8);
  }

  .side-panel {
    padding: var(--space-10) var(--space-6) var(--space-16);
  }

  .side-panel--left,
  .side-panel--right {
    width: 100vw;
  }

  .vita-block p {
    font-size: var(--text-sm);
  }

  .vita-intro p {
    font-size: var(--text-sm);
  }
}
