/* Arc Mode – Warteliste. Farben wie in der App (src/constants/theme.ts): dunkel + eisig. */

:root {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-high: #1b2740;
  --border: #24324d;
  --text: #eaf2ff;
  --text-dim: #8fa3c0;
  --text-faint: #5b6e8c;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-shadow: #1b6fa0;
  --on-accent: #06111f;
  --danger: #f87171;
  --success: #34d399;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

/* sonst gewinnt z. B. display: flex gegen das hidden-Attribut */
[hidden] {
  display: none !important;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 800;
}

h2 {
  font-size: clamp(26px, 6.5vw, 36px);
  font-weight: 800;
}

h3 {
  font-size: 19px;
  font-weight: 700;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Pixel-Sprites: 2 Frames nebeneinander, Animation im Takt der App --------- */

.sprite {
  aspect-ratio: 24 / 28;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  image-rendering: pixelated;
  animation: sprite-frames var(--ms, 1.2s) steps(1, end) infinite;
}

@keyframes sprite-frames {
  0% {
    background-position: 0 0;
  }
  50%,
  100% {
    background-position: 100% 0;
  }
}

.s-hero {
  background-image: url(/img/hero.png);
  --ms: 440ms;
}

.mood-unstoppable {
  background-image: url(/img/mood-unstoppable.png);
  --ms: 440ms;
}
.mood-good {
  background-image: url(/img/mood-good.png);
  --ms: 1200ms;
}
.mood-okay {
  background-image: url(/img/mood-okay.png);
  --ms: 1400ms;
}
.mood-sad {
  background-image: url(/img/mood-sad.png);
  --ms: 1000ms;
}
.mood-frozen {
  background-image: url(/img/mood-frozen.png);
  --ms: 1800ms;
}

.s-char {
  --ms: 1200ms;
}
.c-mann {
  background-image: url(/img/char-mann.png);
}
.c-frau {
  background-image: url(/img/char-frau.png);
}
.c-pinguin {
  background-image: url(/img/char-pinguin.png);
}
.c-gym-bro {
  background-image: url(/img/char-gym-bro.png);
}
.c-schneemann {
  background-image: url(/img/char-schneemann.png);
}
.c-kaeltemoench {
  background-image: url(/img/char-kaeltemoench.png);
}
.c-navy-seal {
  background-image: url(/img/char-navy-seal.png);
}
.c-yeti {
  background-image: url(/img/char-yeti.png);
}

.snow {
  height: 24px;
  background: url(/img/snow.png) repeat-x;
  background-size: 80px 24px;
  image-rendering: pixelated;
}

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

.hero {
  position: relative;
  overflow: hidden;
  /* Nachthimmel in Stufen wie beim App-Icon */
  background: linear-gradient(
    to bottom,
    #060b16 0 18%,
    #08101f 18% 36%,
    #0b1628 36% 54%,
    #0e1d35 54% 72%,
    #122543 72% 100%
  );
  padding-top: max(28px, env(safe-area-inset-top));
}

.snowfall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.wordmark {
  display: block;
  width: 176px;
  height: auto;
  image-rendering: pixelated;
}

/* Sprachauswahl: natives Select (auf dem iPhone das Scroll-Rad) */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(19 28 46 / 0.8);
  font-size: 16px;
  cursor: pointer;
}

.lang-picker::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.lang-picker:focus-within {
  border-color: var(--accent);
}

/* unsichtbar über der ganzen Pille, damit überall ein Tipp das Auswahlrad öffnet */
.lang-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px; /* ≥ 16px, sonst zoomt iOS */
  cursor: pointer;
}

.lang-select option {
  background: var(--surface);
  color: var(--text);
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.lead {
  color: var(--text-dim);
  font-size: 18px;
}

.count {
  color: var(--text-dim);
  font-size: 15px;
}

.count strong {
  color: var(--text);
}

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.stage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: url(/img/snow.png) repeat-x;
  background-size: 80px 24px;
  image-rendering: pixelated;
}

.stage .sprite {
  position: relative;
  z-index: 1;
  width: clamp(168px, 52vw, 240px);
}

.hero-compact .hero-inner {
  padding-bottom: 8px;
}

.hero-compact .stage .sprite {
  width: clamp(144px, 40vw, 192px);
}

/* --- Formular ---------------------------------------------------------------- */

.signup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.field {
  display: flex;
  gap: 8px;
}

input[type='email'] {
  flex: 1 1 auto;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px; /* ≥ 16px, sonst zoomt iOS beim Tippen */
  transition: border-color 150ms ease;
}

input[type='email']::placeholder {
  color: var(--text-faint);
}

input[type='email']:focus {
  outline: none;
  border-color: var(--accent);
}

