@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --c-sky: #5AB6E8;
  --c-sky-light: #7FD0FF;
  --c-sky-dark: #3E97CC;
  --c-green: #7DC242;
  --c-green-dark: #67A832;
  --c-gold: #FFC93C;
  --c-coral: #E86C56;
  --c-purple: #9B6FD4;

  --bg: #EAF6FF;
  --bg-alt: #FFFFFF;
  --bg-soft: #F4FBFF;
  --card: #FFFFFF;

  --text: #33475B;
  --text-soft: #5E7286;
  --heading: #2A4256;
  --border: #DCEBF6;

  --grad-cta: linear-gradient(135deg, #8FD24E 0%, #67A832 100%);
  --grad-sky: linear-gradient(135deg, #7FD0FF 0%, #5AB6E8 100%);
  --grad-gold: linear-gradient(135deg, #FFD873 0%, #FFB627 100%);

  --shadow-sm: 0 4px 14px rgba(58, 130, 190, 0.12);
  --shadow-md: 0 10px 30px rgba(58, 130, 190, 0.16);
  --shadow-cta: 0 8px 20px rgba(103, 168, 50, 0.35);

  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 76px;

  --font-head: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html.hide #preloader { display: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

body.fixed { overflow: hidden; }

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  font-weight: 700;
}

section { position: relative; }

.section-pad { padding: 96px 0; }

.section-title {
  font-size: 40px;
  text-align: center;
  margin-bottom: 16px;
}

.section-title span { color: var(--c-sky); }

.section-lead {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
  color: var(--text-soft);
  font-size: 18px;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  padding: 15px 30px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  color: #fff;
}

.btn-primary {
  background: var(--grad-cta);
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(103,168,50,.45); }

.btn-sky {
  background: var(--grad-sky);
  box-shadow: 0 8px 20px rgba(58,130,190,.32);
}

.btn-sky:hover { transform: translateY(-3px); }

.btn-ghost {
  background: #fff;
  color: var(--c-sky-dark);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover { transform: translateY(-3px); }

.btn .gp-icon { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1200;
  display: flex;
  align-items: center;
  transition: background .25s ease, box-shadow .25s ease, height .25s ease;
}

.site-header.scrolled,
body.legal .site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(58,130,190,.12);
}
.site-header.scrolled .logo-text,
body.legal .logo-text {  color: var(--c-sky-dark); }
.site-header .nav-link { color: #fff; }
.site-header.scrolled .nav-link,
body.legal .nav-link {  color: var(--c-sky-dark); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo img { height: 46px; width: auto; border-radius: 11px; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
  letter-spacing: .3px;
  color: #fff;
  white-space: nowrap;
}
/* .logo-text .accent { color: var(--c-green); } */

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  color: var(--heading);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 3px;
  border-radius: 3px;
  background: var(--c-green);
  transition: width .25s ease;
}

/* .nav-link:hover { color: var(--c-sky); } */
.nav-link:hover::after { width: 100%; }

.header-cta { display: inline-flex; }

.burger-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  z-index: 1200;
}

.burger-btn span {
  position: absolute;
  left: 9px;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--c-sky-dark);
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}

.burger-btn span:nth-child(1) { top: 14px; }
.burger-btn span:nth-child(2) { top: 21px; }
.burger-btn span:nth-child(3) { top: 28px; }

.burger-btn.act span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Mobile menu ---------- */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(234,246,255,.98);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

#mobile-menu.opened { opacity: 1; pointer-events: auto; }

#mobile-menu .nav-link { font-size: 26px; }

#mobile-menu .btn { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: var(--grad-sky);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  filter: brightness(0.8);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.hero-content { max-width: 620px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.85);
  color: var(--c-sky-dark);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: 66px;
  line-height: 1.02;
  margin-bottom: 22px;
  color: #fff;
  text-shadow: 0 4px 0 rgba(62,151,204,.35);
}

.hero h1 .accent { color: var(--c-gold); }

.hero-text {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(50,90,120,.25);
}

.hero-text.q {
  font-size: 17px;
  opacity: .95;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }

@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-actions .btn-primary {
  animation: levitate 3s ease-in-out infinite;
}
.hero-actions .btn-primary:hover { animation-play-state: paused; }

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

.hero-pill b { color: var(--c-green-dark); }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-visual img {
  max-height: 560px;
  width: auto;
  filter: drop-shadow(0 20px 30px rgba(50,90,120,.3));
  animation: float-char 5s ease-in-out infinite;
}

@keyframes float-char {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}

/* ---------- About ---------- */
.about { background: var(--bg); }

.split {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 60px;
  align-items: center;
}

