/* Fun Space Limited — polished playful studio theme */
:root {
  --ink: #191736;
  --muted: #63618c;
  --faint: #8f8cb3;
  --bg: #ffffff;
  --bg-soft: #f7f6fe;
  --line: #eceaf7;
  --rasp: #ff4d6d;
  --orange: #ff9f1c;
  --blue: #4361ee;
  --mint: #06c995;
  --purple: #8338ec;
  --radius: 24px;
  --shadow-sm: 0 2px 10px rgba(25, 23, 54, 0.06);
  --shadow-md: 0 14px 40px rgba(25, 23, 54, 0.12);
  --shadow-lg: 0 24px 70px rgba(25, 23, 54, 0.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Fredoka", "Nunito", sans-serif; letter-spacing: -0.01em; }
img { display: block; max-width: 100%; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 21px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--rasp), var(--orange)); display: grid; place-items: center; font-size: 20px; box-shadow: 0 6px 16px rgba(255, 77, 109, 0.4); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; font-weight: 800; font-size: 15px; color: var(--muted); padding: 9px 16px; border-radius: 999px; transition: all 0.15s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--ink); background: var(--bg-soft); }
.nav-links a.btn { color: #fff; }
.nav-links a.btn-light { color: var(--ink); }
.burger { display: none; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 20px; padding: 6px 13px; cursor: pointer; color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 15px 30px; border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; border: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; font-family: "Nunito", sans-serif; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gradient { background: linear-gradient(135deg, var(--rasp), var(--orange)); color: #fff; box-shadow: 0 12px 28px rgba(255, 77, 109, 0.38); }
.btn-gradient:hover { box-shadow: 0 16px 34px rgba(255, 77, 109, 0.46); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 12px 26px rgba(25, 23, 54, 0.3); }
.btn-light { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 10px 22px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; background: var(--bg-soft); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.blob-a { width: 520px; height: 520px; background: #ffd3e0; top: -180px; left: -140px; }
.blob-b { width: 460px; height: 460px; background: #cfe0ff; top: -100px; right: -120px; }
.blob-c { width: 380px; height: 380px; background: #fff0c2; bottom: -200px; left: 38%; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 800; color: var(--muted); box-shadow: var(--shadow-sm); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(6, 201, 149, 0.18); }
.hero h1 { font-size: 64px; line-height: 1.04; font-weight: 700; margin: 22px 0 18px; }
.grad-text { background: linear-gradient(100deg, var(--rasp) 10%, var(--orange) 55%, var(--purple) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: 18.5px; line-height: 1.65; color: var(--muted); margin: 0 0 30px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-stats { display: flex; gap: 36px; }
.hstat strong { display: block; font-family: "Fredoka", sans-serif; font-size: 28px; font-weight: 700; }
.hstat span { font-size: 13.5px; font-weight: 700; color: var(--faint); }

/* floating game cards */
.hero-art { position: relative; height: 480px; }
.fcard { position: absolute; background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-md); display: flex; gap: 13px; align-items: center; border: 1px solid rgba(236, 234, 247, 0.9); animation: floaty 5s ease-in-out infinite; }
.fcard img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 4px 12px rgba(25, 23, 54, 0.18); }
.fcard b { display: block; font-size: 14.5px; }
.fcard span { font-size: 12.5px; font-weight: 800; color: var(--orange); }
.fcard .cat { font-size: 11px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.fc-1 { top: 6px; left: 24px; transform: rotate(-4deg); }
.fc-2 { top: 150px; right: 0; animation-delay: 1.2s; }
.fc-3 { top: 250px; left: 0; animation-delay: 2.1s; }
.fc-4 { bottom: 8px; right: 40px; animation-delay: 0.6s; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.hero-ring { position: absolute; border: 2px dashed #d7d3ef; border-radius: 50%; }
.ring-1 { width: 420px; height: 420px; top: 20px; left: 40px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rasp); margin: 0 0 10px; }
.sec-head h2 { font-size: 40px; margin: 0 0 12px; font-weight: 700; line-height: 1.15; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; line-height: 1.6; }
.sec-head.split { display: flex; justify-content: space-between; align-items: flex-end; max-width: none; gap: 20px; }
.link-arrow { font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }

/* ---------- game cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.gcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform 0.18s, box-shadow 0.18s; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.gcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--ac, linear-gradient(90deg, var(--rasp), var(--orange))); opacity: 0; transition: opacity 0.18s; }
.gcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.gcard:hover::before { opacity: 1; }
.gcard-top { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.gicon { width: 72px; height: 72px; border-radius: 19px; box-shadow: 0 8px 20px rgba(25, 23, 54, 0.2); flex-shrink: 0; }
.gcard h3 { margin: 0 0 5px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.stars { font-size: 13px; font-weight: 800; color: var(--orange); letter-spacing: 0.02em; }
.stars small { color: var(--faint); font-weight: 700; }
.gcard > p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 18px; flex: 1; }
.gfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip-cat { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; padding: 6px 13px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.btn-install { font-size: 13.5px; font-weight: 800; text-decoration: none; color: #fff; background: var(--ink); padding: 10px 20px; border-radius: 999px; transition: all 0.15s; white-space: nowrap; }
.btn-install:hover { background: var(--rasp); box-shadow: 0 8px 20px rgba(255, 77, 109, 0.4); }

/* ---------- feature band ---------- */
.band { background: var(--ink); color: #fff; border-radius: 32px; padding: 56px 60px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 77, 109, 0.35), transparent 65%); top: -200px; right: -140px; }
.band-item { position: relative; z-index: 1; }
.band-item .bi { font-size: 34px; }
.band-item h3 { margin: 12px 0 6px; font-size: 19px; }
.band-item p { margin: 0; color: #b9b7d9; font-size: 14px; line-height: 1.6; }

/* ---------- split / quotes ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 15px; }
.check-list li { display: flex; gap: 13px; align-items: flex-start; font-weight: 600; font-size: 16px; }
.check { width: 26px; height: 26px; border-radius: 50%; background: #e6faf3; color: var(--mint); display: grid; place-items: center; font-size: 14px; font-weight: 900; flex-shrink: 0; margin-top: 1px; }
.quote-stack { display: grid; gap: 18px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.quote .qstars { color: var(--orange); letter-spacing: 2px; font-size: 14px; }
.quote p { margin: 8px 0 6px; font-size: 15.5px; line-height: 1.6; }
.quote cite { font-style: normal; font-size: 13px; color: var(--faint); font-weight: 700; }

/* ---------- CTA ---------- */
.cta-panel { background: linear-gradient(120deg, #2b2663, #4a2b8f 55%, #93335f); border-radius: 32px; padding: 72px 40px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.cta-panel::before, .cta-panel::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.cta-panel::before { width: 340px; height: 340px; background: #ff4d6d; top: -140px; left: -100px; }
.cta-panel::after { width: 300px; height: 300px; background: #ff9f1c; bottom: -140px; right: -80px; }
.cta-panel h2 { position: relative; z-index: 1; font-size: 42px; margin: 0 0 12px; }
.cta-panel p { position: relative; z-index: 1; color: #d9d7f2; font-size: 17px; margin: 0 0 30px; }
.cta-panel .btn { position: relative; z-index: 1; }

/* ---------- games page ---------- */
.page-hero { padding: 72px 0 10px; text-align: center; background: var(--bg-soft); position: relative; overflow: hidden; }
.page-hero h1 { font-size: 52px; margin: 14px 0 12px; }
.page-hero .sub { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 620px; }
.toolbar { max-width: 760px; margin: 32px auto 0; display: grid; gap: 16px; position: relative; z-index: 1; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 22px; box-shadow: var(--shadow-sm); }
.search span { color: var(--faint); }
.search input { flex: 1; border: none; outline: none; font-size: 16px; font-family: inherit; background: transparent; padding: 10px 0; color: var(--ink); }
.pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pill-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 20px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; color: var(--muted); transition: all 0.15s; }
.pill-btn:hover { border-color: var(--ink); color: var(--ink); }
.pill-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.count-line { text-align: center; color: var(--faint); font-weight: 700; font-size: 14px; margin: 26px 0 0; }
.empty { text-align: center; padding: 60px 0; }
.empty p { font-size: 20px; font-weight: 800; }
.hidden { display: none !important; }

/* ---------- about / contact ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); }
.value .vi { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; margin-bottom: 16px; }
.value h3 { margin: 0 0 8px; font-size: 20px; }
.value p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 15px; }
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; background: var(--ink); border-radius: 28px; padding: 48px; color: #fff; text-align: center; }
.stats-band strong { display: block; font-family: "Fredoka", sans-serif; font-size: 46px; font-weight: 700; background: linear-gradient(90deg, #ffb3c6, #ffd6a3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-band span { color: #b9b7d9; font-weight: 700; font-size: 14.5px; }
.mail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mail-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow-sm); transition: transform 0.18s, box-shadow 0.18s; }
.mail-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.mail-card .mi { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; font-size: 26px; margin-bottom: 18px; }
.mail-card h3 { margin: 0 0 6px; font-size: 20px; }
.mail-card p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.mail-card b { color: var(--rasp); font-size: 15.5px; }
.fine { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: 28px; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 44px 48px; line-height: 1.75; box-shadow: var(--shadow-sm); }
.prose h3 { margin: 30px 0 8px; }
.prose p { color: var(--muted); margin: 0 0 14px; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: #b9b7d9; padding: 64px 0 28px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.foot-brand { display: flex; align-items: center; gap: 11px; font-family: "Fredoka", sans-serif; font-size: 21px; color: #fff; font-weight: 700; margin-bottom: 12px; }
.foot-grid p { font-size: 14.5px; line-height: 1.7; margin: 0; max-width: 340px; }
.foot-grid h4 { color: #fff; font-size: 14px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.1em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.foot-grid ul a { text-decoration: none; font-size: 14.5px; font-weight: 600; }
.foot-grid ul a:hover { color: #fff; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.foot-base a { color: #8ec5ff; text-decoration: none; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { height: 400px; max-width: 520px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .band { grid-template-columns: repeat(2, 1fr); padding: 44px 36px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: 78px; right: 16px; left: 16px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 12px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 18px; }
  .burger { display: block; }
  .nav-inner { position: relative; }
  .hero { padding: 56px 0 70px; }
  .hero h1 { font-size: 42px; }
  .hero .sub { font-size: 16.5px; }
  .hero-art { height: 340px; }
  .fc-2 { right: 0; } .fc-3 { left: 0; } .fc-4 { right: 8px; }
  .grid-3, .grid-4, .values, .mail-grid { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 36px 28px; }
  .stats-band { grid-template-columns: 1fr; gap: 30px; padding: 40px 28px; }
  .sec-head h2 { font-size: 30px; }
  .sec-head.split { flex-direction: column; align-items: flex-start; }
  .cta-panel { padding: 52px 26px; }
  .cta-panel h2 { font-size: 30px; }
  .prose { padding: 28px 24px; }
  .foot-grid { grid-template-columns: 1fr; }
}
