/* Your Happy Path — Numbers
   Design Tokens aus App-Doku (09_User_Interface / DD-009) */

:root {
  --bg: #f6e8d6;
  --bg-elevated: #fbf3e8;
  --text: #514d66;
  --text-soft: #6d6884;
  --turquoise: #158a83;
  --turquoise-light: #3aa39c;
  --blue: #4246c1;
  --blue-light: #6a6dd1;
  --red: #ca4a5c;
  --red-light: #d96f7d;
  --violet: #514d66;
  --light-blue: #9eaddb;
  --light-blue-light: #b8c4e6;
  --cream: #f0ddc4;
  --surface: rgba(251, 243, 232, 0.72);
  --stroke: rgba(81, 77, 102, 0.12);
  --shadow: 0 18px 40px rgba(81, 77, 102, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max: 1120px;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Avenir Next Rounded", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--turquoise);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.45em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--violet);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Ambient background blobs */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
  overflow: hidden;
}

.page-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.42;
  animation: drift 18s var(--ease) infinite alternate;
}

.page-bg span:nth-child(1) {
  width: 42vw;
  height: 42vw;
  top: -12%;
  left: -8%;
  background: var(--turquoise);
  animation-duration: 22s;
}

.page-bg span:nth-child(2) {
  width: 36vw;
  height: 36vw;
  top: 18%;
  right: -10%;
  background: var(--light-blue);
  animation-duration: 26s;
}

.page-bg span:nth-child(3) {
  width: 28vw;
  height: 28vw;
  bottom: -8%;
  left: 30%;
  background: var(--red);
  opacity: 0.28;
  animation-duration: 20s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3%, 4%) scale(1.08); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(246, 232, 214, 0.82);
  border-bottom: 1px solid var(--stroke);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 2.6rem;
  height: auto;
}

.brand span {
  font-size: 0.95rem;
  color: var(--violet);
}

.brand em {
  font-style: normal;
  color: var(--turquoise);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--turquoise);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--violet);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff8f0;
  background: linear-gradient(145deg, var(--turquoise), var(--turquoise-light));
  box-shadow: 0 12px 28px rgba(21, 138, 131, 0.28);
}

.btn-primary:hover {
  color: #fff8f0;
  filter: brightness(1.04);
}

.btn-blue {
  color: #fff8f0;
  background: linear-gradient(145deg, var(--blue), var(--blue-light));
  box-shadow: 0 12px 28px rgba(66, 70, 193, 0.28);
}

.btn-blue:hover {
  color: #fff8f0;
}

.btn-ghost {
  color: var(--violet);
  background: rgba(251, 243, 232, 0.7);
  border: 1px solid var(--stroke);
}

.btn-ghost:hover {
  color: var(--violet);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.22;
}

.hero__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246, 232, 214, 0.2) 0%, rgba(246, 232, 214, 0.55) 45%, var(--bg) 100%),
    radial-gradient(circle at 70% 30%, rgba(158, 173, 219, 0.35), transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(21, 138, 131, 0.25), transparent 40%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  animation: rise 0.9s var(--ease) both;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.hero__brand img {
  width: min(7.5rem, 28vw);
  filter: drop-shadow(0 10px 24px rgba(81, 77, 102, 0.18));
  animation: float 5.5s ease-in-out infinite;
}

.hero__brand-text {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--violet);
}

.hero__brand-text span {
  display: block;
  color: var(--turquoise);
}

.hero h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.2rem);
  font-weight: 700;
  max-width: 18ch;
  margin-bottom: 0.75rem;
}

.hero .lead {
  font-size: 1.08rem;
  max-width: 36ch;
  margin-bottom: 1.6rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding: 3rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.feature-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.feature-dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--turquoise), var(--turquoise-light));
  box-shadow: 0 0 0 6px rgba(21, 138, 131, 0.12);
}

.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(145deg, var(--blue), var(--blue-light));
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Interactive tiles / pack tiles — interaction containers */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  color: #fff8f0;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), filter 0.25s;
}

.tile:hover {
  transform: translateY(-4px);
  color: #fff8f0;
  filter: brightness(1.03);
}

.tile h3 {
  color: inherit;
  font-size: 1.25rem;
}

.tile p {
  color: rgba(255, 248, 240, 0.9);
  flex: 1;
}

.tile .tile-meta {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.9;
}

.tile--turquoise { background: linear-gradient(155deg, var(--turquoise), var(--turquoise-light)); }
.tile--blue { background: linear-gradient(155deg, var(--blue), var(--blue-light)); }
.tile--red { background: linear-gradient(155deg, var(--red), var(--red-light)); }
.tile--violet { background: linear-gradient(155deg, #514d66, #6d6884); }
.tile--light { background: linear-gradient(155deg, #7f91c8, var(--light-blue)); color: var(--violet); }
.tile--light h3 { color: var(--violet); }
.tile--light p { color: var(--text-soft); }
.tile--light:hover { color: var(--violet); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.game-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
}

.game-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.game-card .tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff8f0;
  background: var(--turquoise);
}

.game-card .tag--blue { background: var(--blue); }
.game-card .tag--red { background: var(--red); }

.pack-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--stroke);
}

.pack-hero img {
  width: 180px;
  border-radius: var(--radius-sm);
}

.cta-band {
  margin: 1rem 0 0;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(21, 138, 131, 0.16), rgba(66, 70, 193, 0.14));
  border: 1px solid var(--stroke);
}

.cta-band h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.placeholder-slot {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(81, 77, 102, 0.22);
  background: rgba(251, 243, 232, 0.45);
  color: var(--text-soft);
}

.placeholder-slot strong {
  display: block;
  color: var(--violet);
  margin-bottom: 0.35rem;
}

/* Page title */
.page-hero {
  padding: 3.5rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--turquoise);
}

/* Legal */
.legal {
  max-width: 46rem;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.legal ul {
  padding-left: 1.2rem;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--stroke);
  margin-top: 2rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--turquoise);
}

.site-footer p {
  font-size: 0.9rem;
}

/* Demo embed on landing */
.demo-panel {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.demo-panel h3 {
  margin-bottom: 0.35rem;
}

.demo-frame {
  margin-top: 1rem;
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(246, 232, 214, 0.65);
  border: 1px solid var(--stroke);
}

.demo-frame iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

@media (max-width: 900px) {
  .split,
  .tile-grid,
  .game-grid,
  .pack-hero {
    grid-template-columns: 1fr;
  }

  .pack-hero img {
    width: min(220px, 60%);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(246, 232, 214, 0.96);
    border-bottom: 1px solid var(--stroke);
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header.is-open .nav {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .section {
    padding: 3.25rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
