/* ==========================================================================
   LE ISLAND Halloween Festival

   Die Bühne (.stage) trägt exakt die Proportionen des Flyers (4961 × 7016).
   Alle Lagen sitzen prozentual darin, alle Schriftgrößen in cqw — damit die
   Komposition auf jedem Bildschirm dieselbe bleibt.

   Außerhalb der Bühne gibt es keine Rahmen und keine Karten: Abschnitte
   trennen sich über Weißraum, Linien und Typografie.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ice: #bedeff;
  --ice-dim: #8fb4e0;
  --ice-faint: rgba(190, 222, 255, 0.45);
  --red: #ff3236;
  --red-hot: #ff3d51;
  --ink: #00001b;
  --night: #03031f;
  --line: rgba(190, 222, 255, 0.14);

  --flyer-ratio: 4961 / 7016;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ice);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(15px, 0.6vw + 13px, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--ice); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff; padding: 0.8rem 1.2rem; z-index: 100; }
.skip:focus { left: 0; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* --------------------------------------------------------- Kopfleiste ---- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem clamp(0.9rem, 3vw, 2.2rem);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  translate: 0 -100%;
  transition: translate 0.45s var(--ease-out), border-color 0.45s;
}
.topbar.is-visible { translate: 0 0; border-bottom-color: var(--line); }

.topbar__brand { font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: var(--red); font-size: 0.95rem; }
.topbar__nav { display: flex; gap: clamp(0.7rem, 2vw, 1.6rem); margin-inline-start: auto; }
.topbar__nav a { text-decoration: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice-dim); transition: color 0.2s; }
.topbar__nav a:hover, .topbar__nav a.is-active { color: var(--ice); }
.topbar__cta {
  padding: 0.5rem 1.2rem; border-radius: 999px; background: var(--red); color: #fff;
  text-decoration: none; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
}
@media (max-width: 760px) { .topbar__nav { display: none; } .topbar__cta { margin-inline-start: auto; } }

/* --------------------------------------------------------------- Hero ---- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(3.5rem, 7vh, 5rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vh, 3.5rem);
  background:
    radial-gradient(70% 45% at 36% 42%, rgba(40, 52, 150, 0.3), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 14, 0.62), rgba(0, 0, 14, 0.3) 40%, rgba(0, 0, 14, 0.78)),
    url('/assets/img/bg-hero.webp') center / cover no-repeat,
    var(--ink);
  overflow: hidden;
}
@media (max-width: 860px) {
  .hero { background-image:
    radial-gradient(70% 45% at 50% 38%, rgba(40, 52, 150, 0.3), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 14, 0.62), rgba(0, 0, 14, 0.3) 40%, rgba(0, 0, 14, 0.78)),
    url('/assets/img/bg-hero-sm.webp'); }
}

.hero__sky { position: absolute; inset: 0; pointer-events: none; }
.sky-cloud { position: absolute; opacity: 0.14; filter: saturate(0.3) blur(3px); }
.sky-cloud--a { left: -5%;  top: 10%; width: 16vw; animation: drift 34s ease-in-out infinite; }
.sky-cloud--b { right: -4%; top: 72%; width: 13vw; animation: drift 44s ease-in-out -8s infinite reverse; }
.sky-cloud--c { left: 4%;   top: 86%; width: 10vw; animation: drift 52s ease-in-out -20s infinite; }
@media (max-width: 1000px) { .hero__sky { display: none; } }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(3.5vw, -1.6vh, 0); }
}

.hero__grid {
  position: relative;
  width: 100%; max-width: 76rem; margin-inline: auto;
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; justify-items: center;
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(23rem, 31rem); align-items: center; }
  .hero__art { justify-self: end; }
  .hero__shop { justify-self: start; width: 100%; }
}

.hero__art { width: 100%; max-width: 34rem; display: flex; flex-direction: column; align-items: center; gap: clamp(1.2rem, 3vh, 2rem); }

/* ------------------------------------------------------------- Bühne ---- */

.stage {
  position: relative;
  container-type: inline-size;
  width: min(100%, calc((100svh - 13rem) * 0.7071));
  aspect-ratio: var(--flyer-ratio);
}

.layer {
  position: absolute; margin: 0;
  translate: var(--px, 0px) var(--py, 0px);
  will-change: translate, transform, opacity;
}
.layer > img { width: 100%; height: auto; }

.layer--logo   { left: 10.966%; top:  4.789%; width: 78.271%; z-index: 6; }
.layer--island { left:  9.353%; top: 25.770%; width: 81.395%; z-index: 3; }
.layer--cloud-a{ left: 70.953%; top: 33.523%; width: 26.063%; z-index: 5; }
.layer--cloud-b{ left:  9.675%; top: 53.820%; width: 27.011%; z-index: 5; }
.layer--badge  { left: 38.379%; top: 58.609%; width: 23.725%; z-index: 7; }
.line--indoor  { left: 11.790%; top: 71.240%; width: 74.740%; z-index: 4; }
.line--floors  { left: 11.690%; top: 78.530%; width: 74.660%; z-index: 4; }
.flyer-lineup  { left: 11.611%; top: 85.063%; width: 75.247%; z-index: 4; }

