/* ==========================================================================
   SUNÉA House Experience

   Die Bühne (.scene) hat genau die Maße des Fotos darunter — 16:9 auf dem
   Desktop (bg-quer), 1080 × 2788 auf schmalen Geräten (bg-hoch). Alle Lagen
   sitzen prozentual darin, Schriftgrößen in cqw. So bleiben Logo, Schriftzug
   und Datum an den beiden Männern, egal wie das Fenster zugeschnitten ist.

   Farben aus dem Flyer abgetastet: Bronze #7C4916 aus Schriftzug und Logo,
   Vorhang #DFDBDF, Boden #A0948F.
   ========================================================================== */

@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;
}

/* Breit und schwer wie Datum und Adresse auf dem Flyer. */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  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;
}

/* Fein und hoch kontrastiert wie die Serifen des SUNÉA-Logos. Trägt alles,
   was nicht Flyer ist: Überschriften, Countdown, Fuß. */
@font-face {
  font-family: 'Cormorant';
  src: url('/assets/fonts/cormorant-latin.woff2') format('woff2');
  font-weight: 300 700; 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;
}
@font-face {
  font-family: 'Cormorant';
  src: url('/assets/fonts/cormorant-latin-italic.woff2') format('woff2');
  font-weight: 300 700; font-style: italic; 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 {
  --bronze: #7c4916;
  --bronze-deep: #5e370f;
  --bronze-soft: #9d754f;
  --curtain: #e4e0dc;
  --paper: #f4f1ec;
  --floor: #a0948f;
  --ink: #17120e;
  --ink-soft: #4a4038;
  --line: rgba(124, 73, 22, 0.14);
  --radius: 28px;
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;


  --display: 'Archivo', 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Höhe des Heros auf dem Desktop. Die Bühne leitet ihre Breite daraus ab. */
  --hero-h: max(100svh, 46rem);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

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

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

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

.hero {
  position: relative;
  min-height: var(--hero-h);
  /* clip, nicht hidden: hidden macht den Hero zum Scrollcontainer, und dann
     greift das Anheften der Bühne (sticky) nicht mehr. */
  overflow: clip;
  isolation: isolate;
  background: var(--floor);
}
/* Der Boden des Fotos läuft weich in den Fuß aus, statt hart abzubrechen.
   Der Verlauf hängt am Foto, nicht am Hero — so liegt er unter den Lagen,
   und Adresse und RP5 verblassen nicht mit. */
.scene__photo::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 9%;
  background: linear-gradient(180deg, rgba(244, 241, 236, 0), var(--paper));
}

/* Das Foto deckt das Fenster, links verankert: Dort stehen die beiden.
   Es misst sich am Fenster, nicht am Hero — wird das Panel höher als der
   Bildschirm, bleibt die Bühne stehen, statt mitzuwachsen und das Datum
   unten abzuschneiden. */
.scene-wrap { position: absolute; inset: 0; z-index: -1; }
.scene-pin {
  position: sticky; top: 0; height: 100svh; min-height: 40rem; overflow: hidden;
  container-type: size;
}
/* Ist das Fenster breiter als 16:9, bleibt links und rechts Platz. Dort
   liegt dasselbe Foto gestreckt und stark weichgezeichnet — Vorhang links,
   Wand rechts, ohne Kante. */
.scene-pin::before {
  content: ''; position: absolute; inset: -60px;
  background: url('/assets/img/bg-quer-sm.webp') center / 100% 100% no-repeat;
  filter: blur(40px) saturate(0.9);
}
/* Der Schleier liegt über Foto und Randfüllung zugleich, damit beide rechts
   gleich hell enden. */
.scene-pin::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(120% 90% at 22% 45%, transparent 55%, rgba(244, 241, 236, 0.28)),
    linear-gradient(90deg, transparent 36%, rgba(236, 231, 225, 0.22) 60%, rgba(236, 231, 225, 0.42));
}
/* Das Foto füllt immer genau die Fensterhöhe — Logo oben und RP5 unten
   werden nie beschnitten. Ist das Fenster schmaler als 16:9, fällt der
   rechte Teil (leere Wand) weg; ist es breiter, steht das Foto mittig. */
.scene {
  position: absolute; top: 0;
  height: 100%; aspect-ratio: 16 / 9;
  left: max(0px, (100cqw - 100cqh * 16 / 9) / 2);
  container-type: inline-size;
}
@media (min-width: 1000px) {
  .scene__photo {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }
}
.scene__photo, .scene__photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene__photo img { object-fit: cover; }

/* Rechts wird das Foto zur grauen Wand. Ein Hauch Vorhang darüber, damit die
   Ticketspalte auf ruhigem Grund steht und nicht auf Flecken. */
.scene::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  display: none;
}

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

/* Lagen in Prozent des Fotos (1920 × 1080). Die Gruppe steht bei x 190–560,
   Kopf bei y 210, Füße bei y 890. Die Abstände zu den Körpern folgen dem
   Flyer: Schriftzug auf Hüfthöhe, Datum über den Beinen. */