.split-reverse {
  grid-template-columns: 2.5fr 1fr;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.split-body h2 { font-size: 38px; margin-bottom: 22px; text-align: left; }
.split-body p { margin-bottom: 18px; color: var(--text-soft); font-size: 17px; }
.split-body p:last-child { margin-bottom: 0; }

/* ---------- How to Play ---------- */
.how { background: var(--bg-alt); }

.how-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.how-steps { display: flex; flex-direction: column; gap: 22px; }

.how-step {
  display: flex;
  gap: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.how-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.how-step .num {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--grad-sky);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 6px 14px rgba(58,130,190,.3);
}

.how-step:nth-child(2) .num { background: var(--grad-cta); box-shadow: 0 6px 14px rgba(103,168,50,.3); }
.how-step:nth-child(3) .num { background: var(--grad-gold); box-shadow: 0 6px 14px rgba(255,182,39,.3); }

.how-step h3 { font-size: 20px; margin-bottom: 6px; }
.how-step p { color: var(--text-soft); font-size: 16px; }

.how-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Features ---------- */
.features { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (min-width: 1025px) {
  .feature-card:nth-child(4) { grid-row-start: 2; }
  .feature-card:nth-child(5) {
    grid-column: span 2 / span 2;
    grid-row-start: 2;
  }
}

.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.feature-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
  background: var(--grad-sky);
  box-shadow: 0 8px 16px rgba(58,130,190,.22);
}

.feature-card:nth-child(2) .feature-icon { background: var(--grad-cta); box-shadow: 0 8px 16px rgba(103,168,50,.22); }
.feature-card:nth-child(3) .feature-icon { background: var(--grad-gold); box-shadow: 0 8px 16px rgba(255,182,39,.22); }
.feature-card:nth-child(4) .feature-icon { background: linear-gradient(135deg,#B98BE6,#9B6FD4); box-shadow: 0 8px 16px rgba(155,111,212,.22); }
.feature-card:nth-child(5) .feature-icon { background: linear-gradient(135deg,#FF9270,#E86C56); box-shadow: 0 8px 16px rgba(232,108,86,.22); }
.feature-card:nth-child(6) .feature-icon { background: var(--grad-sky); box-shadow: 0 8px 16px rgba(58,130,190,.22); }

.feature-card h3 { font-size: 21px; margin-bottom: 10px; }
.feature-card p { color: var(--text-soft); font-size: 16px; }

/* ---------- Puzzle Goals ---------- */
.goals { background: var(--bg-alt); }

.goals .split-body h2 { color: var(--heading); }

/* ---------- Final CTA banner ---------- */
.cta-banner {
  background: var(--grad-sky);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 { color: #fff; font-size: 40px; margin-bottom: 14px; text-shadow: 0 3px 0 rgba(62,151,204,.3); }
.cta-banner p { color: #fff; font-size: 18px; margin-bottom: 30px; opacity: .95; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  color: #fff;
  background: var(--c-sky-dark);
  background-size: cover;
  background-position: center;
  padding: 70px 0 26px;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(62,151,204,.72), rgba(46,120,165,.85));
  z-index: 0;
}

.footer-inner { position: relative; z-index: 1; }

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.25);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo img { height: 52px; width: auto; border-radius: 12px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.15)); }
.footer-logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: .3px;
  color: #fff;
  white-space: nowrap;
}
/* .footer-logo-text .accent { color: #B6E77A; } */
.footer-brand p { color: rgba(255,255,255,.9); max-width: 420px; font-size: 16px; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a { color: rgba(255,255,255,.92); font-weight: 600; transition: color .2s ease; }
.footer-nav a:hover { color: var(--c-gold); }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,.85);
  font-size: 14px;
}

.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: var(--c-gold); }

/* ---------- Legal pages ---------- */
.legal-page {
  padding: calc(var(--header-h) + 60px) 0 90px;
  background: var(--bg);
  min-height: 70vh;
}

.legal-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 52px;
}

.legal-content h1 { font-size: 40px; margin-bottom: 8px; }
.legal-content .updated { color: var(--text-soft); margin-bottom: 30px; font-size: 15px; }
.legal-content h2 { font-size: 24px; margin: 32px 0 12px; text-align: left; }
.legal-content p { margin-bottom: 14px; color: var(--text-soft); }
.legal-content ul { margin: 0 0 16px 22px; color: var(--text-soft); }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--c-sky-dark); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 52px; }
  .section-title { font-size: 34px; }
  .split-body h2, .cta-banner h2 { font-size: 32px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-visual img { max-height: 460px; }
}

@media (max-width: 768px) {
  .nav-list, .header-cta { display: none; }
  .burger-btn { display: block; }
  .section-pad { padding: 68px 0; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-content { margin: 0 auto; }
  .hero-actions, .hero-pills { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-visual img { max-height: 360px; }
  .hero h1 { font-size: 46px; }

  .split { grid-template-columns: 1fr; gap: 36px; }
  .split-body h2 { text-align: center; }
  .split .split-media { order: -1; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero h1 { font-size: 38px; }
  .section-title { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .legal-content { padding: 32px 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .btn { font-size: 16px; padding: 14px 26px; }
}
