/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand: #2563EB;
  --brand-light: #3B82F6;
  --brand-dark: #1D4ED8;
  --green: #10B981;
  --green-dark: #059669;
  --dark: #1A1A2E;
  --dark-mid: #16213E;
  --dark-light: #0F3460;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.18);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  background: #fff;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

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

/* ===== Hero ===== */
.hero {
  background: var(--dark);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
  color: #fff;
  padding: 0 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Globe dots decoration */
.hero-globe {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0.5;
  pointer-events: none;
}

.hero-globe::before {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
}

.hero-globe::after {
  content: '';
  position: absolute;
  inset: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.03);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: #fff;
}

.nav-cta {
  background: var(--brand) !important;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--brand-light) !important;
  transform: translateY(-1px);
}

/* Hero content */
.hero-content {
  text-align: center;
  padding-top: 60px;
  position: relative;
  z-index: 5;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-light);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--brand-light), #818CF8, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
}

/* ===== Country Grid ===== */
.countries-section {
  padding: 100px 0;
  background: var(--gray-50);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 520px;
  margin-bottom: 48px;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.country-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.country-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gray-300));
  opacity: 0;
  transition: opacity var(--transition);
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.country-card:hover::before {
  opacity: 1;
}

.country-card.live {
  cursor: pointer;
}

.country-card.live:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.card-flag {
  font-size: 48px;
  line-height: 1;
}

.card-country {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}

.card-exams {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.exam-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.exam-name {
  color: var(--gray-600);
  font-weight: 500;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-live {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green-dark);
}

.badge-soon {
  background: var(--gray-100);
  color: var(--gray-400);
}

.card-cta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.country-card:hover .card-cta {
  gap: 10px;
}

.card-cta-soon {
  color: var(--gray-400);
}

/* Canada accent */
.country-card[data-country="ca"] { --card-accent: #FF0000; }
.country-card[data-country="us"] { --card-accent: #3C3B6E; }
.country-card[data-country="gb"] { --card-accent: #012169; }
.country-card[data-country="au"] { --card-accent: #00008B; }
.country-card[data-country="in"] { --card-accent: #FF9933; }
.country-card[data-country="de"] { --card-accent: #DD0000; }
.country-card[data-country="fr"] { --card-accent: #002395; }
.country-card[data-country="nz"] { --card-accent: #00247D; }
.country-card[data-country="ae"] { --card-accent: #00732F; }
.country-card[data-country="sg"] { --card-accent: #EF3340; }
.country-card[data-country="jp"] { --card-accent: #BC002D; }
.country-card[data-country="kr"] { --card-accent: #003478; }

/* ===== How It Works ===== */
.how-section {
  padding: 100px 0;
  background: #fff;
}

.how-section .section-label,
.how-section .section-title,
.how-section .section-desc {
  text-align: center;
}

.how-section .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 48px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--green));
  opacity: 0.2;
}

.step {
  text-align: center;
  position: relative;
}

.step-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
}

.step:nth-child(1) .step-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
  color: var(--brand);
}

.step:nth-child(2) .step-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
  color: #8B5CF6;
}

.step:nth-child(3) .step-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  color: var(--green);
}

.step-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.step p {
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 280px;
  margin: 0 auto;
}

/* ===== Why CountryPrep ===== */
.why-section {
  padding: 100px 0;
  background: var(--dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.why-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 70%);
  pointer-events: none;
}

.why-section .section-label { color: var(--brand-light); }
.why-section .section-title { color: #fff; }
.why-section .section-desc { color: rgba(255,255,255,0.5); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}

.feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.feature-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/* ===== Newsletter ===== */
.newsletter-section {
  padding: 100px 0;
  background: var(--gray-50);
  text-align: center;
}

.newsletter-section .section-title,
.newsletter-section .section-desc {
  text-align: center;
}

.newsletter-section .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  font-size: 1rem;
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input::placeholder {
  color: var(--gray-400);
}

.newsletter-form input:focus {
  border-color: var(--brand);
}

.newsletter-form button {
  padding: 14px 28px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.newsletter-note {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-top: 14px;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.5);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.footer ul a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-socials a:hover {
  background: rgba(255,255,255,0.12);
}

/* ===== Mobile nav toggle ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .steps::before { display: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    background: var(--dark-mid);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-links.open { display: flex; }

  .hero-content { padding-top: 32px; }
  .hero { padding-bottom: 64px; }

  .country-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .country-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }
}
