/* ========================================
   PRIMES BATTLE
   ======================================== */

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Colors  */
  --hero-bg: #d9f2e6;
  --feature-1-bg: #dcdff9;
  --feature-2-bg: #fef2d0;
  --feature-3-bg: #e8f4f8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: 80px 20px;
  --container-max: 1200px;

  /* Border Radius  */
  --radius-xl: 48px;
  --radius-lg: 32px;
  --radius-md: 16px;
}

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Language Switcher --- */
.lang-switch {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  background: var(--white);
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px var(--shadow);
}

.lang-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background: var(--text-primary);
  color: var(--white);
}

.lang-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
}

/* --- Hero Section --- */
.hero {
  background: var(--hero-bg);
  min-height: 100vh;
  padding: var(--section-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-content {
  max-width: var(--container-max);
  width: 100%;
  text-align: center;
}

.app-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
}

.store-btn {
  display: block;
  transition: transform 0.3s ease;
}

.store-btn:hover {
  transform: translateY(-3px);
}

.store-btn img {
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 40px;
  color: var(--text-primary);
}

/* --- Phone Mockup --- */
.phone-mockup {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.phone-frame {
  width: 320px;
  height: 640px;
  background: var(--white);
  border-radius: 40px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.phone-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  object-fit: cover;
  border-radius: 40px 40px 20px 20px;
  /* Soft vignette: white fades in from bottom edge only */
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.mascot {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 70%;
  max-height: 45%;
  object-fit: contain;
  /* Balanced crop - 6% hides lines without cutting character */
  clip-path: inset(5% 0 5% 0);
}

/* --- Feature Sections --- */
.feature {
  padding: var(--section-padding);
}

.feature-1 {
  background: var(--feature-1-bg);
}

.feature-2 {
  background: var(--feature-2-bg);
}

.feature-3 {
  background: var(--feature-3-bg);
}

.feature-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.feature-content.reverse {
  direction: rtl;
}

.feature-content.reverse>* {
  direction: ltr;
}

.feature-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.feature-text p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.buy-btn {
  display: inline-block;
  padding: 16px 32px;
  background: var(--text-primary);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.buy-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 60px var(--shadow);
}

.card-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-inner img {
  width: 100%;
  display: block;
}

/* --- Testimonials --- */
.testimonials {
  padding: var(--section-padding);
  background: var(--white);
  text-align: center;
}

.testimonials h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 48px;
}

.testimonial-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.flag {
  font-size: 24px;
}

.name {
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-card p {
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Footer --- */
.footer {
  padding: 60px 20px;
  background: var(--white);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-logo img {
  height: 40px;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.copyright {
  color: var(--text-secondary);
  font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .app-buttons {
    position: static;
    justify-content: center;
    margin-bottom: 24px;
  }

  .feature-content,
  .feature-content.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    width: 280px;
    height: 560px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }
}