:root {
  --dem-blue: #002868;
  --dem-blue-light: #0047ab;
  --dem-blue-dark: #001a4d;
  --dem-red: #bf0a30;
  --dem-red-light: #e63946;
  --white: #ffffff;
  --cream: #f4f6fb;
  --gold: #ffd700;
  --shadow: rgba(0, 40, 104, 0.35);
  --font-serif: "Playfair Display", "Georgia", serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--dem-blue-dark);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background layers */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(160deg, #001a4d 0%, #002868 35%, #001433 70%, #000d26 100%);
}

.stars-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.stripes-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    var(--dem-red) 40px,
    var(--dem-red) 42px,
    transparent 42px,
    transparent 82px,
    var(--white) 82px,
    var(--white) 84px
  );
  pointer-events: none;
}

/* Ticker */
.ticker-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: linear-gradient(90deg, var(--dem-red), #d4143a, var(--dem-red));
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--gold);
}

.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker span {
  padding: 0 2.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Nav */
.navbar {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 26, 77, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(0, 26, 77, 0.97);
  box-shadow: 0 4px 30px var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.nav-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(255, 215, 0, 0.25); }
}

.nav-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-title small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--white);
}

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

.nav-cta {
  background: linear-gradient(135deg, var(--dem-red), var(--dem-red-light));
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 10, 48, 0.5);
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-stars {
  position: absolute;
  width: 300px;
  height: 300px;
  opacity: 0.08;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23fff' points='50,5 61,39 97,39 68,60 79,94 50,73 21,94 32,60 3,39 39,39'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: starFloat 8s ease-in-out infinite;
}

.hero-stars.left { top: 15%; left: 5%; }
.hero-stars.right { bottom: 10%; right: 5%; animation-delay: -4s; }

@keyframes starFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-content {
  text-align: center;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(191, 10, 48, 0.2);
  border: 1px solid var(--dem-red);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 0.8s ease-out;
}

.hero-logo-wrap {
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.8s ease-out 0.1s both;
}

.hero-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  animation: fadeSlideDown 0.8s ease-out 0.2s both;
}

.hero h1 .highlight {
  color: var(--gold);
  display: block;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-style: italic;
  animation: fadeSlideDown 0.8s ease-out 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeSlideDown 0.8s ease-out 0.4s both;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--dem-red), #d4143a);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(191, 10, 48, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(191, 10, 48, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
}

/* Sections */
section {
  padding: 6rem 2rem;
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-header p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--dem-red), var(--gold), var(--dem-blue-light));
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about {
  background: linear-gradient(180deg, transparent, rgba(0, 71, 171, 0.15), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.about-text p strong {
  color: var(--gold);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.stat-card .stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.stat-card p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* How to Buy */
.howtobuy {
  background: rgba(0, 40, 104, 0.3);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -10px;
  right: -10px;
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.3);
}

.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--dem-red), var(--dem-red-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 15px rgba(191, 10, 48, 0.4);
}

.step-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.step-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.howtobuy-cta {
  text-align: center;
  margin-top: 3rem;
}

.contract-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  font-family: monospace;
  font-size: 0.8rem;
}

.contract-box button {
  background: var(--dem-blue-light);
  border: none;
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.2s;
}

.contract-box button:hover {
  background: var(--gold);
  color: var(--dem-blue-dark);
}

/* Chart */
.chart-section {
  background: linear-gradient(180deg, transparent, rgba(191, 10, 48, 0.08), transparent);
}

.chart-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.chart-container iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

.chart-footer {
  text-align: center;
  margin-top: 1.5rem;
}

/* Join Us */
.joinus {
  background: linear-gradient(180deg, rgba(0, 71, 171, 0.2), rgba(0, 26, 77, 0.5));
  overflow: hidden;
}

.joinus-banner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  border: 3px solid rgba(255, 215, 0, 0.3);
  animation: bannerGlow 4s ease-in-out infinite;
}

.joinus-banner img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes bannerGlow {
  0%, 100% { box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 215, 0, 0); }
  50% { box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px 5px rgba(255, 215, 0, 0.15); }
}

.joinus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.joinus-content h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.joinus-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.social-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-btn.x-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.social-btn.tg-btn:hover {
  background: rgba(0, 136, 204, 0.25);
  border-color: #2aabee;
}

.joinus-poster {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
}

.joinus-poster .poster-year {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(180deg, var(--white), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: yearPulse 3s ease-in-out infinite;
}

@keyframes yearPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.joinus-poster p {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social-link:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.footer-social-link.tg-link:hover {
  background: rgba(0, 136, 204, 0.25);
  border-color: #2aabee;
}

.footer p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer .disclaimer {
  margin-top: 0.5rem;
  font-size: 0.7rem;
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .about-grid,
  .joinus-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 26, 77, 0.98);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .menu-toggle {
    display: block;
  }
}

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

  .hero-logo {
    width: 140px;
    height: 140px;
  }

  section {
    padding: 4rem 1.25rem;
  }
}
