@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,600&family=Space+Grotesk:wght@500;700&family=Cairo:wght@600;700;800&family=Noto+Sans+SC:wght@500;700&display=swap');

:root {
  --primary-color: #0d9488; /* Emerald Teal */
  --primary-light: #ccfbf1;
  --primary-dark: #0f766e;
  --primary-glow: rgba(13, 148, 136, 0.25);
  
  --gold-accent: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.3);
  
  --bg-color: #f8fafc; /* Pristine Porcelain */
  --bg-gradient: radial-gradient(at 0% 0%, #f0fdf4 0px, transparent 50%),
                 radial-gradient(at 100% 0%, #ecfdf5 0px, transparent 50%),
                 radial-gradient(at 50% 100%, #f8fafc 0px, transparent 50%);

  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-card: rgba(255, 255, 255, 0.94);
  
  --text-primary: #0f172a; /* Deep Charcoal */
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --glass-border: rgba(13, 148, 136, 0.16);
  --glass-border-glow: rgba(13, 148, 136, 0.4);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px -5px rgba(13, 148, 136, 0.08), 0 4px 10px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 45px -10px rgba(13, 148, 136, 0.14), 0 8px 16px rgba(0, 0, 0, 0.03);
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

/* Language specific font adjustments */
[lang="ar"] { --font-heading: 'Cairo', serif; --font-body: 'Cairo', sans-serif; }
[lang="zh"] { --font-heading: 'Noto Sans SC', serif; --font-body: 'Noto Sans SC', sans-serif; }

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Canvas Background for Floating Peace Light Particles */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.85rem, 5.2vw, 4.75rem);
  line-height: 1.12;
  font-weight: 700;
}

h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Modern Pill Language Picker */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--glass-border-glow);
  border-radius: 9999px;
  padding: 0.45rem 1rem 0.45rem 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.lang-picker:hover {
  background: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.18);
}

.lang-icon {
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-right: 0.45rem;
}

[dir="rtl"] .lang-icon {
  margin-right: 0;
  margin-left: 0.45rem;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding-right: 1.2rem;
}

[dir="rtl"] .lang-select {
  padding-right: 0;
  padding-left: 1.2rem;
}

.lang-select option {
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.5rem;
}

.lang-chevron {
  position: absolute;
  right: 0.75rem;
  font-size: 0.65rem;
  color: var(--primary-dark);
  pointer-events: none;
  transition: transform var(--transition-fast);
}

[dir="rtl"] .lang-chevron {
  right: auto;
  left: 0.75rem;
}

.lang-picker:hover .lang-chevron {
  transform: translateY(2px);
}

/* RTL (Arabic) Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

/* Glassmorphism Container */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  z-index: 1;
}

.glass:hover {
  border-color: var(--glass-border-glow);
  box-shadow: var(--shadow-lg);
}

/* Fixed Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 2rem;
  transition: all var(--transition-normal);
}

nav.scrolled {
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.logo-symbol {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 16px var(--primary-glow);
}

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

.nav-links li a {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -6px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-links li a:hover::after, .nav-links li a.active::after {
  width: 100%;
}

.nav-links li a:hover, .nav-links li a.active {
  color: var(--primary-dark);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white !important;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-accent), #d97706);
  color: white !important;
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-dark) !important;
  border: 1.5px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white !important;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9rem 2rem 4.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 960px;
  z-index: 10;
}

.tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.5rem;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--glass-border-glow);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.hero h1 {
  background: linear-gradient(135deg, var(--primary-dark) 20%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.35rem;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.btn-group {
  display: flex;
  gap: 1.15rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Live Global Impact Metric Bar */
.impact-bar {
  margin-top: 3rem;
  width: 100%;
  max-width: 1050px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  border: 1px solid var(--glass-border-glow);
  box-shadow: var(--shadow-lg);
}

.impact-metric {
  text-align: center;
  padding: 0.5rem 1rem;
}

.impact-number {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  display: block;
}

.impact-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
}

/* Countdown Timer Card */
.countdown-section {
  margin: 3rem auto 0 auto;
  width: 100%;
  max-width: 780px;
  padding: 2.5rem 2rem;
  border-radius: 28px;
  background: white;
  border: 1px solid var(--glass-border-glow);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.countdown-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 1.75rem;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 95px;
  padding: 1.15rem 0.5rem;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.time-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 700;
}

.time-colon {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: -1.25rem;
}

/* Multilingual Peace Soundbar */
.soundbar-section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.soundbar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.sound-card {
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.sound-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sound-flag {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.sound-lang {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sound-greeting {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin: 0.35rem 0 0.5rem;
}

.sound-phonetic {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.sound-play-icon {
  margin-top: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.sound-card:hover .sound-play-icon {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Global Peace Map Canvas Container */
.map-canvas-container {
  width: 100%;
  height: 440px;
  border-radius: 28px;
  background: radial-gradient(circle at center, #f0fdf4 0%, #ffffff 80%);
  border: 1px solid var(--glass-border-glow);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

#peace-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Peace Card Generator Preview & Canvas */
.card-generator-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

#peace-card-canvas {
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border-glow);
  display: block;
  margin: 0 auto;
}

/* Interactive Origami Step Carousel */
.origami-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.origami-step-card {
  background: white;
  border-radius: 24px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.origami-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-glow);
  box-shadow: var(--shadow-md);
}

.step-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.step-illustration {
  font-size: 3rem;
  margin: 1rem 0 1.25rem;
  display: block;
}

/* Sections & Cards */
section {
  padding: 6rem 2rem;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.section-subtitle {
  font-family: var(--font-mono);
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

/* Auto-Fit Grids */
.grid {
  display: grid;
  gap: 2.25rem;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Feature Cards */
.card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--glass-border-glow);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border-glow);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
  color: var(--primary-dark);
}

.card-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  flex-grow: 1;
}

/* Footer */
footer {
  background: white;
  backdrop-filter: blur(20px);
  padding: 5rem 2rem 2.5rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 6rem;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand {
  max-width: 380px;
}

.footer-links {
  display: flex;
  gap: 5rem;
  flex-wrap: wrap;
}

.footer-column h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: 1.35rem;
  font-weight: 700;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.85rem;
}

.footer-column ul li a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-column ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--primary-dark);
  cursor: pointer;
}

@media (max-width: 860px) {
  nav { padding: 1rem 1.5rem; }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-toggle {
    display: block;
  }

  .countdown-timer {
    gap: 0.5rem;
  }

  .time-unit {
    min-width: 70px;
    padding: 0.85rem 0.25rem;
  }

  .time-number {
    font-size: 2.25rem;
  }

  .time-colon {
    font-size: 1.75rem;
  }

  .card-generator-modal-body {
    grid-template-columns: 1fr;
  }
}