.layer--logo img   { filter: drop-shadow(0 0 2.4cqw rgba(255, 50, 54, 0.35)); }
.layer--island img { animation: bob 9s ease-in-out 2s infinite; }
.layer--cloud-a img{ animation: bob 11s ease-in-out 2.4s infinite; }
.layer--cloud-b img{ animation: bob 13s ease-in-out 2.8s infinite reverse; }
.layer--badge img  { animation: pulse 3.6s ease-in-out 2s infinite; }

@keyframes bob { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0.6%, -1.8%, 0); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 1.4cqw rgba(255, 50, 54, 0.45)); }
  50% { transform: scale(1.035); filter: drop-shadow(0 0 3cqw rgba(255, 50, 54, 0.75)); }
}

/* Die Textzeilen des Flyers: Größe aus der gemessenen Versalhöhe,
   Breite stellt fitLines() über scale auf die des Originals. */
.line {
  transform-origin: left center;
  font-weight: 900; text-transform: uppercase; white-space: nowrap;
  line-height: 1; color: var(--ice);
  margin-top: -0.1362em; /* Inter: von der Oberkante der Zeile zur Versalhöhe */
}
.line--indoor { font-size: 9.891cqw; }
.line--floors { font-size: 6.954cqw; }

.flyer-lineup {
  font-size: 4.683cqw; line-height: 0.7965; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.005em; color: var(--ice);
  margin-top: -0.0345em;
}
.flyer-lineup .hot { color: var(--red-hot); }

.stage__credit {
  position: absolute; left: 0; right: 0; margin: 0;
  text-align: center; text-transform: uppercase;
  font-size: 1.05cqw; font-weight: 500; letter-spacing: 0.55em;
  color: var(--ice-faint); text-indent: 0.55em;
}
.stage__credit--top { top: 3.3%; }
.stage__credit--bottom { top: 94.7%; }

/* ------------------------------------------------- Einflug beim Laden ---- */

/* Die Animation mit drei Sekunden Verzögerung ist das Sicherheitsnetz:
   Bleibt `is-ready` aus, weil ein Skript nicht lädt, blendet die Seite
   trotzdem ein, statt leer zu bleiben. */
[data-anim] { opacity: 0; animation: in-fade 0.6s var(--ease-out) 3s both; }

body.is-ready [data-anim] { animation-duration: 0.95s; animation-fill-mode: both; animation-timing-function: var(--ease-out); }
body.is-ready [data-anim='island'] { animation-name: in-up;      animation-delay: 0.10s; }
body.is-ready [data-anim='logo']   { animation-name: in-down;    animation-delay: 0.30s; animation-timing-function: var(--ease-pop); }
body.is-ready [data-anim='cloud-right'] { animation-name: in-right; animation-delay: 0.55s; }
body.is-ready [data-anim='cloud-left']  { animation-name: in-left;  animation-delay: 0.65s; }
body.is-ready [data-anim='badge']  { animation-name: in-pop;     animation-delay: 0.85s; animation-timing-function: var(--ease-pop); }
body.is-ready [data-anim='indoor'] { animation-name: in-wipe-l;  animation-delay: 1.00s; animation-duration: 0.7s; }
body.is-ready [data-anim='floors'] { animation-name: in-wipe-r;  animation-delay: 1.12s; animation-duration: 0.7s; }
body.is-ready [data-anim='lineup'] { animation-name: in-fade;    animation-delay: 1.28s; animation-duration: 0.8s; }
body.is-ready [data-anim='credit'] { animation-name: in-fade;    animation-delay: 1.50s; animation-duration: 1.2s; }

