/* ==========================================================================
   MiniPlay — Stylesheet
   Inhaltsverzeichnis:
   1. Design-Tokens (Variablen)
   2. Reset & Basics
   3. Layout-Hilfsklassen
   4. Buttons
   5. Navigation
   6. Hero
   7. Spiele-Grid
   8. Über uns
   9. Kontakt
   10. Footer
   11. Scroll-Animationen
   12. Responsive
   ========================================================================== */

/* ---------- 1. Design-Tokens ---------- */
:root {
  /* Farben — dunkles, ruhiges Blau-Indigo als Basis, zwei Akzente */
  --bg: #0B0E17;
  --surface: #131826;
  --surface-2: #1B2233;
  --border: #252E44;
  --border-soft: #1E2536;

  --text: #F1F3F9;
  --text-muted: #8B92A8;
  --text-faint: #5C6480;

  --accent: #8C6BFF;      /* Violett — primär */
  --accent-2: #33E0C4;    /* Türkis — sekundär */
  --accent-3: #FFB86B;    /* Warmes Amber — sparsam eingesetzt */

  --accent-rgb: 140, 107, 255;

  /* Typografie */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radien & Schatten */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow-soft: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px -25px rgba(140, 107, 255, 0.35);

  --container-w: 1180px;
  --nav-h: 76px;
}

/* ---------- 2. Reset & Basics ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Dezenter Grid-/Vignette-Hintergrund für Tiefe */
body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(140, 107, 255, 0.10), transparent 45%),
    radial-gradient(circle at 100% 20%, rgba(51, 224, 196, 0.07), transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

::selection { background: var(--accent); color: #0B0E17; }

/* Sichtbarer Fokus-Zustand für Tastaturnutzung */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Reduced Motion respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 3. Layout-Hilfsklassen ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px 2px rgba(51, 224, 196, 0.7);
}

.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 16px;
}

.section-text {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 46ch;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

section { padding: 120px 0; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 26px;
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color .25s ease;
  white-space: nowrap;
}

.btn svg { transition: transform 0.25s ease; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6E4CF5);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(140, 107, 255, 0.55);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -10px rgba(140, 107, 255, 0.7);
}
.btn--primary:hover svg { transform: translateX(3px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.btn--sm { padding: 11px 20px; font-size: 14px; }

.btn--card {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 22px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
}
.btn--card:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- 5. Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

/* Wird per JS beim Scrollen hinzugefügt: leicht transparent + Blur */
.nav--scrolled {
  background: rgba(11, 14, 23, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo__mark { width: 36px; height: 36px; flex-shrink: 0; }

.logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.logo__accent { color: var(--accent-2); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
  font-weight: 500;
}

.nav__links a {
  position: relative;
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding: 4px 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--accent-2);
  transition: width 0.25s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 18px; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px;
}
.nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 96px);
  padding-bottom: 100px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -220px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(140,107,255,0.28), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

.hero__title {
  font-size: clamp(38px, 5.4vw, 64px);
  margin-bottom: 24px;
}
.hero__title-accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__text {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 50ch;
  margin-bottom: 36px;
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero__stats { display: flex; align-items: center; gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__num { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.stat__label { font-size: 13px; color: var(--text-faint); }
.stat__divider { width: 1px; height: 34px; background: var(--border); }

/* Controller-Illustration */
.hero__visual { display: flex; justify-content: center; align-items: center; position: relative; }

.controller { position: relative; width: 100%; max-width: 420px; }

.controller__svg {
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  animation: float 6s ease-in-out infinite;
}

.controller__stick { transition: transform 0.3s ease; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

.pixel {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 3px;
  opacity: 0.85;
}
.pixel--1 { top: 8%;  left: 4%;  background: var(--accent-2); animation: drift 5s ease-in-out infinite; }
.pixel--2 { top: 66%; left: -2%; background: var(--accent);   animation: drift 6.5s ease-in-out infinite 0.6s; }
.pixel--3 { top: 4%;  right: 6%; background: var(--accent-3); animation: drift 5.6s ease-in-out infinite 1.1s; }
.pixel--4 { top: 78%; right: 2%; background: var(--accent-2); animation: drift 7s ease-in-out infinite 0.3s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.15); }
}

/* ---------- 7. Spiele-Grid ---------- */
.games__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 30px 26px 26px;
  /* Cartridge-Kerbe oben rechts — kleines Signatur-Detail statt Standard-Karte */
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--shadow-glow);
}

.game-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.game-card__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--icon-a) 22%, transparent), color-mix(in srgb, var(--icon-b) 18%, transparent));
  color: var(--icon-a);
  transition: transform 0.3s ease;
}
.game-card__icon svg { width: 22px; height: 22px; }
.game-card:hover .game-card__icon { transform: scale(1.08) rotate(-4deg); }

.game-card__badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
}

.game-card__title {
  font-size: 20px;
  margin-bottom: 10px;
}

.game-card__text {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- 8. Über uns ---------- */
.about__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

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

.about__card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 360px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.about__card:hover { transform: translateX(6px); border-color: rgba(var(--accent-rgb), 0.4); }
.about__card--offset { margin-left: 44px; }

.about__glyph {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 9px;
}

/* ---------- 9. Kontakt ---------- */
.contact { padding-bottom: 160px; }
.contact__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.contact__inner .section-title { margin-bottom: 0; }
.contact__inner .section-text { margin-bottom: 12px; }

/* ---------- 10. Footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.logo--footer { grid-row: 1; }

.footer__links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer__links a:hover { color: var(--text); }

.footer__socials { display: flex; gap: 12px; justify-self: end; }

.social {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
}
.social svg { width: 16px; height: 16px; }
.social:hover { color: var(--accent-2); border-color: var(--accent-2); transform: translateY(-2px); }

.footer__copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- 11. Scroll-Animationen ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Gestaffelte Verzögerung für Spiele-Karten */
.games__grid .game-card:nth-child(1) { transition-delay: 0.02s; }
.games__grid .game-card:nth-child(2) { transition-delay: 0.08s; }
.games__grid .game-card:nth-child(3) { transition-delay: 0.14s; }
.games__grid .game-card:nth-child(4) { transition-delay: 0.20s; }
.games__grid .game-card:nth-child(5) { transition-delay: 0.26s; }
.games__grid .game-card:nth-child(6) { transition-delay: 0.32s; }

/* ---------- 12. Responsive ---------- */
@media (max-width: 980px) {
  .games__grid { grid-template-columns: repeat(2, 1fr); }
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__visual { order: 2; }
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 340px; margin: 0 auto 20px; }
  .hero__content { text-align: left; }
}

@media (max-width: 760px) {
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11, 14, 23, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav__links.is-open { max-height: 320px; }
  .nav__links a {
    width: 100%;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav__links a::after { display: none; }

  .nav__burger { display: flex; }
  .nav__actions .btn--sm { display: none; }

  .games__grid { grid-template-columns: 1fr; }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .footer__socials { justify-self: center; }

  section { padding: 84px 0; }
  .hero { padding-top: calc(var(--nav-h) + 56px); }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero__stats { flex-wrap: wrap; row-gap: 16px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}
