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

:root {
  --bg: #F5E5CC;
  --bg-soft: #FBF2DE;
  --navy: #2C4270;
  --navy-dark: #1B2C4F;
  --pink: #FF3E8E;
  --yellow: #FFC94A;
  --blue: #3EA6FF;
  --white: #FFFFFF;
  --text-soft: #5C6B8A;
  --font-heading: 'Baloo 2', cursive;
  --font-body: 'Nunito', sans-serif;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(44, 66, 112, 0.12);
}

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

html { scroll-behavior: smooth; }
html.hide #preloader { opacity: 0; visibility: hidden; }

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

body.fixed { overflow: hidden; }

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

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

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

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

.section-title {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 48px;
  color: var(--navy);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 34px;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(255, 62, 142, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 62, 142, 0.42);
}

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

.btn-hero {
  animation: float-cta 3s ease-in-out infinite;
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  background: rgba(245, 229, 204, 0.85);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: rgba(245, 229, 204, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(44, 66, 112, 0.1);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
}

.logo img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.98rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--pink); }

.nav-cta {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(255, 62, 142, 0.3);
  transition: transform 0.2s ease;
}

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

.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  width: 32px;
  height: 24px;
  cursor: pointer;
  z-index: 1001;
}

.burger-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.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 {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 78%;
  max-width: 340px;
  background: var(--bg-soft);
  box-shadow: -10px 0 30px rgba(44, 66, 112, 0.15);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 100px 36px;
  transform: translateX(100%);
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 999;
}

#mobile-menu.opened {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#mobile-menu .nav-link { font-size: 1.15rem; }
#mobile-menu .nav-cta { text-align: center; }

/* Hero */
.hero {
  padding: 160px 0 100px;
  background-image: url('../img/hero-bg.webp');
  background-size: cover;
  background-position: center;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content { flex: 1; }

.hero-content h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--pink);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-visual {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 260px;
  border-radius: 32px;
  overflow: hidden;
  border: 8px solid var(--navy);
  box-shadow: var(--shadow);
  background: var(--navy);
}

.phone-frame.small { width: 220px; }

.phone-frame img { border-radius: 24px; }

/* Features */
.features {
  padding: 110px 0;
}

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

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  text-align: left;
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--white);
}

.feature-card:nth-child(1) .feature-icon { background: var(--pink); }
.feature-card:nth-child(2) .feature-icon { background: var(--yellow); }
.feature-card:nth-child(3) .feature-icon { background: var(--blue); }
.feature-card:nth-child(4) .feature-icon { background: var(--navy); }

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* How it works */
.how-it-works {
  padding: 110px 0;
  background: var(--bg-soft);
}

.how-grid {
  display: flex;
  align-items: center;
  gap: 70px;
}

.how-visual { flex: 0 0 auto; }

.how-steps { flex: 1; }
.how-steps .section-title { text-align: left; }

.step {
  display: flex;
  gap: 22px;
  margin-bottom: 34px;
}

.step:last-child { margin-bottom: 0; }

.step-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--pink);
  flex-shrink: 0;
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--text-soft);
  line-height: 1.55;
}

/* Reviews */
.reviews {
  padding: 110px 0;
  background-image: url('../img/section-bg.webp');
  background-size: cover;
  background-position: center;
}

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

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.stars {
  color: var(--yellow);
  font-size: 1.1rem;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.review-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.review-card p {
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.review-author {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}

/* FAQ */
.faq {
  padding: 110px 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
}

.faq-num {
  color: var(--pink);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-question span:nth-child(2) { flex: 1; }

.faq-toggle {
  font-size: 1.3rem;
  color: var(--blue);
  transition: transform 0.25s ease;
}

.faq-item.active .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 26px 22px 68px;
  color: var(--text-soft);
  line-height: 1.55;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

/* Dark zone: final CTA + footer */
.dark-zone {
  background-image: url('../img/footer-bg.webp'), linear-gradient(var(--navy-dark), var(--navy-dark));
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.final-cta {
  padding: 100px 0 80px;
  text-align: center;
}

.final-cta h2 {
  font-size: 2.4rem;
  color: var(--white);
  margin-bottom: 30px;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

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

.footer-links .divider { opacity: 0.5; }

.footer-copy {
  font-size: 0.88rem;
  opacity: 0.75;
}

/* Legal pages */
.legal-page {
  padding: 160px 0 100px;
  background: var(--bg);
}

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

.legal-content h1 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.legal-content h2, .legal-content h3 {
  font-size: 1.25rem;
  margin: 34px 0 14px;
  color: var(--navy);
}

.legal-content p, .legal-content li {
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 14px;
  font-size: 0.98rem;
}

.legal-content ol, .legal-content ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 2.6rem; }
  .legal-content { padding: 42px 36px; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .burger-btn { display: flex; }
  .hero { background-image: none; background-color: var(--bg); }
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .how-grid { flex-direction: column; }
  .how-steps .section-title { text-align: center; }
  .step { text-align: left; }
  .section-title { font-size: 1.9rem; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.1rem; }
  .final-cta h2 { font-size: 1.7rem; }
  .legal-content { padding: 30px 22px; }
  .faq-answer p { padding-left: 26px; }
}
