/* Candy Cuddle Kids — site design system */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --berry: #e0245e;
  --berry-dark: #b5163f;
  --berry-soft: #ffe1ea;
  --ink: #3c1e23;
  --ink-soft: #6d4b52;
  --cream: #fff8f2;
  --paper: #ffffff;
  --pink: #ffd9e6;
  --mint: #d2f4e4;
  --mint-dark: #1f8a5b;
  --lemon: #fff0b8;
  --sky: #dfe6ff;
  --grape: #e9dcff;
  --peach: #ffe2cc;
  --night: #1e2452;
  --night-2: #2f3a7a;
  --gold: #ffc94d;
  --gold-dark: #d99a00;
  --line: #f1dfe3;
  --shadow: 0 10px 30px rgba(60, 30, 35, .12);
  --shadow-sm: 0 4px 14px rgba(60, 30, 35, .10);
  --radius: 26px;
  --radius-sm: 16px;
  --head: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(circle at 12% 8%, #ffe6ef 0, transparent 38%), radial-gradient(circle at 92% 30%, #e6f7ef 0, transparent 34%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--berry-dark); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: .2px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46em; }
.center .lede, .lede.center { margin-left: auto; margin-right: auto; }
.eyebrow { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; color: var(--berry); margin-bottom: .6em; display: inline-block; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 12px 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 242, .92); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo img { width: 48px; height: 48px; }
.logo span { font-family: var(--head); font-weight: 700; font-size: 1.45rem; line-height: 1; color: var(--berry); }
.logo span small { display: block; font-size: .72rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { font-family: var(--head); font-weight: 600; font-size: 1.02rem; color: var(--ink); text-decoration: none; padding: 9px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--berry-soft); color: var(--berry-dark); }
.nav a[aria-current="page"] { background: var(--berry); color: #fff; }
.nav a.nav-play { background: var(--gold); color: var(--ink); }
.nav a.nav-play:hover { background: #ffd877; }
.nav a.nav-play[aria-current="page"] { background: var(--berry); color: #fff; }
.menu-btn { display: none; margin-left: auto; border: 0; background: var(--berry-soft); color: var(--berry-dark); border-radius: 14px; width: 48px; height: 48px; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; flex-direction: column; align-items: stretch; background: var(--cream); padding: 12px 16px 20px; border-bottom: 2px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; font-size: 1.15rem; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--head); font-weight: 600; font-size: 1.1rem; padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .2s; line-height: 1.1; min-height: 52px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--berry); color: #fff; box-shadow: 0 6px 0 var(--berry-dark); }
.btn-primary:hover { box-shadow: 0 8px 0 var(--berry-dark); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 0 var(--gold-dark); }
.btn-mint { background: var(--mint-dark); color: #fff; box-shadow: 0 6px 0 #146343; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 3px var(--berry); }
.btn-sm { font-size: .95rem; padding: 9px 16px; min-height: 42px; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- sections + cards ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.band-pink { background: var(--pink); }
.band-mint { background: var(--mint); }
.band-lemon { background: var(--lemon); }
.band-sky { background: var(--sky); }
.band-night { background: linear-gradient(180deg, var(--night), var(--night-2)); color: #fff; }
.band-night .lede { color: #dfe3ff; }
.band-night .eyebrow { color: var(--gold); }
.wave-top { position: relative; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 56px 0; } }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.pill { display: inline-block; font-family: var(--head); font-weight: 600; font-size: .85rem; padding: 5px 12px; border-radius: 999px; background: var(--berry-soft); color: var(--berry-dark); }
.pill-gold { background: var(--lemon); color: #8a5a00; }
.pill-mint { background: var(--mint); color: var(--mint-dark); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--night); }
.hero-bg { position: absolute; inset: 0 0 0 36%; background-size: cover; background-position: 50% 28%; }
.hero::before { content: ""; position: absolute; inset: 0; background: #1e2452; }
@media (max-width: 700px) { .hero-bg { inset: 0; background-position: 50% 20%; } }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #1e2452 0%, rgba(30, 36, 82, .7) 22%, rgba(30, 36, 82, 0) 55%); }
.hero .wrap { position: relative; padding-top: 96px; padding-bottom: 110px; }
.hero h1 { color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .18); max-width: 12em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { color: #fff3f7; max-width: 30em; }
@media (max-width: 700px) { .hero-bg::after { background: linear-gradient(180deg, rgba(25, 20, 70, .65), rgba(25, 20, 70, .9)); } .hero .wrap { padding-top: 64px; padding-bottom: 80px; } }

/* ---------- character tiles ---------- */
.kid-tile { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 18px 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.kid-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 58%; background: var(--tile, var(--pink)); border-radius: 0 0 50% 50% / 0 0 26% 26%; }
.kid-tile:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow); }
.kid-tile img { position: relative; height: 190px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(60, 30, 35, .18)); transition: transform .3s; }
.kid-tile:hover img { transform: scale(1.06) rotate(2deg); }
.kid-tile h3 { margin: 16px 0 2px; font-size: 1.5rem; }
.kid-tile p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.kid-tile .catch { margin-top: 10px; font-family: var(--head); color: var(--berry); font-weight: 600; font-size: .98rem; }

/* ---------- game tiles ---------- */
.game-tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.game-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.game-tile .thumb { aspect-ratio: 4 / 3; background: var(--tile, var(--sky)); display: grid; place-items: center; position: relative; overflow: hidden; }
.game-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-tile .thumb img.cutout { width: auto; height: 78%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(60, 30, 35, .2)); }
.game-tile .body { padding: 18px 20px 22px; }
.game-tile h3 { margin: 0 0 4px; }
.game-tile p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
.game-tile .tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- game page shell ---------- */
.game-page { padding-top: 34px; padding-bottom: 70px; }
.game-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.game-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 0; }
.game-head p { margin: 6px 0 0; color: var(--ink-soft); }
.back-link { display: inline-flex; gap: 6px; align-items: center; font-family: var(--head); font-weight: 600; text-decoration: none; color: var(--berry-dark); margin-bottom: 10px; }
.game-root { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-height: 420px; position: relative; }
@media (max-width: 620px) { .game-root { padding: 12px; border-radius: 20px; } }
.game-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.game-bar .group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat { font-family: var(--head); font-weight: 600; background: var(--cream); border-radius: 999px; padding: 8px 16px; font-size: 1.05rem; box-shadow: inset 0 0 0 2px var(--line); white-space: nowrap; }
.stat b { color: var(--berry); }
.seg { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 2px var(--line); }
.seg button { border: 0; background: transparent; font-family: var(--head); font-weight: 600; font-size: .98rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; color: var(--ink); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--berry); color: #fff; }
.icon-btn { border: 0; width: 46px; height: 46px; border-radius: 14px; background: var(--cream); box-shadow: inset 0 0 0 2px var(--line); font-size: 1.3rem; cursor: pointer; display: inline-grid; place-items: center; color: var(--ink); }
.icon-btn:hover { box-shadow: inset 0 0 0 2px var(--berry); }
.how-to { margin-top: 28px; }
.how-to h2 { font-size: 1.5rem; }
.more-games { margin-top: 48px; }

/* ---------- overlay / celebration ---------- */
.cck-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(30, 20, 60, .55); padding: 16px; animation: cckFade .25s ease; }
.cck-modal { background: #fff; border-radius: 30px; padding: 34px 30px 28px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); animation: cckPop .4s cubic-bezier(.2, 1.4, .4, 1); }
.cck-modal img { height: 150px; width: auto; margin: -90px auto 8px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); }
.cck-modal h2 { font-size: 2rem; color: var(--berry); margin-bottom: .2em; }
.cck-modal p { color: var(--ink-soft); }
.cck-modal .btn-row { justify-content: center; margin-top: 18px; }
.cck-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }
@keyframes cckFade { from { opacity: 0; } }
@keyframes cckPop { from { transform: scale(.6); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; font-family: var(--head); font-weight: 600; padding: 12px 22px; border-radius: 999px; z-index: 250; box-shadow: var(--shadow); animation: cckFade .2s; }

/* ---------- footer ---------- */
.site-foot { background: var(--night); color: #dfe3ff; padding: 60px 0 30px; margin-top: 0; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { color: var(--gold); font-size: 1.05rem; margin-bottom: .8em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 0 0 8px; }
.foot-note { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 40px; padding-top: 22px; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.foot-promise { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .07); padding: 14px 16px; border-radius: 16px; font-size: .95rem; margin-top: 14px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.float { animation: cckFloat 4s ease-in-out infinite; }
@keyframes cckFloat { 50% { transform: translateY(-10px); } }
.sparkle-text { background: linear-gradient(90deg, var(--berry), #ff7a59, var(--gold), #3fbf7f, #5a7dff, #a45cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 34px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: "★"; position: absolute; left: 0; top: -1px; color: var(--gold-dark); font-size: 1.2rem; }
.quote { font-family: var(--head); font-size: 1.5rem; line-height: 1.35; }
.mood-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mood { text-align: center; width: 112px; text-decoration: none; color: var(--ink); border-radius: 20px; padding: 8px 4px 10px; transition: background .2s; }
.mood:hover { background: rgba(255, 255, 255, .7); }
.mood:hover b { color: var(--berry); }
.mood img { height: 120px; width: auto; margin: 0 auto; transition: transform .25s; }
.mood:hover img { transform: translateY(-6px) rotate(-4deg); }
.mood b { display: block; font-family: var(--head); }
.mood span { font-size: .9rem; color: var(--ink-soft); }
.breadcrumbs { font-size: .95rem; margin-bottom: 14px; }
.breadcrumbs a { text-decoration: none; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-head, .site-foot, .no-print { display: none !important; } body { background: #fff; } }