.layer--logo  { left: 13.6%; top: 4.2%; width: 11.8%; }
.layer--art   { left: 5.6%;  top: 30.6%; width: 27.8%; z-index: 2; }
.layer--date  { left: 9.8%;  top: 71.6%; width: 19.4%; }
.layer--place { left: 5.6%;  top: 85.4%; width: 27.8%; }

.layer--logo img { filter: drop-shadow(0 0 1.2cqw rgba(244, 241, 236, 0.75)); }

/* Ohne Motiv: der Eventname bzw. „Neuer Termin folgt" als Schrift. */
.art-text {
  display: block;
  font-family: var(--display); font-stretch: 125%; font-weight: 900; font-style: italic;
  font-size: 3.4cqw; line-height: 0.95; text-align: center;
  text-transform: uppercase; letter-spacing: -0.01em;
  color: var(--bronze);
  overflow-wrap: anywhere;
}
.layer--art img + .art-text { display: none; }

.date {
  display: block; width: max-content;
  font-family: var(--display); font-stretch: 125%; font-weight: 900;
  font-size: 4.6cqw; line-height: 1; letter-spacing: 0.01em;
  color: var(--bronze);
  transform-origin: left center;
  font-variant-numeric: tabular-nums;
}

.layer--place {
  display: flex; align-items: center; justify-content: center; gap: 1.4cqw;
  font-family: var(--display); font-stretch: 100%; font-weight: 700;
  font-size: 0.86cqw; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--ink);
}
.layer--place img.rp5 { width: 1.6cqw; flex: none; }

/* ------------------------------------------------------------ Tickets ---- */

.shop {
  position: relative; z-index: 3;
  /* Nicht am Rand kleben: Das Panel rückt in den Vorhang hinein und
     wächst mit breiten Bildschirmen mit. */
  width: clamp(32rem, 30vw, 36rem);
  margin-inline-start: auto;
  margin-inline-end: clamp(1.5rem, 7vw, 9rem);
  min-height: var(--hero-h);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(2rem, 6vh, 4rem);
}
.shop > div {
  padding: clamp(1.7rem, 2.6vw, 2.5rem);
  background: rgba(247, 244, 239, 0.74);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
  backdrop-filter: blur(26px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(80, 56, 30, 0.05),
    0 40px 80px -40px rgba(80, 56, 30, 0.38);
}

.kicker {
  margin: 0 0 0.6rem;
  font-weight: 500;
  font-size: 0.66rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--bronze);
}
.shop__title {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 3.8vw, 3.3rem); line-height: 1;
  letter-spacing: -0.01em; color: var(--ink);
}
.shop__when { margin: 0.7rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }

.countdown {
  display: flex; gap: clamp(1rem, 3vw, 1.8rem);
  margin: 1.4rem 0 0; padding: 1.1rem 0 0; list-style: none;
  border-top: 1px solid var(--line);
}
.countdown li { display: flex; flex-direction: column; }
.countdown b {
  /* Cormorant führt nur Mediävalziffern; „41" läse sich als „4I". */
  font-family: var(--display); font-stretch: 110%; font-weight: 300;
  font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1;
  color: var(--bronze); font-variant-numeric: tabular-nums;
}
.countdown span {
  margin-top: 0.35rem;
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown__note {
  margin: 1.3rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.35rem; color: var(--bronze);
}

.shop__widget { margin-top: 1.4rem; }
.fallback { margin: 1.2rem 0 0; }

/* Springt auf schmalen Geräten zum Shop, solange er nicht im Bild ist. */
.jump {
  position: fixed; z-index: 40;
  left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  padding: 0.85rem 2.2rem; border-radius: 999px;
  background: var(--bronze); color: #fff; text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  box-shadow: 0 18px 36px -16px rgba(80, 56, 30, 0.7);
  transition: opacity 0.3s, translate 0.4s var(--ease-out);
}
.jump.is-away { opacity: 0; translate: -50% 150%; pointer-events: none; }
@media (min-width: 1000px) { .jump { display: none; } }

/* --------------------------------------------------------------- Fuß ---- */

.footer {
  background: var(--paper); color: var(--ink-soft);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 5vw, 5.5rem) clamp(2.5rem, 6vw, 3.5rem);
}
.footer__inner {
  max-width: 76rem; margin-inline: auto;
  display: grid; gap: 1.2rem 2.5rem; align-items: center;
  grid-template-columns: auto 1fr auto auto;
  padding-top: clamp(1.8rem, 4vw, 2.4rem);
  border-top: 1px solid var(--line);
}
.footer__logo { width: 6.5rem; height: auto; }
.footer__note { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }
.footer__nav { display: flex; gap: 1.5rem; }
.footer__nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.85rem; }
.footer__nav a:hover { color: var(--bronze); }
/* Das Clubinio-Zeichen ist hell; auf Papier wird es dunkel getönt. */
.footer__powered { display: inline-block; opacity: 0.5; filter: brightness(0.25) sepia(0.4); transition: opacity 0.2s; }
.footer__powered:hover { opacity: 1; }
.footer__powered img { width: 5.4rem; height: auto; }
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: start; }
}

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

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

