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

:root {
  --color-bg: #FFF7E9;
  --color-bg-alt: #FFEFD6;
  --color-blue: #2FB2E8;
  --color-blue-dark: #1B84B8;
  --color-orange: #FF9736;
  --color-coral: #FF5E7E;
  --color-green: #3FBE7A;
  --color-purple: #8B5FBF;
  --color-navy: #21365A;
  --color-navy-soft: #4A5D82;
  --color-white: #FFFFFF;
  --gradient-cta: linear-gradient(120deg, #FF9736 0%, #FF5E7E 100%);
  --gradient-sky: linear-gradient(160deg, #4CC3EE 0%, #2FB2E8 55%, #1B84B8 100%);
  --font-heading: 'Fredoka', 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 40px rgba(33, 54, 90, 0.14);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-navy);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#preloader img {
  width: 72px;
  height: 72px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  padding: 18px 0;
  background: rgba(255, 247, 233, 0.94);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(33, 54, 90, 0.1);
  padding: 10px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  height: 42px;
  width: 42px;
  border-radius: 13px;
  object-fit: cover;
  display: block;
}

.logo-word {
  height: 25px;
  width: auto;
  display: block;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-navy);
  padding: 6px 2px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-cta);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.logo::after,
.footer-logo::after {
  display: none;
}

.logo {
  padding: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-white);
  background: var(--gradient-cta);
  padding: 12px 22px;
  border-radius: 100px;
  box-shadow: 0 10px 22px rgba(255, 94, 126, 0.35);
  transition: transform 0.2s ease;
}

.header-cta:hover {
  transform: translateY(-2px);
}

.burger-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  position: relative;
  z-index: 2;
}

.burger-btn span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 3px;
  border-radius: 3px;
  background: var(--color-navy);
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s 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 {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

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

#mobile-menu .header-cta {
  margin-top: 10px;
}

body.fixed {
  overflow: hidden;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  padding: 16px 30px;
  border-radius: 100px;
  border: none;
}

.btn-primary {
  color: var(--color-white);
  background: var(--gradient-cta);
  box-shadow: 0 16px 32px rgba(255, 94, 126, 0.38);
}

.btn-play-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hero .btn-primary {
  animation: floaty 3s ease-in-out infinite;
}

.hero .btn-primary:hover {
  animation-play-state: paused;
}

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

.cta-sub {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-navy-soft);
  margin-top: 12px;
}

/* Section basics */
section {
  padding: 100px 0 90px;
  position: relative;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue-dark);
  background: rgba(47, 178, 232, 0.12);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.15;
}

.section-title {
  font-size: 38px;
  font-weight: 600;
  margin-bottom: 18px;
}

.section-lead {
  font-size: 18px;
  color: var(--color-navy-soft);
  line-height: 1.65;
  max-width: 620px;
}

/* Hero */
.hero {
  padding-top: 168px;
  background: var(--gradient-sky);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 2px, transparent 2px);
  background-size: 34px 34px;
  opacity: 0.35;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 50px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 22px;
  text-shadow: 0 6px 18px rgba(27, 61, 96, 0.25);
}

.hero-content p {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 34px;
  max-width: 560px;
}

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

.phone-frame {
  width: 290px;
  border-radius: 42px;
  border: 10px solid var(--color-navy);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--color-navy);
  position: relative;
  transform: rotate(-2deg);
}

.phone-frame img {
  width: 100%;
  display: block;
}

.hero-badge {
  position: absolute;
  bottom: 18px;
  right: -10px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-badge img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.hero-badge span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-navy);
}

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

.features .container {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 60px;
  align-items: center;
}

.features-visual {
  position: relative;
}

.features-visual .phone-frame {
  width: 260px;
  margin: 0 auto;
  transform: rotate(2deg);
  border-color: var(--color-orange);
}

.feature-list {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(33, 54, 90, 0.07);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gradient-cta);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.feature-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-navy-soft);
}

.features-outro {
  margin-top: 26px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-navy-soft);
  font-style: italic;
}

/* How to Play */
.how-to-play {
  background-image: linear-gradient(rgba(21, 33, 56, 0.72), rgba(21, 33, 56, 0.72)), url('../img/screenshot-7.webp');
  background-size: cover;
  background-position: center;
}

