/* ═══════════════════════════════════════════════════════════════════════
   Swiss Interstellar Federation — Linktree
   Farben und Rhythmus zentral hier oben.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --red: #ED1C24;
  --gold: #F2C94C;  /* Signal Yellow der 30K-Org, dort mit Pure Black gepaart */
  --black: #050505;
  --panel: rgba(12, 12, 12, 0.74);
  --panel-solid: rgba(10, 10, 10, 0.72);
  --hair: rgba(255, 255, 255, 0.12);
  --ink: #ffffff;
  --ink-70: rgba(255, 255, 255, 0.74);
  --ink-55: rgba(255, 255, 255, 0.55);
  --ink-38: rgba(255, 255, 255, 0.38);
  --ink-25: rgba(255, 255, 255, 0.25);
  --display: 'Chakra Petch', system-ui, sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --slides: 5;          /* Anzahl Hintergrundbilder */
  --slide-dur: 60s;     /* volle Runde: 5 × 12s */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* ── Hintergrund ─────────────────────────────────────────────────────── */

.bg { position: fixed; inset: 0; overflow: hidden; background: var(--black); z-index: 0; }
.bg__stage { position: absolute; inset: 0; }

.bg__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: sifSlide var(--slide-dur) linear infinite;
  /* Jedes Bild startet um ein Fünftel der Runde versetzt. Der Abzug von 6 %
     zieht Bild 0 auf den Blendenscheitel vor — sonst ist beim Laden 3.6 s
     lang nur Schwarz zu sehen. */
  animation-delay: calc(var(--i) * var(--slide-dur) / var(--slides) - var(--slide-dur) * 0.06);
  will-change: opacity, transform;
}

/* Kreuzblende mit langsamem Zoom: 20 %–26 % blendet das aktuelle Bild aus,
   während das nächste über seine 0 %–6 % einblendet. */
@keyframes sifSlide {
  0%   { opacity: 0; transform: scale(1.04); }
  6%   { opacity: 1; }
  20%  { opacity: 1; }
  26%  { opacity: 0; transform: scale(1.14); }
  100% { opacity: 0; transform: scale(1.04); }
}

.bg__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(5,5,5,0.35) 0%, rgba(5,5,5,0.82) 55%, var(--black) 100%);
}
.bg__fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.65) 0%, rgba(5,5,5,0.2) 30%, rgba(5,5,5,0.9) 100%);
}
.bg__scanlines {
  position: absolute; inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(180deg,
    rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px,
    transparent 1px, transparent 3px);
}

/* ── Seitenraster ────────────────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 64px 20px calc(72px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

/* ── Kopf ────────────────────────────────────────────────────────────── */

.hero { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; }

.eyebrow {
  margin: 0;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  text-align: center;
}
.eyebrow__rule { width: 26px; height: 1px; background: var(--red); flex: none; }

.hero__mark {
  width: 148px; height: 148px;
  display: block;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 60px rgba(237,28,36,0.35);
}

.hero__title {
  margin: 0;
  max-width: 480px; /* hält "Swiss Interstellar / Federation" auf zwei Zeilen */
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.hero__lead {
  margin: 0;
  max-width: 460px;
  text-align: center;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-70);
  text-wrap: pretty;
}

/* ── Kennzahlen ──────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
}
.stat {
  background: var(--panel-solid);
  padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
/* Wert und Label müssen einzeilig bleiben — "Since 2012" über zwei Zeilen
   reisst die Kachel auf und bringt die Dreier-Reihe aus dem Gleichgewicht.
   Darum skaliert beides mit der Viewportbreite statt umzubrechen. */
