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

:root {
  --primary: #ff5f6d;
  --primary-dark: #c93f6d;
  --accent: #2f9e8f;
  --accent-dark: #1c6f66;
  --gold: #e5a43b;
  --bg: #fdf6ea;
  --bg-alt: #f7ead2;
  --bg-deep: #2c2118;
  --ink: #3a2a2f;
  --ink-soft: #6b5a53;
  --white: #ffffff;
  --gradient-cta: linear-gradient(135deg, #ff8a5c 0%, #ff5f6d 55%, #c93f6d 100%);
  --gradient-hero: linear-gradient(180deg, #fff8ec 0%, #fdf0d8 100%);
  --font-heading: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --radius: 22px;
  --shadow-soft: 0 16px 40px rgba(58, 42, 47, 0.12);
}

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

html.hide #preloader { opacity: 0; visibility: hidden; }

html, body { width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

body.fixed { overflow: hidden; }

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

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

ul { list-style: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#preloader img { width: 60px; height: 60px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  border: none;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary {
  background: var(--gradient-cta);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(255, 95, 109, 0.38);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(255, 95, 109, 0.46); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

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

/* Header */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  padding: 18px 0;
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}
header.scrolled {
  background: rgba(253, 246, 234, 0.94);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 8px 24px rgba(58, 42, 47, 0.08);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 38px; width: auto; }

nav.main-nav { display: flex; align-items: center; gap: 36px; }
.nav-list { display: flex; gap: 28px; }
.nav-link {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  padding: 6px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gradient-cta);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 1200;
}
.burger-btn span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}
.burger-btn.act span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

#mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  left: 0; right: 0;
  padding: 0 30px;
  z-index: 1050;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}
#mobile-menu.opened { opacity: 1; pointer-events: auto; }
#mobile-menu .nav-link { font-size: 22px; }
#mobile-menu .btn { margin-top: 10px; }

/* Hero */
.hero {
  position: relative;
  padding: 160px 0 100px;
  background: url('../img/hero-bg.webp') center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(253, 246, 234, 0.96) 0%, rgba(253, 246, 234, 0.88) 45%, rgba(253, 246, 234, 0.62) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  top: -140px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 92, 0.28), transparent 70%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-content p { font-size: 17px; color: var(--ink-soft); margin-bottom: 16px; max-width: 520px; }
.hero-actions { margin-top: 30px; }
.hero-media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(1.2deg);
  animation: heroSway 11s ease-in-out infinite;
}

@keyframes heroSway {
  0%   { transform: rotate(1.2deg) translateY(0); }
  25%  { transform: rotate(2.6deg) translateY(-7px); }
  50%  { transform: rotate(1.2deg) translateY(-10px); }
  75%  { transform: rotate(-0.2deg) translateY(-7px); }
  100% { transform: rotate(1.2deg) translateY(0); }
}
.hero-media img { width: 100%; height: auto; }

/* Section shared */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: 34px; margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 16px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-media {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 360px;
  margin: 0 auto;
}
.about-text p { color: var(--ink-soft); margin-bottom: 16px; font-size: 16px; }
.about-text h2 { font-size: 32px; margin-bottom: 18px; }

/* How to play */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.how-media {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  order: 2;
  max-width: 360px;
  margin: 0 auto;
}
.how-text { order: 1; }
.how-text h2 { font-size: 32px; margin-bottom: 18px; }
.how-text p { color: var(--ink-soft); margin-bottom: 16px; font-size: 16px; }
.feature-list { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  color: var(--ink);
}
.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 36px; height: 36px;
  margin-top: -2px;
  background: url('../img/gem-marker.svg') center/contain no-repeat;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.features-media {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 360px;
  margin: 0 auto;
}
.features-text h2 { font-size: 32px; margin-bottom: 18px; }
.features-text > p { color: var(--ink-soft); margin-bottom: 16px; font-size: 16px; }
.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}
.stat-card {
  background: var(--white);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(58, 42, 47, 0.08);
}
.stat-card p { font-size: 14.5px; color: var(--ink-soft); }

/* Rewards */
.rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.rewards-media {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  order: 2;
  max-width: 360px;
  margin: 0 auto;
}
.rewards-text { order: 1; }
.rewards-text h2 { font-size: 32px; margin-bottom: 18px; }
.rewards-text p { color: var(--ink-soft); margin-bottom: 16px; font-size: 16px; }
.rewards-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(229, 164, 59, 0.15);
  border: 1px solid rgba(229, 164, 59, 0.4);
  font-size: 14.5px;
  color: var(--ink);
}
.rewards-disclaimer { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); }

/* Final CTA */
.final-cta {
  position: relative;
  background: var(--bg-deep);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 95, 109, 0.25), transparent 55%),
              radial-gradient(circle at 80% 80%, rgba(47, 158, 143, 0.28), transparent 55%);
}
.final-cta .container { position: relative; z-index: 1; max-width: 680px; }
.final-cta h2 { color: var(--white); font-size: 36px; margin-bottom: 16px; }
.final-cta p { color: rgba(255, 255, 255, 0.78); font-size: 17px; margin-bottom: 34px; }

/* Footer */
footer {
  position: relative;
  background: var(--bg-deep) url('../img/footer-bg.webp') center/cover no-repeat;
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 30px;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44, 33, 24, 0.9) 0%, rgba(44, 33, 24, 0.97) 100%);
}
footer .container { position: relative; z-index: 1; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand .logo img { height: 34px; margin-bottom: 14px; }
.footer-brand p { max-width: 320px; font-size: 14.5px; }
.footer-nav { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14.5px; transition: color .2s ease; }
.footer-col a:hover { color: var(--white); }
footer .nav-link { color: rgba(255, 255, 255, 0.7); }
footer .nav-link:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 13.5px;
}

/* Legal pages */
.legal-page { padding: 160px 0 100px; }
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h1 { font-size: 32px; margin-bottom: 26px; }
.legal-content h2 { font-size: 21px; margin: 30px 0 12px; }
.legal-content p { color: var(--ink-soft); margin-bottom: 14px; font-size: 15.5px; }
.legal-content ul { margin: 12px 0 14px 20px; list-style: disc; color: var(--ink-soft); }
.legal-content li { margin-bottom: 8px; font-size: 15.5px; }
.legal-content strong { color: var(--ink); }
.legal-content a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.legal-content a:hover,
.legal-content a:focus-visible { color: var(--primary); text-decoration-color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
  .nav-list { display: none; }
  .header-actions .btn-primary { display: none; }
  .burger-btn { display: flex; }
  .hero .container,
  .about-grid,
  .how-grid,
  .features-grid,
  .rewards-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .about-media { order: 2; }
  .features-media { order: 2; }
  .hero-content h1 { font-size: 36px; }
}

@media (max-width: 768px) {
  section { padding: 70px 0; }
  .hero { padding: 130px 0 70px; }
  .hero-content h1 { font-size: 30px; }
  .section-head h2 { font-size: 28px; }
  .stat-cards { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-nav { justify-content: center; text-align: center; }
  .footer-col { text-align: center; }
  .footer-col ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .hero-content h1 { font-size: 26px; }
  .hero-actions { display: flex; flex-direction: column; gap: 12px; }
  .btn { width: 100%; }
  .footer-nav { gap: 30px; }
}
