/* ------------------------------------------------------------------ *
 * Launch-Countdown — Leiste mit Split-Flap-Anzeige, auf allen Seiten.
 *
 * Wird zusammen mit countdown.js eingebunden; das Markup baut das Skript.
 * Die Leiste bleibt beim Scrollen oben stehen und meldet ihre Höhe als
 * --launch-h, damit andere klebende Leisten darunter andocken können.
 * ------------------------------------------------------------------ */

/* Der Container selbst klebt — läge sticky auf .launch, wäre es an die
   Höhe dieses Containers gebunden und würde mit weggescrollt. */
#launch-bar {
  position: sticky;
  top: 0;
  z-index: 60;
}

.launch {
  padding-block: 0;                 /* schlägt die globale section-Regel */
  background: linear-gradient(180deg, #14100a 0%, #0d0f13 100%);
  border-bottom: 1px solid rgba(255, 178, 0, .35);
  backdrop-filter: blur(18px) saturate(150%);
}
.launch[hidden] { display: none; }

.launch-in {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-block: 20px;
}

.launch-copy .kicker {
  margin: 0 0 8px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #ffb200;
}
.launch-copy h2 {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: #eef1f5;
}
.launch-copy .when {
  margin: 8px 0 0;
  font-size: 14px;
  color: #a4adba;
}
.launch .short { display: none; }

/* ------------------------------------------------ Split-Flap-Ziffern */

.flipclock { display: flex; align-items: flex-start; gap: clamp(8px, 1.6vw, 18px); }
.flip-unit { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.flip-pair { display: flex; gap: 4px; }
.flip-label {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-low, #6d7683);
}
.launch .flip-label { color: #7a8390; }   /* die Leiste bleibt in beiden Modi dunkel */

.flipclock { --card-h: clamp(40px, 6.2vw, 64px); --card-w: clamp(29px, 4.4vw, 46px); --digit: clamp(26px, 4.3vw, 44px); }
.flip {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  perspective: 240px;
  border-radius: 7px;
  background: #0b0d11;
  box-shadow: inset 0 0 0 1px #2c333e, 0 6px 16px -10px #000;
}
/* Beide Hälften zeigen dieselbe ganze Ziffer in voller Kartenhöhe, sichtbar
   ist nur die obere bzw. untere Hälfte davon — dadurch liegt die Trennlinie
   exakt in der Mitte der Ziffer. */
.flip .half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: #171b22; }
.flip .half span {
  position: absolute;
  left: 0; right: 0;
  height: var(--card-h);
  display: grid;
  place-items: center;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: var(--digit);
  line-height: 1;
  color: #eef1f5;
}
.flip .top    { top: 0; border-radius: 7px 7px 0 0; border-bottom: 1px solid #0b0d11; }
.flip .top span    { top: 0; }
.flip .bottom { bottom: 0; border-radius: 0 0 7px 7px; background: #12161c; }
.flip .bottom span { bottom: 0; }

/* Die Blätter liegen nur während der Animation über den Hälften. Bleiben sie
   danach sichtbar, zeigt die obere Hälfte weiter die alte Ziffer. */
.flip .leaf, .flip .leaf-back { visibility: hidden; z-index: 2; backface-visibility: hidden; }
.flip .leaf { transform-origin: bottom center; }
.flip .leaf-back { transform-origin: top center; transform: rotateX(90deg); }
.flip.go .leaf, .flip.go .leaf-back { visibility: visible; }
.flip.go .leaf      { animation: flip-top .32s cubic-bezier(.4,.1,.6,1) forwards; }
.flip.go .leaf-back { animation: flip-bottom .32s cubic-bezier(.4,.1,.6,1) .3s forwards; }
@keyframes flip-top    { to { transform: rotateX(-90deg); } }
@keyframes flip-bottom { to { transform: rotateX(0deg); } }

/* --------------------------------------------------------- Verkauf läuft */

.launch-cta {
  display: none;
  align-items: center;
  gap: 10px;
  border-radius: 4px;            /* wie am Gehäuse: 6 % der kurzen Seite */
  padding: 14px 28px;
  background: #ffb200;
  color: #14100a;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.launch.live .flipclock { display: none; }
.launch.live .launch-cta { display: inline-flex; }

/* ------------------------------------------------------------- Handy */

@media (max-width: 760px) {
  .launch-in {
    min-height: 0;
    padding-block: 12px;
    gap: 14px;
    justify-content: center;
  }
  .launch-copy { text-align: left; }
  .launch-copy .kicker { display: none; }
  .launch-copy h2 { font-size: 15px; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; }
  .launch-copy .when { margin-top: 3px; font-size: 11.5px; }
  .launch .long { display: none; }
  .launch .short { display: inline; }
  .flip-unit { gap: 5px; }
  .flip-label { font-size: 8.5px; letter-spacing: .12em; }
  .flipclock { gap: 8px; }
  .launch-cta { padding: 11px 20px; font-size: 15px; }
}
@media (max-width: 420px) {
  .launch-copy .when { display: none; }
  .launch-copy h2 { font-size: 13.5px; }
  .launch-in { gap: 10px; padding-inline: 14px; }
  .flip { --card-h: 38px; --card-w: 26px; --digit: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .flip.go .leaf, .flip.go .leaf-back { animation-duration: .001s; }
}