@keyframes in-up    { from { opacity: 0; transform: translate3d(0, 9%, 0) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes in-down  { from { opacity: 0; transform: translate3d(0, -16%, 0) scale(0.9) rotate(-2.5deg); } to { opacity: 1; transform: none; } }
@keyframes in-right { from { opacity: 0; transform: translate3d(42%, -18%, 0) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes in-left  { from { opacity: 0; transform: translate3d(-48%, 18%, 0) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes in-pop   { from { opacity: 0; transform: scale(0.2) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes in-wipe-l{ from { opacity: 0; transform: translate3d(-7%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes in-wipe-r{ from { opacity: 0; transform: translate3d(7%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes in-fade  { from { opacity: 0; transform: translate3d(0, 1.2rem, 0); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- Countdown ---- */

.hero__foot { opacity: 0; animation: in-fade 0.6s var(--ease-out) 3s both; }
body.is-ready .hero__foot { animation: in-fade 1s var(--ease-out) 1.55s both; }

.countdown {
  display: flex; gap: clamp(1.4rem, 5vw, 2.8rem);
  margin: 0; padding: 0; list-style: none;
}
.countdown li { display: flex; flex-direction: column; align-items: center; }
.countdown b {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 900; line-height: 1;
  color: var(--red); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.countdown span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ice-faint); margin-top: 0.5rem; }
.countdown__note { margin: 0; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); font-size: 0.9rem; }

/* --------------------------------------------------------- Ticketshop ---- */

.hero__shop { max-width: 31rem; }
.shop-title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.02em; color: var(--ice);
}
.shop-lede { margin: 0 0 1.4rem; color: var(--ice-dim); font-size: 0.92rem; }
.fallback { margin: 0; }

/* ---------------------------------------------------------- Abschnitte ---- */

.section {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1rem, 4vw, 2rem);
  background:
    linear-gradient(180deg, rgba(0, 0, 24, 0.94), rgba(3, 3, 28, 0.96)),
    url('/assets/img/bg-tile.webp') center / 700px repeat;
  border-top: 1px solid var(--line);
}
.wrap { max-width: 62rem; margin-inline: auto; }
.wrap--split { display: grid; gap: clamp(2.5rem, 6vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.h2 {
  margin: 0 0 1.8rem;
  font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 900; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.025em; color: var(--ice);
}
.lede { margin: -1rem 0 2rem; color: var(--ice-dim); max-width: 42rem; white-space: pre-line; }

.reveal { opacity: 0; transform: translate3d(0, 1.4rem, 0); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* Eckdaten: Zeilen, keine Tabelle in einem Kasten */
.facts { margin: 0 0 2.5rem; max-width: 46rem; }
.facts > div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.2rem 1.5rem;
  padding: 0.85rem 0; border-top: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { margin: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ice-faint); align-self: center; }
.facts dd { margin: 0; font-weight: 600; }
.facts dd.hot { color: var(--red); font-weight: 800; }
@media (max-width: 540px) { .facts > div { grid-template-columns: 1fr; } }

.about { white-space: pre-line; color: var(--ice-dim); max-width: 42rem; }
.about a { color: var(--ice); }

/* Floors */
.floors { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.floor h3 { margin: 0 0 0.4rem; font-size: 1.3rem; font-weight: 900; text-transform: uppercase; color: var(--red); letter-spacing: -0.01em; }
.floor p { margin: 0 0 1.1rem; font-size: 0.86rem; color: var(--ice-dim); }
.floor ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.55rem; }
.floor li { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: -0.015em; }
.floor li + li::before { content: '·'; color: var(--ice-faint); margin-inline-end: 0.55rem; }

/* Tische */
.lounges { margin: 0 0 2.2rem; padding: 0; list-style: none; max-width: 46rem; }
.lounge { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.lounges .lounge:last-child { border-bottom: 1px solid var(--line); }
.lounge b { display: block; font-size: 1.05rem; font-weight: 800; }
.lounge span { display: block; font-size: 0.84rem; color: var(--ice-dim); }
.lounge.is-gone { opacity: 0.4; }

/* Anfahrt */
.where { font-style: normal; font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 700; line-height: 1.5; margin-bottom: 1.6rem; }
.btn {
  display: inline-block; padding: 0.8rem 1.6rem; border-radius: 999px;
  background: var(--red); color: #fff; text-decoration: none;
  font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem;
  transition: transform 0.2s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }

/* Fuß */
.footer { padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem); border-top: 1px solid var(--line); background: var(--night); }
.footer .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }
.footer__brand { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red); font-size: 0.9rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer__nav a { font-size: 0.84rem; color: var(--ice-dim); text-decoration: none; }
.footer__nav a:hover { color: var(--ice); }
.footer__note { margin: 0; font-size: 0.74rem; color: var(--ice-faint); }
.footer__powered { margin-top: 0.6rem; display: inline-block; text-decoration: none; opacity: 0.65; transition: opacity 0.2s; }
.footer__powered:hover { opacity: 1; }
.footer__powered img { width: 5.4rem; height: auto; }

/* ------------------------------------------------------------- Mobil ---- */

@media (max-width: 999px) {
  .hero { min-height: auto; padding-top: clamp(4rem, 12vh, 6rem); }
  .stage { width: 100%; }
  .hero__art { max-width: 30rem; }
  .hero__shop { width: 100%; max-width: 30rem; }
}

@media (max-width: 700px) {
  /* Komposition bleibt, nur enger gestaffelt */
  .layer--logo    { left: 6.5%;  top:  3.4%;  width: 87%; }
  .layer--island  { left: 6%;    top: 25.2%;  width: 88%; }
  .layer--cloud-a { left: 73.5%; top: 32.6%;  width: 28.5%; }
  .layer--cloud-b { left: -1.5%; top: 54.4%;  width: 29.5%; }
  .layer--badge   { left: 36.6%; top: 58.2%;  width: 26.8%; }
  .stage__credit { letter-spacing: 0.4em; text-indent: 0.4em; font-size: 1.5cqw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim], .hero__foot { opacity: 1 !important; animation: none !important; }
  .layer img, .sky-cloud { animation: none !important; }
  .layer { translate: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
