/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Palette — dunkel, edel, mit Lichtakzenten */
  --bg-deep:        #0a0a0c;
  --bg-soft:        #15151a;
  --bg-panel:       rgba(255, 255, 255, 0.04);
  --bg-panel-strong: rgba(255, 255, 255, 0.07);

  --line:           rgba(255, 255, 255, 0.08);
  --line-strong:    rgba(255, 255, 255, 0.18);

  --text-primary:   #f4f1ea;
  --text-secondary: rgba(244, 241, 234, 0.7);
  --text-muted:     rgba(244, 241, 234, 0.45);

  /* Lichtfarben */
  --light-warm:     #ffb46b;   /* warmes Bernsteinlicht */
  --light-amber:    #f0a040;   /* tieferes Amber */
  --light-cool:     #d8e6ff;   /* tageslichtweiß */
  --light-strip:    #ffc985;   /* LED-Strip */

  /* Sensor / Signal */
  --signal-teal:    #4dd4c0;   /* mmWave */
  --signal-blue:    #6ab7ff;   /* Daten */
  --signal-red:     #ff6b6b;   /* Alarm */

  /* Akzent */
  --accent-gold:    #d4af7a;

  /* Sky — wandert mit Tageszeit */
  --sky-dawn:       linear-gradient(180deg, #1a1a2e 0%, #2d2940 40%, #4a3b50 70%, #6b4c4c 100%);
  --sky-day:        linear-gradient(180deg, #2a4a6e 0%, #5a8bbf 60%, #b8d4e8 100%);
  --sky-dusk:       linear-gradient(180deg, #1a1430 0%, #3d2a4a 40%, #7a3a4a 75%, #c8755a 100%);
  --sky-night:      linear-gradient(180deg, #050510 0%, #0a0a1a 60%, #15152a 100%);

  /* Typography */
  --font-display:   "Fraunces", "Times New Roman", serif;
  --font-ui:        "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Easing */
  --ease-smooth:    cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtiles Film-Grain Overlay über die ganze Seite */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

p { color: var(--text-secondary); }

::selection {
  background: var(--accent-gold);
  color: var(--bg-deep);
}

/* ============================================================
   Layout — Stage System
   Das Haus bleibt fixed in der Mitte, Text scrollt daneben.
   ============================================================ */
.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.stage__viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
}

.stage__house {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.stage__house svg {
  width: 100%;
  height: 100%;
  max-width: 720px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

.stage__sky {
  position: absolute;
  inset: 0;
  background: var(--sky-night);
  z-index: -1;
  transition: background 1.5s var(--ease-smooth);
}

.stage__copy {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) var(--space-md);
  max-width: 560px;
}

/* ============================================================
   Typography Tokens
   ============================================================ */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.headline {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: var(--space-md);
}

.subhead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  opacity: 0.85;
}

.lead {
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

/* Frosted Info Card */
.info-card {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.info-card__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-xs);
  display: block;
}

.info-card p {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Scroll-Hint */
.scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  animation: bob 2.5s ease-in-out infinite;
}

.scroll-hint::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Mobile (vereinfacht — kommt später detaillierter)
   ============================================================ */
@media (max-width: 900px) {
  .stage__viewport {
    grid-template-columns: 1fr;
    grid-template-rows: 60vh 40vh;
  }
  .stage__house { padding: var(--space-md); }
  .stage__copy { padding: var(--space-md); }
  .headline { font-size: clamp(2rem, 8vw, 3rem); }
}
