:root{
  --ink:#332257;
  --muted:#6d5c8f;
  --pink:#ff6b9d;
  --pink-dark:#ff4f91;
  --purple:#8b5cf6;
  --mint:#4ecdc4;
  --yellow:#ffd93d;
  --peach:#ffb86b;
  --sky:#71d7ff;
  --card:#ffffffde;
  --line:#ffe0ed;
  --shadow:0 18px 45px rgba(82,48,126,.16);
  --button-shadow:0 7px 0 rgba(51,34,87,.11);
}

*{box-sizing:border-box}
html{min-height:100%;background:#fff6fb}
body{
  min-height:100%;
  margin:0;
  overflow-x:hidden;
  font-family:Arial,"Tahoma",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 12% 8%,rgba(255,217,61,.34) 0 90px,transparent 92px),
    radial-gradient(circle at 88% 12%,rgba(78,205,196,.24) 0 120px,transparent 122px),
    radial-gradient(circle at 8% 82%,rgba(139,92,246,.16) 0 130px,transparent 132px),
    linear-gradient(180deg,#fff6fb 0%,#f2fffe 55%,#fff9ef 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.55;
  background-image:
    radial-gradient(circle,#ffd0e1 1.7px,transparent 2px),
    radial-gradient(circle,#c7f5ef 1.7px,transparent 2px);
  background-size:34px 34px,46px 46px;
  background-position:0 0,16px 20px;
}

a{color:inherit;text-decoration:none}
button{font:inherit;border:0;cursor:pointer}

.page-shell{
  width:min(100%,980px);
  margin:0 auto;
  padding:calc(14px + env(safe-area-inset-top)) 14px 28px;
}

.topbar{
  display:grid;
  grid-template-columns:minmax(96px,1fr) auto minmax(96px,1fr);
  align-items:center;
  gap:10px;
  margin-bottom:16px;
}

.brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  padding:8px 16px;
  border:2px solid #ffd0e1;
  border-radius:999px;
  background:linear-gradient(135deg,#fff,#fff0f6 52%,#f4f0ff);
  color:var(--pink-dark);
  font-size:15px;
  font-weight:1000;
  box-shadow:0 10px 24px rgba(123,61,187,.13);
  white-space:nowrap;
}

.brand-icon{font-size:20px;filter:drop-shadow(0 3px 0 rgba(255,107,157,.18))}

.topbar-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:10px 14px;
  border:2px solid var(--line);
  border-radius:999px;
  background:#fff8f0;
  color:var(--ink);
  font-size:14px;
  font-weight:1000;
  box-shadow:var(--button-shadow);
}

.topbar-btn:first-child{justify-self:start}
.topbar-btn:last-child{justify-self:end}
.topbar-btn:active,.primary-action:active,.game-card:active{transform:translateY(3px);box-shadow:0 3px 0 rgba(51,34,87,.1)}
.topbar-btn:focus-visible,.primary-action:focus-visible,.game-card:focus-visible{outline:4px solid rgba(113,215,255,.55);outline-offset:3px}

.games-gateway{display:grid;gap:18px}

.hero{
  position:relative;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  min-height:330px;
  overflow:hidden;
  border:3px solid #ffd0e1;
  border-radius:34px;
  padding:clamp(22px,4vw,42px);
  background:
    radial-gradient(circle at 74% 22%,rgba(255,217,61,.72),transparent 18%),
    radial-gradient(circle at 26% 18%,rgba(255,255,255,.9),transparent 24%),
    linear-gradient(135deg,#ffeff7 0%,#f6f0ff 47%,#e9fffb 100%);
  box-shadow:var(--shadow),inset 0 -10px 0 rgba(255,255,255,.42);
}

.hero::after{
  content:"";
  position:absolute;
  inset:auto -8% -72px -8%;
  height:155px;
  border-radius:50% 50% 0 0;
  background:linear-gradient(180deg,#b8f4cc,#72d889);
  box-shadow:inset 0 10px 0 rgba(255,255,255,.36);
}

.hero-copy{position:relative;z-index:1;align-self:center;max-width:530px}
.eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  margin:0 0 10px;
  padding:5px 13px;
  border:2px solid #ffd0e1;
  border-radius:999px;
  background:#fffafdee;
  color:#7b3dbb;
  font-size:13px;
  font-weight:1000;
}

h1,h2,p{margin-top:0}
h1{
  margin-bottom:10px;
  color:var(--pink-dark);
  font-size:clamp(38px,8vw,72px);
  line-height:1.02;
  letter-spacing:-.04em;
  text-shadow:0 5px 0 rgba(255,255,255,.8);
}

.hero-text{
  margin-bottom:24px;
  color:var(--muted);
  font-size:clamp(18px,3.4vw,25px);
  font-weight:900;
  line-height:1.65;
}

.primary-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:56px;
  padding:14px 24px;
  border:3px solid #ff8fba;
  border-radius:999px;
  background:linear-gradient(135deg,var(--pink),#ff8fba 45%,#a78bfa);
  color:white;
  font-size:18px;
  font-weight:1000;
  box-shadow:0 9px 0 rgba(168,71,128,.24),0 18px 30px rgba(255,107,157,.25);
}

.hero-art{position:relative;z-index:1;min-height:250px}
.hero-art span{position:absolute;display:grid;place-items:center}
.cloud{font-size:46px;opacity:.82;filter:drop-shadow(0 8px 8px rgba(113,215,255,.18))}
.cloud-one{top:8%;right:4%;animation:float 5s ease-in-out infinite}
.cloud-two{top:22%;left:12%;font-size:38px;animation:float 6s ease-in-out infinite reverse}
.hero-house{right:22%;bottom:2%;font-size:98px;filter:drop-shadow(0 14px 8px rgba(51,34,87,.15))}
.hero-bubble{
  width:72px;
  height:72px;
  border:3px solid rgba(255,255,255,.82);
  border-radius:24px;
  background:#ffffffba;
  box-shadow:0 14px 26px rgba(51,34,87,.14);
  font-size:36px;
}
.bubble-star{top:28%;right:28%;transform:rotate(-10deg)}
.bubble-heart{top:50%;left:4%;background:#fff0f6ba;transform:rotate(9deg)}
.bubble-game{right:0;bottom:28%;background:#f2fffdc9;transform:rotate(11deg)}

.games-section{
  border:2px solid #ffe7f0;
  border-radius:30px;
  padding:clamp(16px,3vw,26px);
  background:rgba(255,255,255,.58);
  box-shadow:0 16px 36px rgba(82,48,126,.09);
  backdrop-filter:blur(10px);
}

.section-heading{text-align:center;max-width:620px;margin:0 auto 18px}
.section-heading .eyebrow{margin-bottom:8px}
.section-heading h2{margin-bottom:8px;color:var(--ink);font-size:clamp(24px,4vw,34px);line-height:1.25}
.section-heading p{margin-bottom:0;color:var(--muted);font-weight:800;line-height:1.7}

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

.game-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:190px;
  overflow:hidden;
  padding:18px;
  border:2px solid rgba(255,224,237,.95);
  border-radius:28px;
  background:var(--card);
  box-shadow:0 9px 0 rgba(51,34,87,.06),0 16px 28px rgba(82,48,126,.1);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.game-card::before{
  content:"";
  position:absolute;
  inset:-60px auto auto -60px;
  width:145px;
  height:145px;
  border-radius:50%;
  background:var(--accent,#ffd0e1);
  opacity:.24;
}

.game-card:hover{transform:translateY(-4px);box-shadow:0 12px 0 rgba(51,34,87,.06),0 22px 34px rgba(82,48,126,.14);border-color:#ffbdd5}
.card-icon{position:relative;font-size:42px;margin-bottom:14px;filter:drop-shadow(0 5px 0 rgba(51,34,87,.07))}
.card-title{position:relative;margin-bottom:8px;color:var(--ink);font-size:21px;font-weight:1000}
.card-desc{position:relative;color:var(--muted);font-size:15px;font-weight:800;line-height:1.65}
.card-cta{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  margin-top:auto;
  padding:10px 14px;
  border-radius:999px;
  background:#fff8f0;
  color:#7b3dbb;
  font-size:14px;
  font-weight:1000;
  box-shadow:inset 0 0 0 2px #ffe0ed;
}

.card-learning{--accent:var(--yellow)}
.card-memory{--accent:var(--sky)}
.card-art{--accent:var(--pink)}
.card-builder{--accent:var(--mint)}
.card-pro{--accent:var(--purple)}
.featured-card{
  grid-column:1/-1;
  min-height:170px;
  background:
    radial-gradient(circle at 10% 10%,rgba(255,217,61,.28),transparent 24%),
    linear-gradient(135deg,#fff,#fff2f8 48%,#f2fffd);
}
.featured-card .card-cta{background:linear-gradient(135deg,var(--purple),var(--pink));color:white;box-shadow:none}

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

@media (max-width:720px){
  .page-shell{padding-inline:12px}
  .topbar{grid-template-columns:1fr 1fr;grid-template-areas:"brand brand" "home refresh";gap:9px}
  .brand{grid-area:brand;width:100%}
  .topbar-btn:first-child{grid-area:home;justify-self:stretch}
  .topbar-btn:last-child{grid-area:refresh;justify-self:stretch}
  .hero{grid-template-columns:1fr;min-height:auto;padding:24px 18px 20px;text-align:center;border-radius:30px}
  .hero-copy{margin:0 auto}.primary-action{width:100%}
  .hero-art{min-height:170px;margin-top:8px}
  .hero-house{right:50%;bottom:0;transform:translateX(50%);font-size:76px}
  .cloud-one{right:8%;top:0}.cloud-two{left:7%;top:20%}.bubble-star{right:24%;top:34%}.bubble-heart{left:4%;top:48%}.bubble-game{right:4%;bottom:18%}
  .games-grid{grid-template-columns:1fr;gap:12px}
  .game-card{min-height:176px;border-radius:24px}
  .featured-card{min-height:176px}
}

@media (max-width:390px){
  .brand{font-size:14px;padding-inline:10px}
  .topbar-btn{font-size:13px;padding-inline:10px}
  h1{font-size:36px}.hero-text{font-size:17px}.hero-bubble{width:58px;height:58px;border-radius:20px;font-size:30px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}
}
