/* Learning games: a light, friendly look for children and parents alike.
   Separate from the dark studio site; shares only markup patterns. */

@font-face {
  font-family: "Viga";
  src: url("/assets/fonts/Viga-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #fff8ec;
  --paper: #ffffff;
  --ink: #22313f;
  --muted: #5a6776;
  --line: #efe3cc;
  --sun: #ffc83d;
  --sun-deep: #e9a400;
  --coral: #ff7a59;
  --sky: #3fa2e0;
  --leaf: #3fae6a;
  --berry: #8f63d2;
  --soft: #fff0d0;
  --radius: 22px;
  --shadow: 0 10px 30px rgb(120 90 30 / 12%);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgb(255 200 61 / 28%), transparent 32rem),
    radial-gradient(circle at 100% 18%, rgb(63 162 224 / 16%), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1,
h2,
h3,
.button,
.eyebrow {
  font-family: "Viga", system-ui, sans-serif;
  font-weight: 400;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Header */

.lp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

.lp-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: auto;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}

.lp-brand svg {
  width: 30px;
  fill: var(--sun);
  stroke: var(--sun-deep);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.lp-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.lp-header nav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.lp-header nav a:hover,
.lp-header nav a[aria-current] {
  color: var(--ink);
}

.lp-header nav.languages {
  gap: 4px;
}

.lp-header nav.languages a {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .06em;
}

.lp-header nav.languages a[aria-current] {
  background: var(--sun);
  color: var(--ink);
}

/* Layout */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.lp-hero {
  padding: clamp(36px, 7vw, 80px) 0 28px;
}

.lp-hero h1 {
  max-width: 17ch;
  font-size: clamp(38px, 6.4vw, 66px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sun-deep);
  font-size: 15px;
  letter-spacing: .06em;
}

.lead {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 21px);
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}

.app-icon {
  width: clamp(150px, 24vw, 260px);
  height: auto;
  border-radius: 28%;
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}

.lp-section {
  margin-top: clamp(36px, 6vw, 64px);
}

.lp-section > h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-lead {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
}

/* Buttons */

.actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 3px solid var(--sun-deep);
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 19px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--sun-deep);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--sun-deep);
}

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

.button.ghost {
  border-color: var(--line);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--line);
}

.card-actions .button {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
}

.button[hidden],
.hint[hidden] {
  display: none;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Facts */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--line);
  font-size: 15px;
}

.facts li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--leaf);
}

/* Cards and lists */

.game-cards,
.principles,
.steps {
  display: grid;
  gap: 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.game-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.game-card,
.principles li,
.steps li,
.reward,
.parents,
.cta {
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.game-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
}

.game-card img {
  flex: none;
  border-radius: 24%;
}

.game-card h3 {
  font-size: 26px;
}

.game-card h3 a {
  text-decoration: none;
}

.game-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.principles {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.principles li {
  padding: 22px;
}

.principles svg {
  width: 56px;
  height: 56px;
}

.principles h3 {
  margin-top: 10px;
  font-size: 20px;
}

.principles p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.steps li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px 26px;
}

.steps h3 {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 23px;
}

.steps p {
  margin: 8px 0 0;
  color: var(--muted);
}

.step-number {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sun);
  font-size: 18px;
}

.step-art {
  display: grid;
  place-items: center;
  min-height: 110px;
  border-radius: 16px;
  background: var(--soft);
}

.step-art svg {
  width: 170px;
  max-height: 110px;
}

.reward {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  background: linear-gradient(135deg, #fff3d6, #ffe4dc);
}

.reward h2 {
  font-size: clamp(26px, 3.4vw, 34px);
}

.reward p {
  margin: 12px 0 0;
}

.reward-art svg {
  width: 100%;
}

.parents {
  padding: 30px;
  background: #eef7ff;
}

.parents ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.parents li {
  position: relative;
  padding-left: 30px;
}

.parents li::before {
  content: "";
  position: absolute;
  top: .45em;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--sky);
}

.cta {
  padding: 34px 30px;
  text-align: center;
}

.cta .actions {
  justify-content: center;
}

/* Illustrations */

svg text {
  font-family: "Viga", system-ui, sans-serif;
  font-size: 15px;
  text-anchor: middle;
  fill: var(--ink);
}

svg .big {
  font-size: 28px;
}

svg .mid {
  fill: var(--leaf);
}

.box {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 2;
}

.box.sun {
  fill: var(--sun);
  stroke: var(--sun-deep);
}

.box.soft {
  opacity: .7;
}

.box.focus {
  fill: #fff;
  stroke: var(--sky);
  stroke-width: 3.5;
}

.box.empty {
  fill: none;
  stroke-dasharray: 4 4;
}

.dot {
  fill: var(--coral);
}

.badge {
  fill: var(--sun);
}

.badge-text {
  font-size: 24px;
}

.arrow,
.loop {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 4;
  stroke-linecap: round;
}

.loop-head {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hit {
  fill: var(--leaf);
}

.miss {
  fill: var(--coral);
  opacity: .5;
}

.face {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3;
}

.tick {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.pin {
  fill: var(--ink);
}

.hand-hour,
.hand-minute,
.hand-ghost {
  stroke-width: 7;
  stroke-linecap: round;
}

.hand-hour {
  stroke: var(--coral);
}

.hand-minute {
  stroke: var(--sky);
  stroke-width: 5;
}

.hand-ghost {
  stroke: var(--leaf);
  stroke-width: 5;
  opacity: .35;
}

.cell {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 2;
}

.cell.open {
  fill: var(--soft);
  stroke: var(--sun);
}

.cell.done {
  fill: var(--leaf);
  stroke: var(--leaf);
}

.card {
  fill: #fff;
  stroke: var(--line);
  stroke-width: 2;
}

.shadow {
  fill: var(--ink);
  opacity: .28;
  filter: blur(3px);
}

.outline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-dasharray: 5 4;
}

.egg {
  fill: #fff4d8;
  stroke: var(--sun-deep);
  stroke-width: 2.5;
}

.crack {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.p-sun {
  fill: var(--sun);
}

.p-sky {
  fill: var(--sky);
}

.p-needle {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.p-leaf {
  fill: var(--leaf);
}

.p-berry {
  fill: var(--berry);
}

.p-coral {
  fill: var(--coral);
}

.p-empty {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-dasharray: 4 3;
}

/* Footer (shared partial) */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 40px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

@media (max-width: 720px) {
  .game-hero {
    grid-template-columns: 1fr;
  }

  .app-icon {
    order: -1;
    width: 120px;
  }

  .steps li,
  .reward {
    grid-template-columns: 1fr;
  }

  .step-art {
    min-height: 96px;
  }

  .game-card {
    flex-direction: column;
  }

  .game-card img {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
