/* ============================================================
   puzzleUp – Website Styles
   Selbst gehostet, keine externen Ressourcen (DSGVO-freundlich).
   ============================================================ */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --ink: #20264d;
  --muted: #5b6180;
  --line: rgba(32, 38, 77, 0.09);
  --shadow: 0 10px 30px rgba(32, 38, 77, 0.10);
  --shadow-soft: 0 4px 14px rgba(32, 38, 77, 0.07);

  /* Teilefarben – angelehnt an die bunten Spielsteine */
  --c-coral: #ff6b6b;
  --c-amber: #ffb84d;
  --c-mint: #3ecfb2;
  --c-sky: #5aa9ff;
  --c-lilac: #a78bfa;
  --c-pink: #ff8fb3;

  --accent: #5aa9ff;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, #5aa9ff 0%, #a78bfa 55%, #ff8fb3 100%);

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111330;
    --surface: #1a1d40;
    --ink: #eef0ff;
    --muted: #a7acd0;
    --line: rgba(238, 240, 255, 0.10);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; flex: none; }
.brand b { color: var(--accent); font-weight: 700; }

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}
.main-nav a:hover {
  color: var(--ink);
  background: var(--line);
  text-decoration: none;
}

/* Sprachumschalter */
.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
  background: var(--surface);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--ink); }

@media (max-width: 720px) {
  .main-nav { display: none; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow); }

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.hero-note {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* dekorative, schwebende Teile im Hintergrund */
.deco {
  position: absolute;
  border-radius: 8px;
  opacity: 0.14;
  pointer-events: none;
}
.deco.d1 { width: 70px; height: 70px; background: var(--c-coral); top: 8%; left: -18px; transform: rotate(12deg); }
.deco.d2 { width: 46px; height: 46px; background: var(--c-mint); top: 68%; left: 4%; transform: rotate(-14deg); }
.deco.d3 { width: 90px; height: 90px; background: var(--c-lilac); top: -24px; right: 6%; transform: rotate(24deg); }
.deco.d4 { width: 40px; height: 40px; background: var(--c-amber); bottom: 8%; right: 2%; transform: rotate(-8deg); }

/* ---------- Phone-Mockup ---------- */

.phone-wrap { display: flex; justify-content: center; }

.phone {
  width: min(300px, 78vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
}
.phone::before {
  /* Kamera-Notch */
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.screen {
  border-radius: 22px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 65%, var(--surface));
  padding: 26px 12px 14px;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.screen-top .t-brand { color: var(--ink); font-size: 0.8rem; }
.screen-top .t-brand b { color: var(--accent); }

.board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 3px;
  aspect-ratio: 1;
}
.board .cell {
  border-radius: 5px;
  background: var(--line);
}
.board .cell.filled {
  background: var(--pc, var(--c-sky));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  animation: cell-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  animation-delay: var(--delay, 0s);
}

@keyframes cell-pop {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.tray {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 4px 6px;
}
.tray .slot {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px dashed var(--line);
  display: grid;
  place-items: center;
}
.mini {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  grid-template-rows: repeat(3, 10px);
  gap: 2px;
}
.mini i {
  border-radius: 2.5px;
  background: var(--pc, var(--c-mint));
}
.mini i.off { background: transparent; }

.float-piece {
  position: absolute;
  right: 8%;
  top: -12px;
  filter: drop-shadow(0 10px 14px rgba(32, 38, 77, 0.35));
  animation: bob 2.6s ease-in-out infinite;
  transform: rotate(-6deg);
}
.float-piece .mini { grid-template-columns: repeat(3, 14px); grid-template-rows: repeat(2, 14px); }
.float-piece .mini i { border-radius: 4px; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@media (prefers-reduced-motion: reduce) {
  .board .cell.filled { animation: none; }
  .float-piece { animation: none; }
  html { scroll-behavior: auto; }
}

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

section { padding: 64px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 42px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.section-head p { color: var(--muted); margin: 0; }

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: #fff;
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.icon.i1 { background: var(--c-sky); }
.icon.i2 { background: var(--c-coral); }
.icon.i3 { background: var(--c-amber); }
.icon.i4 { background: var(--c-mint); }
.icon.i5 { background: var(--c-lilac); }
.icon.i6 { background: var(--c-pink); }

/* How-to */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 24px 26px;
  box-shadow: var(--shadow-soft);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 22px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}
.step h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Download */
.download-band {
  background: var(--grad);
  border-radius: 26px;
  padding: 52px 30px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
}
.download-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.015em; }
.download-band p { margin: 0 0 26px; opacity: 0.92; }

.store-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(17, 19, 48, 0.92);
  color: #fff;
  border-radius: 14px;
  padding: 10px 20px;
  text-align: left;
  transition: transform 0.15s ease;
}
.store-badge:hover { text-decoration: none; transform: translateY(-2px); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 0.68rem; opacity: 0.75; letter-spacing: 0.02em; }
.store-badge strong { display: block; font-size: 1.02rem; line-height: 1.25; }
.store-badge.soon { opacity: 0.62; cursor: default; }
.store-badge.soon:hover { transform: none; }

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

.legal {
  padding: 56px 0 72px;
}
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.02em; margin: 0 0 6px; }
.legal .stand { color: var(--muted); font-size: 0.9rem; margin: 0 0 34px; }
.legal h2 { font-size: 1.25rem; margin: 38px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); }
.legal .placeholder {
  background: color-mix(in srgb, var(--c-amber) 22%, transparent);
  border-radius: 4px;
  padding: 0 4px;
  color: var(--ink);
}
.legal address { font-style: normal; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 55vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 22px;
}
.error-page .code {
  font-size: 5rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step { margin-top: 12px; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
  .hero { padding: 48px 0 40px; }
}