.how-to-play .section-tag {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.18);
}

.how-to-play .section-title {
  color: var(--color-white);
}

.how-to-play .section-lead,
.how-to-play-outro {
  color: rgba(255, 255, 255, 0.85);
}

.how-to-play .section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.how-to-play .section-lead {
  max-width: 100%;
}

.steps-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}

.step-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: 0 10px 26px rgba(33, 54, 90, 0.08);
  position: relative;
  flex: 0 1 calc(33.333% - 15px);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--gradient-sky);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-navy-soft);
}

.how-to-play-outro {
  text-align: center;
  max-width: 680px;
  margin: 40px auto 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Screenshots */
.screenshots {
  background: var(--color-bg);
}

.screenshots .section-header {
  max-width: 700px;
  margin: 0 auto 20px;
  text-align: center;
}

.screenshot-points {
  max-width: 760px;
  margin: 0 auto 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.screenshot-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-navy-soft);
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(33, 54, 90, 0.06);
}

.screenshot-points li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-cta);
  margin-top: 7px;
  flex-shrink: 0;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(33, 54, 90, 0.12);
  border: 5px solid var(--color-white);
  transition: transform 0.25s ease;
}

.gallery-frame:hover {
  transform: translateY(-6px);
}

.gallery-frame img {
  width: 100%;
  display: block;
}

.screenshots-outro {
  text-align: center;
  max-width: 680px;
  margin: 40px auto 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-navy-soft);
  font-style: italic;
}

/* Support */
.support {
  background-image: linear-gradient(rgba(20, 60, 90, 0.72), rgba(20, 60, 90, 0.72)), url('../img/screenshot-8.webp');
  background-size: cover;
  background-position: center;
  text-align: center;
}

.support .section-tag {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.support h2 {
  color: var(--color-white);
  font-size: 36px;
  max-width: 680px;
  margin: 0 auto 20px;
}

.support p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.75;
  max-width: 640px;
  margin: 0 auto 18px;
}

.support-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  background: var(--color-white);
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 100px;
  box-shadow: var(--shadow-soft);
}

/* Footer */
.site-footer {
  background: var(--color-navy);
  padding: 44px 0 30px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo .logo-mark {
  height: 36px;
  width: 36px;
  border-radius: 11px;
}

.footer-logo .logo-word {
  height: 22px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.footer-links a:hover {
  color: var(--color-orange);
}

.footer-bottom {
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* Legal pages */
.legal-page {
  padding-top: 170px;
  padding-bottom: 90px;
  background: var(--color-bg);
}

.legal-content {
  max-width: 780px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 56px 60px;
  box-shadow: var(--shadow-soft);
}

.legal-content h1 {
  font-size: 34px;
  margin-bottom: 26px;
}

.legal-content h2 {
  font-size: 21px;
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--color-blue-dark);
}

.legal-content h3 {
  font-size: 17px;
  margin-top: 18px;
  margin-bottom: 8px;
}

.legal-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-navy-soft);
  margin-bottom: 14px;
}

.legal-content ul {
  margin: 0 0 14px 20px;
  color: var(--color-navy-soft);
}

.legal-content li {
  list-style: disc;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--color-blue-dark);
  text-decoration: underline;
}


/* Responsive */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 40px; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content p { margin-left: auto; margin-right: auto; }
  .hero-visual { order: -1; margin-bottom: 10px; }
  .features .container { grid-template-columns: 1fr; }
  .features-visual { order: -1; }
  .step-card { flex-basis: calc(50% - 11px); }
  .screenshot-gallery { grid-template-columns: repeat(2, 1fr); }
  .screenshot-points { grid-template-columns: 1fr; }
  .legal-content { padding: 40px 30px; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .burger-btn { display: block; }
  section { padding: 70px 0 60px; }
  .hero { padding-top: 140px; }
  .hero-content h1 { font-size: 32px; }
  .section-title { font-size: 28px; }
  .support h2 { font-size: 26px; }
  .screenshot-gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .step-card { flex-basis: 100%; }
  .phone-frame { width: 230px; }
  .features-visual .phone-frame { width: 220px; }
  .hero-badge { right: 0; }
  .legal-content { padding: 32px 20px; }
  .legal-content h1 { font-size: 26px; }
}