.stat__value {
  font-family: var(--display);
  font-size: clamp(15px, 4.2vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.stat__label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* ── Links ───────────────────────────────────────────────────────────── */

.links { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.link {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: stretch;
  border: 1px solid var(--hair);
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.link:hover, .link:focus-visible {
  border-color: var(--red);
  background: rgba(24,6,8,0.82);
  transform: translateX(4px);
}
.link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.link:hover .link__arrow, .link:focus-visible .link__arrow { color: var(--red); transform: translateX(3px); }

.link__icon {
  display: flex; align-items: center; justify-content: center;
  background: var(--red);
  color: var(--ink);
}
.link__icon svg { width: 24px; height: 24px; display: block; }

/* 30K Org fährt die eigene Marke: Signal Yellow mit schwarzem Zeichen.
   Das Zeichen ist breit und flach — es verträgt mehr Kantenlänge als die
   quadratischen Strich-Icons, sonst wirkt es verloren. */
.link__icon--30k { background: var(--gold); color: #000000; }
.link__icon svg.is-30k { width: 30px; height: 30px; }

.link__body {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 16px 18px;
  min-height: 74px;
  min-width: 0;
}
.link__title {
  font-family: var(--display);
  font-size: 16px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.link__sub {
  font-size: 13px;
  color: var(--ink-55);
  letter-spacing: 0.02em;
  text-wrap: pretty;
}
.link__arrow {
  display: flex; align-items: center;
  padding-right: 18px;
  font-family: var(--display); font-size: 15px;
  color: rgba(255,255,255,0.35);
  transition: color .18s ease, transform .18s ease;
}

/* ── QR ──────────────────────────────────────────────────────────────── */

.qr {
  display: flex; align-items: center; gap: 20px;
  width: 100%;
  border: 1px solid var(--hair);
  background: var(--panel);
  padding: 18px;
}
.qr__code { width: 108px; height: 108px; flex: none; display: block; background: #000; }
.qr__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qr__body p { margin: 0; }
.qr__kicker {
  font-family: var(--display);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red);
}
.qr__text { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.7); text-wrap: pretty; }
.qr__url {
  font-family: var(--display);
  font-size: 12px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  overflow-wrap: anywhere;
}

/* ── Fuss ────────────────────────────────────────────────────────────── */

.foot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 8px;
}
.foot p { margin: 0; }
.foot__rule { width: 1px; height: 34px; background: linear-gradient(180deg, var(--red), rgba(237,28,36,0)); }
.foot__brand {
  font-family: var(--display);
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-38);
  text-align: center;
}
.foot__legal {
  font-size: 11px; line-height: 1.6;
  color: var(--ink-25);
  text-align: center; max-width: 420px;
}

/* ── Enge Viewports ──────────────────────────────────────────────────── */

/* Die Eyebrow-Zeile muss zwischen den roten Strichen einzeilig bleiben —
   das Sperrsatz-Tracking frisst sonst zu viel Breite. */
@media (max-width: 560px) {
  .eyebrow { font-size: 10px; letter-spacing: 0.22em; gap: 10px; }
  .eyebrow__rule { width: 20px; }
  /* "SC COMMUNITY" braucht das enge Tracking, sonst passt es nicht in ein Drittel */
  .stat { padding: 14px 6px; }
  .stat__label { font-size: 9px; letter-spacing: 0.1em; }
}

@media (max-width: 400px) {
  .page { padding: 44px 16px calc(56px + env(safe-area-inset-bottom)); gap: 28px; }
  /* enger gesetzt, damit die Zeile zwischen den Strichen einzeilig bleibt */
  .eyebrow { font-size: 9px; letter-spacing: 0.18em; gap: 8px; }
  .eyebrow__rule { width: 16px; }
  .link { grid-template-columns: 62px 1fr auto; }
  .link__body { padding: 14px 14px; min-height: 66px; }
  .link__title { font-size: 15px; letter-spacing: 0.1em; }
  .qr { flex-direction: column; align-items: flex-start; }
}

/* ── Bewegung reduzieren: Slideshow steht still ──────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .bg__img { animation: none; opacity: 0; transform: none; }
  .bg__stage picture:first-child .bg__img { opacity: 1; }
  .link, .link__arrow { transition: none; }
  .link:hover, .link:focus-visible { transform: none; }
}
