/* Vice Wiki – Miami bei Dämmerung.
   Der Header ist eine eigene SVG-Szene (src/components/Scene.astro), deren Farben je nach
   Tageszeit wechseln: <html data-time="dawn|day|dusk|night"> (gesetzt per Inline-Script im Layout).
   Ohne JavaScript gilt "dusk". Der Inhalt darunter bleibt immer dunkel und gut lesbar. */

@font-face {
  font-family: 'Poiret One';
  src: url('/fonts/poiret-one.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Grundpalette */
  --ink: #1d1236;      /* Abendlila, Seitenhintergrund */
  --ink-2: #26184a;    /* Flächen */
  --sand: #fff3e6;     /* Text */
  --muted: #cdbfdc;
  --coral: #ff8a6b;
  --pink: #ff3d8b;
  --aqua: #35e0d8;
  --line: rgba(53, 224, 216, .2);

  /* Szene: Sonnenuntergang (Standard) */
  --sky1: #1d1236; --sky2: #7a2c78; --sky3: #ff8a5c;
  --sun1: #ffd36e; --sun2: #ff3d8b; --sun-x: 0px; --sun-y: 0px; --sun-s: 1; --sun-o: 1;
  --moon-o: 0; --stars-o: .15;
  --sea1: #5a2470; --sea2: #1d1236;
  --city: #2b1342; --win: #ffb46b; --win-o: .35;
  --palm: #1a0c2c;
  --reflect: #ffb3c8; --reflect-o: .7;
  --neon: #ff3d8b;
}
html[data-time='dawn'] {
  --sky1: #2f3a7a; --sky2: #c47fb0; --sky3: #ffd0a8;
  --sun1: #fff4c9; --sun2: #ff9f86; --sun-y: -34px;
  --stars-o: .2;
  --sea1: #8a86bd; --sea2: #2c2f68;
  --city: #43386b; --win-o: .12;
  --palm: #2a2149;
  --reflect: #fff0e0; --reflect-o: .55;
  --neon: #ff7aa8;
}
html[data-time='day'] {
  --sky1: #1b8fd0; --sky2: #5cc9ea; --sky3: #c8f2ee;
  --sun1: #fffdf0; --sun2: #ffe27a; --sun-x: 330px; --sun-y: -215px; --sun-s: .42;
  --stars-o: 0;
  --sea1: #1fbfc4; --sea2: #0a5f86;
  --city: #12577a; --win-o: 0;
  --palm: #0b3b52;
  --reflect: #ffffff; --reflect-o: .2;
  --neon: #0a6f9a;
}
html[data-time='night'] {
  --sky1: #04051a; --sky2: #0f1240; --sky3: #2c1b5e;
  --sun-y: 160px; --sun-o: 0; --moon-o: 1; --stars-o: 1;
  --sea1: #121540; --sea2: #04051a;
  --city: #0c0b24; --win: #ffd36e; --win-o: .95;
  --palm: #03030d;
  --reflect: #c9d4ff; --reflect-o: .35;
  --neon: #35e0d8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sand);
  background: var(--ink);
}

/* ---------- Header-Szene ---------- */
.masthead {
  position: relative;
  overflow: hidden;
  min-height: clamp(300px, 40vw, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 3.5rem) 1rem 1rem;
  text-align: center;
  isolation: isolate;
}
.scene, .palm { position: absolute; z-index: -1; pointer-events: none; }
.masthead::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--ink)); pointer-events: none; }
.scene { inset: 0; width: 100%; height: 100%; }
.palm { bottom: -2px; height: 92%; width: auto; }
.palm-l { left: max(-70px, calc(50% - 760px)); }
.palm-r { right: max(-90px, calc(50% - 760px)); height: 78%; transform: scaleX(-1); }
.palm path { fill: var(--palm); }
.palm .trunk { fill: none; stroke: var(--palm); stroke-width: 11; stroke-linecap: round; }

