:root {
  --bg-top: #fff3d8;
  --bg-bottom: #d7f0ff;
  --surface: rgba(255, 251, 243, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(255, 249, 238, 0.66);
  --ink: #2d3b45;
  --muted: #617381;
  --accent: #ef7e49;
  --accent-strong: #d96028;
  --accent-soft: #ffe2a3;
  --line: rgba(255, 255, 255, 0.7);
  --shadow: rgba(76, 90, 110, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Marker Felt", "Comic Sans MS", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 32%),
    radial-gradient(circle at 86% 14%, rgba(255, 221, 144, 0.5), transparent 18%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 38px;
}

.site-shell-guide {
  width: min(1040px, calc(100% - 32px));
}

.hero,
.quick-strip,
.games-section,
.support-section,
.closing-band,
.guide-hero,
.guide-grid,
.faq-section {
  margin-top: 16px;
  border: 3px solid var(--line);
  border-radius: 32px;
  box-shadow: 0 18px 34px var(--shadow);
  backdrop-filter: blur(10px);
}

.site-shell > :first-child {
  margin-top: 0;
}

.hero {
  min-height: 68vh;
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 255, 255, 0.96), transparent 15%),
    radial-gradient(circle at 92% 9%, rgba(255, 218, 111, 0.88), transparent 8%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.78), rgba(220, 244, 255, 0.74)),
    var(--surface);
}

.guide-hero {
  padding: 28px 30px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(255, 249, 240, 0.88), rgba(237, 247, 255, 0.82)),
    var(--surface);
}

.hero-copy,
.guide-copy {
  max-width: 34rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  line-height: 0.92;
  max-width: 8ch;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 0.98;
}

.lead {
  margin-bottom: 0;
  max-width: 54ch;
  font-size: 1.12rem;
  line-height: 1.48;
}

.hero-actions,
.guide-actions,
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions,
.guide-actions {
  margin-top: 24px;
  flex-wrap: wrap;
}

.section-head {
  justify-content: space-between;
}

.primary-link,
.secondary-link,
.ghost-link,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.primary-link,
.card-link {
  color: #fffaf4;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 24px rgba(217, 96, 40, 0.22);
}

.secondary-link,
.ghost-link {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.primary-link:hover,
.secondary-link:hover,
.ghost-link:hover,
.card-link:hover,
.primary-link:focus-visible,
.secondary-link:focus-visible,
.ghost-link:focus-visible,
.card-link:focus-visible {
  transform: translateY(-2px);
}

.hero-board {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95), transparent 11%),
    radial-gradient(circle at 76% 20%, rgba(255, 255, 255, 0.74), transparent 10%),
    linear-gradient(180deg, #9bdcfb 0 53%, #e5f7c9 53% 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.hero-board::before,
.hero-board::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
}

.hero-board::before {
  height: 24%;
  background:
    radial-gradient(ellipse at 12% 100%, #9fd06f 0 20%, transparent 21%),
    radial-gradient(ellipse at 42% 100%, #b9e28d 0 22%, transparent 23%),
    radial-gradient(ellipse at 72% 100%, #9ccf6e 0 20%, transparent 21%),
    linear-gradient(180deg, rgba(221, 248, 201, 0) 0%, rgba(183, 226, 127, 0.92) 58%, rgba(165, 213, 103, 0.98) 100%);
}

.hero-board::after {
  bottom: 14%;
  height: 10%;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 229, 132, 0.92) 0 9px, transparent 10px),
    radial-gradient(circle at 18% 74%, #ffffff 0 17px, transparent 18px),
    radial-gradient(circle at 58% 50%, rgba(255, 160, 160, 0.92) 0 9px, transparent 10px),
    radial-gradient(circle at 58% 74%, #ffffff 0 17px, transparent 18px),
    radial-gradient(circle at 80% 48%, rgba(255, 191, 119, 0.92) 0 9px, transparent 10px),
    radial-gradient(circle at 80% 72%, #ffffff 0 17px, transparent 18px);
}

.floating-card {
  position: absolute;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 251, 243, 0.9);
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 28px rgba(86, 98, 116, 0.16);
  animation: floaty 4.2s ease-in-out infinite;
}

.floating-card span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.floating-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.18rem, 2vw, 1.8rem);
}

.floating-card-large {
  top: 12%;
  left: 10%;
  width: 180px;
}

.floating-card-small {
  top: 22%;
  right: 10%;
  animation-delay: 0.8s;
}

.floating-card-wide {
  left: 12%;
  bottom: 16%;
  width: min(72%, 300px);
  animation-delay: 1.4s;
}

.quick-strip {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: rgba(255, 251, 243, 0.58);
}

.quick-strip article {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.quick-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.quick-strip span {
  color: var(--muted);
  line-height: 1.38;
}

.games-section,
.support-section,
.closing-band,
.guide-grid,
.faq-section {
  padding: 22px;
  background: var(--surface);
}

.games-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 16px;
}

.game-card {
  padding: 18px;
  border-radius: 28px;
  background: var(--surface-strong);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: stretch;
}

.game-card-featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.75fr);
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.96), rgba(255, 241, 201, 0.92)),
    var(--surface-strong);
}

