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

:root {
  --bg: #f4f7f7;
  --bg-2: #ffffff;
  --bg-3: #e9f2f1;
  --ink: #0f3b3a;
  --text: #40514f;
  --muted: #71857f;
  --line: #dbe7e5;

  --teal: #14b8a6;
  --violet: #6d5cff;
  --coral: #ff6a5f;
  --amber: #ffb020;

  --grad: linear-gradient(135deg, #14b8a6 0%, #6d5cff 100%);
  --grad-warm: linear-gradient(135deg, #ffb020 0%, #ff6a5f 100%);

  --font-head: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --radius: 18px;
  --shadow: 0 18px 40px -20px rgba(15, 59, 58, 0.35);
  --header-h: 76px;
  --wrap: 1180px;
}

* { 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: clip;
}

body.fixed { overflow: hidden; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; position: relative; }

.section-head { max-width: 720px; margin-bottom: 54px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--bg-3);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-title { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }

.section-text { font-size: 17px; color: var(--text); }
.section-text p + p { margin-top: 16px; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 14px 30px -12px rgba(109, 92, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -12px rgba(109, 92, 255, 0.7); }
.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--line);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.btn-float { animation: floaty 3s ease-in-out infinite; }
.btn-float:hover { animation-play-state: paused; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1100;
  display: flex;
  align-items: center;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -18px rgba(15, 59, 58, 0.5);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav-list { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--grad);
  transition: width .25s ease;
}
.nav-link:hover { color: var(--teal); }
.nav-link:hover::after { width: 100%; }

.burger-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  position: relative;
  cursor: pointer;
  z-index: 1100;
}
.burger-btn span {
  position: absolute;
  left: 8px;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.burger-btn span:nth-child(1) { top: 13px; }
.burger-btn span:nth-child(2) { top: 19px; }
.burger-btn span:nth-child(3) { top: 25px; }
.burger-btn.act span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Mobile menu */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#mobile-menu.opened { opacity: 1; pointer-events: auto; }
#mobile-menu.opened .nav-list{ display: flex; }
#mobile-menu .nav-list {
  flex-direction: column;
  gap: 26px;
  text-align: center;
}
#mobile-menu .nav-link { font-size: 24px; }

/* Hero */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 90px;
  background: linear-gradient(180deg, rgba(233,242,241,0.86), rgba(244,247,247,1)),
              url('../img/hero-bg.webp') center / cover no-repeat;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--violet);
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 22px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 20px; color: var(--text); max-width: 540px; }
.hero-sub p + p { margin-top: 12px; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  transform: rotate(1.5deg);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 9 / 10; }
.hero-tiles {
  position: absolute;
  right: -14px; bottom: -14px;
  display: grid;
  grid-template-columns: repeat(3, 26px);
  gap: 8px;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
}
.hero-tiles i { width: 26px; height: 26px; border-radius: 7px; display: block; }
.hero-tiles i:nth-child(1), .hero-tiles i:nth-child(5), .hero-tiles i:nth-child(9) { background: var(--teal); }
.hero-tiles i:nth-child(2), .hero-tiles i:nth-child(6) { background: var(--amber); }
.hero-tiles i:nth-child(3), .hero-tiles i:nth-child(7) { background: var(--coral); }
.hero-tiles i:nth-child(4), .hero-tiles i:nth-child(8) { background: var(--violet); }

/* About */
.about { background: var(--bg-2); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.rev .split-media { order: 2; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 5px solid #fff;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 5 / 4; }

/* How to Play — steps */
.how { background: var(--bg-3); }
.how-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.steps { display: flex; flex-direction: column; gap: 18px; }
.step {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: 0 12px 28px -22px rgba(15, 59, 58, 0.5);
}
.step-num {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background: var(--grad);
}
.step:nth-child(2) .step-num { background: var(--grad-warm); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, #6d5cff, #ff6a5f); }
.step p { color: var(--text); }

/* Features */
.features { background: var(--bg-2); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.feature-ico {
  width: 54px; height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: var(--bg-3);
}
.feature-ico svg { width: 28px; height: 28px; }
.feature:nth-child(6n+1) .feature-ico { background: rgba(20,184,166,0.14); color: var(--teal); }
.feature:nth-child(6n+2) .feature-ico { background: rgba(255,176,32,0.16); color: #d98b00; }
.feature:nth-child(6n+3) .feature-ico { background: rgba(255,106,95,0.15); color: var(--coral); }
.feature:nth-child(6n+4) .feature-ico { background: rgba(109,92,255,0.15); color: var(--violet); }
.feature:nth-child(6n+5) .feature-ico { background: rgba(20,184,166,0.14); color: var(--teal); }
.feature:nth-child(6n+6) .feature-ico { background: rgba(255,176,32,0.16); color: #d98b00; }
.feature h3 { font-size: 21px; margin-bottom: 10px; }
.feature p { font-size: 15.5px; color: var(--text); }

/* Contact */
.contact { background: var(--bg-3); }
.contact-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 56px 40px;
  box-shadow: var(--shadow);
}
.contact-card .section-title { margin-bottom: 18px; }
.contact-card p { font-size: 17px; color: var(--text); }
.contact-mail {
  display: inline-block;
  margin: 26px 0 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(22px, 3.4vw, 30px);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.contact-card .btn { margin-top: 22px; }

/* Footer */
.footer {
  position: relative;
  color: #dfeeec;
  padding: 72px 0 30px;
  background: linear-gradient(180deg, rgba(15,59,58,0.92), rgba(9,38,37,0.96)),
              url('../img/footer-bg.webp') center / cover no-repeat;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { max-width: 420px; }
.footer-brand .fname {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: #fff;
  margin-bottom: 12px;
}
.footer-brand p { color: #a9c6c2; font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: #cfe6e3;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--teal); }
.footer-bottom {
  padding-top: 26px;
  font-size: 14px;
  color: #8fb0ac;
  text-align: center;
}

/* Legal pages */
.legal-page {
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 90px;
  background: var(--bg-2);
  min-height: 70vh;
}
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 10px; }
.legal-updated { color: var(--muted); font-size: 15px; margin-bottom: 34px; }
.legal-content h2 { font-size: 24px; margin: 34px 0 12px; }
.legal-content p { margin-bottom: 14px; }
.legal-content ul { margin: 0 0 16px 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--teal); font-weight: 600; }

/* Responsive */
@media (max-width: 1024px) {
  .section { padding: 84px 0; }
  .hero-inner { gap: 36px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .how-grid .split-media { max-width: 520px; }
}

@media (max-width: 768px) {
  .nav-list { display: none; }
  .burger-btn { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin: 6px auto 0; transform: none; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.rev .split-media { order: 0; }
  .split-media { max-width: 560px; }
}

@media (max-width: 640px) {
  .section { padding: 66px 0; }
  .wrap { padding: 0 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .contact-card { padding: 40px 24px; }
  .footer-top { flex-direction: column; }
  
  .footer-top { align-items: center; }
  .footer-brand *{ text-align: center; }
}