.s-sky1 { stop-color: var(--sky1); } .s-sky2 { stop-color: var(--sky2); } .s-sky3 { stop-color: var(--sky3); }
.s-sun1 { stop-color: var(--sun1); } .s-sun2 { stop-color: var(--sun2); }
.s-sea1 { stop-color: var(--sea1); } .s-sea2 { stop-color: var(--sea2); }
.sun { transform-box: fill-box; transform-origin: center; transform: translate(var(--sun-x), var(--sun-y)) scale(var(--sun-s)); opacity: var(--sun-o); }
.moon { fill: #f3efff; opacity: var(--moon-o); filter: drop-shadow(0 0 14px rgba(201, 212, 255, .8)); }
.stars { fill: #fff; opacity: var(--stars-o); }
.city { fill: var(--city); }
.windows { fill: var(--win); opacity: var(--win-o); }
.reflect { fill: var(--reflect); opacity: var(--reflect-o); }

.masthead h1 {
  margin: 0;
  font-family: 'Poiret One', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1;
  letter-spacing: .06em;
}
.masthead h1 a {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 .06em #fff, 0 0 .18em var(--neon), 0 0 .5em var(--neon);
}
.masthead nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  max-width: 900px;
  padding: .4rem;
  border-radius: 14px;
  background: rgba(10, 6, 24, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .95rem;
  line-height: 1.3;
}
.masthead nav a {
  color: var(--sand);
  text-decoration: none;
  padding: .35rem .7rem;
  border-radius: 9px;
}
.masthead nav a:hover { background: rgba(255, 255, 255, .08); }
.masthead nav a[aria-current] { background: rgba(255, 61, 139, .28); }
.masthead nav a:last-child { color: var(--aqua); font-weight: 700; }

/* ---------- Inhalt ---------- */
main { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.25rem 1rem; }
section { margin: 2rem 0; }
h2, h3 { line-height: 1.25; }
h2 { color: var(--coral); font-size: 1.6rem; margin: 2rem 0 .75rem; }
h3 { color: var(--aqua); font-size: 1.2rem; margin: 1.75rem 0 .5rem; }
a { color: var(--aqua); text-underline-offset: .15em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 4px; }

.hero {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1rem 1.4rem;
  text-align: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 61, 139, .14), rgba(53, 224, 216, .06));
  border: 1px solid rgba(255, 61, 139, .3);
}
.hero h2 { margin: 0 0 .25rem; color: var(--sand); font-size: 1.35rem; }
.cd {
  margin: 0;
  font-family: 'Poiret One', system-ui, sans-serif;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 .2em var(--aqua);
  font-variant-numeric: tabular-nums;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.cards a {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}
.cards a b { color: var(--sand); font-size: 1.05rem; }
.cards a:hover { border-color: var(--pink); color: var(--sand); }

details { background: var(--ink-2); border-radius: 10px; padding: .75rem 1rem; margin: .5rem 0; border: 1px solid transparent; }
details[open] { border-color: var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .5rem 0 .2rem; color: var(--muted); }

table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
td, th { padding: .55rem .5rem; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .95rem; }

.note {
  background: var(--ink-2);
  border-left: 4px solid var(--pink);
  border-radius: 8px;
  padding: .6rem .9rem;
  font-size: .95rem;
  color: var(--muted);
}
.todo { border: 1px dashed rgba(205, 191, 220, .35); border-radius: 8px; padding: .6rem .9rem; color: var(--muted); }
.btn { background: var(--aqua); color: var(--ink); padding: .3rem .7rem; border-radius: 6px; text-decoration: none; font-weight: 700; }

footer {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  padding: 2.5rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
footer a { color: inherit; }

@media (max-width: 640px) {
  .masthead { min-height: 300px; padding-left: 0; padding-right: 0; }
  .masthead nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 0;
    padding: .4rem .75rem;
    scrollbar-width: none;
  }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav a { white-space: nowrap; }
}