.game-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.game-card-copy p:last-of-type {
  margin-bottom: 0;
}

.game-tag {
  margin-bottom: 6px;
  color: var(--muted);
}

.age-tag {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 243, 206, 0.9);
  color: #8b6231;
  box-shadow: inset 0 0 0 2px rgba(255, 203, 110, 0.34);
}

.game-card h3 {
  max-width: 12ch;
}

.game-card p {
  line-height: 1.45;
}

.game-points {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink);
}

.game-points li + li {
  margin-top: 6px;
}

.game-preview {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 24px;
}

.preview-stars {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.96), transparent 14%),
    linear-gradient(180deg, #95ddff 0 56%, #d9f8be 56% 100%);
}

.preview-stars::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  background:
    radial-gradient(ellipse at 20% 100%, #9fd06f 0 20%, transparent 21%),
    radial-gradient(ellipse at 58% 100%, #b9e28d 0 22%, transparent 23%),
    linear-gradient(180deg, rgba(221, 248, 201, 0) 0%, rgba(183, 226, 127, 0.92) 58%, rgba(165, 213, 103, 0.98) 100%);
}

.preview-bubble {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 243, 0.9);
  box-shadow: 0 10px 16px rgba(82, 96, 110, 0.16);
}

.preview-bubble:nth-child(1) {
  top: 20%;
  left: 16%;
}

.preview-bubble:nth-child(2) {
  top: 38%;
  right: 16%;
}

.preview-bubble:nth-child(3) {
  bottom: 18%;
  left: 28%;
}

.preview-puzzle {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.95), rgba(240, 230, 210, 0.95)),
    repeating-linear-gradient(45deg, rgba(255, 183, 121, 0.12), rgba(255, 183, 121, 0.12) 12px, rgba(255, 255, 255, 0.12) 12px, rgba(255, 255, 255, 0.12) 24px);
}

.preview-constellation {
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.9), transparent 8%),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.72), transparent 6%),
    linear-gradient(180deg, #0b1a35 0%, #224a83 100%);
}

.constellation-mini-art {
  width: 100%;
  height: 100%;
  display: block;
}

.constellation-mini-stroke {
  stroke: rgba(194, 226, 255, 0.55);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(163, 213, 255, 0.26));
}

.constellation-mini-shape {
  fill: #ffd86d;
  stroke: rgba(255, 250, 230, 0.95);
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(255, 214, 107, 0.35));
}

.puzzle-mini {
  border-radius: 20px;
  background-image: url("assets/scene-castle.svg");
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.puzzle-mini:nth-child(2) {
  background-image: url("assets/scene-sea.svg");
}

.puzzle-mini:nth-child(3) {
  background-image: url("assets/scene-garden.svg");
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr);
  gap: 20px 26px;
  align-items: start;
}

.support-copy p:last-child {
  margin-bottom: 0;
  line-height: 1.5;
}

.support-list {
  display: grid;
  gap: 10px;
}

.support-list div {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
}

.support-list strong {
  display: block;
  margin-bottom: 4px;
}

.support-list span {
  color: var(--muted);
  line-height: 1.4;
}

.support-cta {
  grid-column: 1 / -1;
}

.closing-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 18px 28px;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.82), rgba(235, 247, 255, 0.82)),
    var(--surface-soft);
}

.closing-band p {
  margin-bottom: 0;
  line-height: 1.48;
}

.guide-grid {
  display: grid;
  gap: 22px;
}

.guide-intro {
  max-width: 40rem;
}

.guide-intro p:last-child {
  margin-bottom: 0;
  line-height: 1.5;
}

.guide-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-panel,
.faq-item {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
}

.guide-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.guide-panel p,
.faq-item p {
  margin-bottom: 0;
  line-height: 1.46;
}

.faq-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq-item h3 {
  font-size: 1.28rem;
  line-height: 1.12;
  max-width: 18ch;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 960px) {
  .hero,
  .guide-hero,
  .support-section,
  .closing-band,
  .games-grid,
  .guide-columns,
  .faq-list,
  .quick-strip {
    grid-template-columns: 1fr;
  }

  .guide-hero {
    display: grid;
    align-items: start;
  }

  .game-card,
  .game-card-featured {
    grid-template-columns: 1fr;
  }

  .hero-board {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .site-shell,
  .site-shell-guide {
    width: min(100% - 16px, 1180px);
    padding-top: 10px;
  }

  .hero,
  .games-section,
  .support-section,
  .closing-band,
  .guide-hero,
  .guide-grid,
  .faq-section {
    padding: 16px;
    border-radius: 24px;
  }

  .hero {
    min-height: auto;
  }

  .hero-actions,
  .guide-actions,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-link,
  .secondary-link,
  .ghost-link,
  .card-link {
    width: 100%;
  }

  .floating-card-large,
  .floating-card-small,
  .floating-card-wide {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .floating-card-large {
    top: 14%;
  }

  .floating-card-small {
    top: 40%;
  }

  .floating-card-wide {
    bottom: 12%;
  }

  .quick-strip article,
  .guide-panel,
  .faq-item,
  .support-list div,
  .game-card {
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }
}