body.is-ready [data-anim] { animation-duration: 1s; animation-fill-mode: both; animation-timing-function: var(--ease-out); }
body.is-ready [data-anim='photo'] { animation-name: in-photo; animation-duration: 2.2s; animation-delay: 0s; }
body.is-ready [data-anim='logo']  { animation-name: in-down;  animation-delay: 0.35s; }
body.is-ready [data-anim='art']   { animation-name: in-wipe;  animation-delay: 0.6s; animation-duration: 1.3s; }
body.is-ready [data-anim='date']  { animation-name: in-up;    animation-delay: 0.95s; }
body.is-ready [data-anim='place'] { animation-name: in-fade;  animation-delay: 1.15s; }
body.is-ready [data-anim='shop']  { animation-name: in-side;  animation-delay: 0.5s; animation-duration: 1.1s; }

@keyframes in-photo { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes in-down  { from { opacity: 0; transform: translate3d(0, -12%, 0); } to { opacity: 1; transform: none; } }
@keyframes in-wipe  { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes in-up    { from { opacity: 0; transform: translate3d(0, 30%, 0); } to { opacity: 1; transform: none; } }
@keyframes in-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes in-side  { from { opacity: 0; transform: translate3d(2.5rem, 0, 0); } to { opacity: 1; transform: none; } }

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

/* Unter 1000 px steht das Hochformat-Foto oben, der Shop auf dem Boden
   darunter. Über den Köpfen ist im Foto kein Platz für das Logo; die Bühne
   rückt deshalb um --lift nach unten, darüber läuft der Vorhang einfarbig. */
@media (max-width: 999px) {
  :root { --lift: 30vw; }

  .hero { min-height: 0; background: linear-gradient(180deg, var(--curtain) var(--lift), var(--floor) calc(var(--lift) + 258vw)); }

  .scene-pin { position: static; height: auto; min-height: 0; overflow: visible; container-type: normal; background: none; }
  .scene-pin::after, .scene-pin::before { display: none; }
  .scene {
    top: var(--lift); left: 0; height: auto;
    width: 100%; aspect-ratio: 1080 / 2788;
  }
  .scene::after, .scene__photo::after { display: none; }
  .hero::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 6rem; z-index: -1;
    background: linear-gradient(180deg, rgba(244, 241, 236, 0), var(--paper));
  }
  /* Die Oberkante des Fotos läuft in den Vorhang aus. */
  .scene__photo {
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 5%);
    mask-image: linear-gradient(180deg, transparent, #000 5%);
  }

  /* Lagen in Prozent von bg-hoch: Gruppe bei x 22–79 %, Kopf bei 3,8 %,
     Füße bei 44 %. Das Logo steht über der Oberkante des Fotos. */
  .layer--logo  { left: 31%;  top: -10.2%; width: 38%; }
  .layer--art   { left: 5%;   top: 10.4%;  width: 90%; }
  .layer--date  { left: 18%;  top: 37.6%;  width: 64%; }
  .layer--place { left: 4%;   top: 46.4%;  width: 92%; flex-direction: column; gap: 3cqw; }

  .art-text { font-size: 10cqw; }
  .date { font-size: 13cqw; }
  .layer--place { font-size: 3.3cqw; }
  .layer--place img.rp5 { width: 6.4cqw; }

  .shop {
    width: auto; min-height: 0;
    margin: 0 auto; max-width: 30rem;
    /* Der Shop beginnt unter dem RP5-Zeichen auf dem Boden. */
    padding: calc(var(--lift) + 258vw * 0.565) 1rem 2.5rem;
    display: block;
  }
  .shop > div { background: rgba(247, 244, 239, 0.84); }
}

/* Breiter als 480 px wächst die Bühne nicht mit: Das Foto würde sonst so
   hoch, dass der Shop mehrere Bildschirme tiefer stünde. */
@media (min-width: 560px) and (max-width: 999px) {
  :root { --lift: 168px; --stage-w: 560px; }
  .hero { background: linear-gradient(180deg, var(--curtain) var(--lift), var(--floor) calc(var(--lift) + 1445px)); }
  .scene { width: var(--stage-w); left: 50%; translate: -50% 0; }
  /* Die Kanten des Fotos laufen in Vorhang und Boden aus, statt als Rahmen
     stehen zu bleiben. */
  .scene__photo {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent),
      linear-gradient(180deg, transparent, #000 5%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent),
      linear-gradient(180deg, transparent, #000 5%);
    mask-composite: intersect;
  }
  .scene::before {
    content: ''; position: absolute; inset: 0 -100vw; z-index: -1;
    background: linear-gradient(180deg, var(--curtain) 0 22%, #c9c1bb 34%, var(--floor) 52%);
  }
  .shop { padding-top: calc(var(--lift) + 1445px * 0.565); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim] { opacity: 1 !important; animation: none !important; }
  .layer { translate: none !important; }
}