input[aria-invalid='true'] {
  border-color: var(--danger);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  /* harter Pixel-Schatten statt weichem Glow */
  box-shadow: 0 4px 0 var(--accent-shadow);
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out;
  touch-action: manipulation;
  user-select: none;
}

button:active,
.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-shadow);
}

button:focus-visible,
.button:focus-visible,
summary:focus-visible,
.tasks input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.button.secondary,
button.secondary {
  background: var(--surface-high);
  color: var(--text);
  box-shadow: 0 4px 0 var(--border);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hint:empty {
  display: none;
}

.hint {
  font-size: 15px;
  color: var(--danger);
}

.hint button {
  height: auto;
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--accent);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.fineprint {
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.45;
}

.fineprint a {
  color: var(--text-dim);
}

@media (max-width: 420px) {
  .field {
    flex-direction: column;
  }
}

/* --- Erfolg & Teilen ---------------------------------------------------------- */

.success {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  animation: pop-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.success-title {
  font-size: 22px;
  font-weight: 800;
}

.success strong {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.share {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-buttons > * {
  flex: 1 1 140px;
}

.share-url {
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.confirm-state {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.confirm-state .share {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.confirm-position {
  color: var(--accent);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
}

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

main > section {
  padding-top: 72px;
}

.section-lead {
  margin-top: 10px;
  color: var(--text-dim);
}

/* Laune-Demo */
.demo-card {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.demo-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-height: 300px;
}

.demo-character .sprite {
  width: 168px;
}

.demo-character .sprite.bump {
  animation:
    sprite-frames var(--ms, 1.2s) steps(1, end) infinite,
    bump 320ms cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes bump {
  from {
    transform: scale(0.9);
  }
}

.mood-label {
  font-size: 19px;
}

.mood-text {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 300px;
}

.tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.tasks label {
  display: block;
  cursor: pointer;
}

.tasks input {
  position: absolute;
  opacity: 0;
}

.tasks span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-high);
  font-weight: 600;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
  user-select: none;
}

.tasks span::after {
  content: '';
  width: 22px;
  height: 22px;
  margin-left: auto;
  border: 2px solid var(--text-faint);
  border-radius: 6px;
}

.tasks input:checked + span {
  border-color: var(--success);
  background: rgb(52 211 153 / 0.12);
}

.tasks input:checked + span::after {
  border-color: var(--success);
  background: var(--success)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%2306111f' stroke-width='2.5'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.progress {
  height: 10px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--surface-high);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-strong), var(--success));
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 600px) {
  .demo-card {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 28px;
  }
}

/* Features */
.feature-grid {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.feature {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.feature-icon {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 12px;
}

.feature p {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 16px;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Charaktere */
.lineup-row {
  display: flex;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0 20px 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  scrollbar-width: none;
}

.lineup-row::-webkit-scrollbar {
  display: none;
}

.lineup-row li {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 104px;
  padding: 12px 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  scroll-snap-align: start;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}

.lineup-row .sprite {
  width: 72px;
}

.lineup-row li:nth-child(2n) .sprite {
  animation-delay: -300ms;
}
.lineup-row li:nth-child(3n) .sprite {
  animation-delay: -700ms;
}

@media (min-width: 900px) {
  .lineup-row {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* FAQ */
.faq h2 {
  margin-bottom: 16px;
}

details {
  border-bottom: 1px solid var(--border);
}

summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  transition: transform 200ms ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding-bottom: 16px;
  color: var(--text-dim);
}

/* Abschluss */
.cta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 72px;
}

.footer {
  margin-top: auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  background: #f8fafc;
  color: var(--on-accent);
  text-align: center;
  font-size: 14px;
}

.footer .snow {
  background-color: var(--bg);
}

.footer p {
  padding-top: 8px;
}

.footer a {
  color: var(--on-accent);
}

/* --- Rechtstexte -------------------------------------------------------------- */

.legal {
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: 64px;
}

.legal .topbar {
  margin-bottom: 32px;
}

.legal h1 {
  font-size: clamp(28px, 7vw, 40px);
  margin-bottom: 24px;
}

.legal h2 {
  font-size: 21px;
  margin: 32px 0 10px;
}

.legal p,
.legal ul {
  margin: 0 0 12px;
  color: var(--text-dim);
}

.legal ul {
  padding-left: 20px;
}

.legal strong {
  color: var(--text);
}

/* --- Bewegung reduzieren -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sprite,
  .demo-character .sprite.bump,
  .success {
    animation: none;
  }

  button,
  .button,
  .progress-bar {
    transition: none;
  }
}

/* --- TikTok ---------------------------------------------------------------------- */

.tiktok-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.follow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 15px;
}

.follow a {
  font-weight: 700;
}

.footer-tiktok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.footer-tiktok .tiktok-icon {
  width: 14px;
  height: 14px;
}
