html {
  color-scheme: dark light;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand,
.nav-brand {
  min-width: 0;
}

.brand-text-main,
.brand-text-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links a {
  white-space: nowrap;
}

.nav-cta {
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .nav-links {
    gap: 14px !important;
    font-size: 14px !important;
  }
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.38);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 194, 73, 0.62);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.48);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-moon {
  opacity: 0;
  transform: rotate(-28deg) scale(0.74);
}

html[data-theme="light"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(28deg) scale(0.74);
}

html[data-theme="light"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

html[data-theme="light"] {
  --bg-page: #f4f7fb;
  --bg-gradient: radial-gradient(circle at top, #ffffff 0, #edf5ff 42%, #f8fafc 100%);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-soft: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-bg-strong: rgba(255, 255, 255, 0.96);
  --card-border: rgba(15, 23, 42, 0.12);
  --bg: #f4f7fb;
  --bg-alt: #eaf1fb;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --text-main: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --border-soft: rgba(15, 23, 42, 0.14);
  --border-strong: rgba(15, 23, 42, 0.22);
  --accent: #d99a13;
  --accent-soft: rgba(217, 154, 19, 0.14);
  --accent-strong: #b97700;
  --accent-blue: #0284c7;
  --primary: #d99a13;
  --primary-soft: rgba(217, 154, 19, 0.12);
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 0, rgba(56, 189, 248, 0.18), transparent 38%),
    radial-gradient(circle at 88% 0, rgba(245, 194, 73, 0.2), transparent 42%),
    linear-gradient(180deg, #ffffff 0, #eef5ff 42%, #f8fafc 100%) !important;
  color: #0f172a;
}

html[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .brand-text-main,
html[data-theme="light"] .brand-text-sub,
html[data-theme="light"] .nav-brand [style],
html[data-theme="light"] .brand [style] {
  color: #1e293b !important;
}

html[data-theme="light"] .brand-text-sub,
html[data-theme="light"] .nav-brand [style*="0.7rem"],
html[data-theme="light"] .brand [style*="0.7rem"] {
  color: #64748b !important;
}

html[data-theme="light"] .nav-links.open {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom-color: rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="light"] .nav-toggle,
html[data-theme="light"] .theme-toggle {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nav-cta {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 214, 0.98)) !important;
  color: #92400e !important;
  border-color: rgba(217, 154, 19, 0.5) !important;
  box-shadow: 0 12px 30px rgba(217, 154, 19, 0.2) !important;
}

html[data-theme="light"] .page::before {
  background:
    radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at 90% 0, rgba(245, 194, 73, 0.16), transparent 60%) !important;
}

html[data-theme="light"] .pill,
html[data-theme="light"] .hero-kicker,
html[data-theme="light"] .hero-badge,
html[data-theme="light"] .hero-tag,
html[data-theme="light"] .status-chip,
html[data-theme="light"] .year-link,
html[data-theme="light"] .card-kicker,
html[data-theme="light"] .focus-badge,
html[data-theme="light"] .launch-kicker {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #334155 !important;
}

html[data-theme="light"] .hero-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .launch-title,
html[data-theme="light"] .timeline-card h3,
html[data-theme="light"] .focus-body h3,
html[data-theme="light"] .contract-title,
html[data-theme="light"] .section-card h1,
html[data-theme="light"] .section-card h2,
html[data-theme="light"] .section-card h3 {
  color: #0f172a !important;
}

html[data-theme="light"] .hero-title span,
html[data-theme="light"] .section-title span,
html[data-theme="light"] .launch-title span {
  color: #b97700 !important;
}

html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .hero-card-sub,
html[data-theme="light"] .hero-panel-copy,
html[data-theme="light"] .focus-body p,
html[data-theme="light"] .timeline-card p,
html[data-theme="light"] .contract-text,
html[data-theme="light"] .contract-meta,
html[data-theme="light"] .item-list li,
html[data-theme="light"] .milestone-list li,
html[data-theme="light"] .section-card p,
html[data-theme="light"] .section-card li,
html[data-theme="light"] .timeline-step {
  color: #475569 !important;
}

html[data-theme="light"] .hero-subtitle strong,
html[data-theme="light"] .hero-signal strong,
html[data-theme="light"] .hero-note strong {
  color: #92400e !important;
}

html[data-theme="light"] .hero-panel,
html[data-theme="light"] .hero-card,
html[data-theme="light"] .section-card,
html[data-theme="light"] .token-card,
html[data-theme="light"] .partner-card,
html[data-theme="light"] .contract-card,
html[data-theme="light"] .launch-countdown-card,
html[data-theme="light"] .focus-card,
html[data-theme="light"] .timeline-card,
html[data-theme="light"] .quarter-card,
html[data-theme="light"] .impact-card,
html[data-theme="light"] .history-card,
html[data-theme="light"] .year-label,
html[data-theme="light"] .cta-band,
html[data-theme="light"] .contract-toolbar,
html[data-theme="light"] .overview-item,
html[data-theme="light"] .hero-flow-step,
html[data-theme="light"] .hero-signal,
html[data-theme="light"] .hero-note,
html[data-theme="light"] .roadmap-nav,
html[data-theme="light"] .countdown-panel {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88)) !important;
  border-color: rgba(15, 23, 42, 0.13) !important;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="light"] .timeline-step {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  border-radius: 999px;
  padding: 4px 0;
}

html[data-theme="light"] .hero-orbit {
  background:
    radial-gradient(circle at center, rgba(245, 194, 73, 0.16), transparent 34%),
    linear-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.08) 1px, transparent 1px) !important;
  background-size: auto, 28px 28px, 28px 28px !important;
}

html[data-theme="light"] .hero-stat,
html[data-theme="light"] .countdown-item {
  background: rgba(255, 255, 255, 0.76) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="light"] .flow-label,
html[data-theme="light"] .flow-index,
html[data-theme="light"] .hero-panel-title,
html[data-theme="light"] .hero-stat strong,
html[data-theme="light"] .quarter-card h4,
html[data-theme="light"] .impact-card h4,
html[data-theme="light"] .history-card h4,
html[data-theme="light"] .countdown-value,
html[data-theme="light"] .year-label strong {
  color: #0f172a !important;
  text-shadow: none !important;
}

html[data-theme="light"] .flow-text,
html[data-theme="light"] .hero-signal,
html[data-theme="light"] .hero-note,
html[data-theme="light"] .launch-subtitle,
html[data-theme="light"] .launch-date,
html[data-theme="light"] .launch-link,
html[data-theme="light"] .countdown-unit {
  color: #475569 !important;
}

html[data-theme="light"] .launch-countdown-card .countdown-value {
  color: #92400e !important;
}

html[data-theme="light"] .launch-date,
html[data-theme="light"] .launch-link,
html[data-theme="light"] .countdown-label {
  color: #b97700 !important;
}

html[data-theme="light"] .flow-index {
  background: rgba(217, 154, 19, 0.12) !important;
  border-color: rgba(217, 154, 19, 0.35) !important;
}

html[data-theme="light"] .contract-card.featured-contract,
html[data-theme="light"] .launch-countdown-card {
  border-color: rgba(217, 154, 19, 0.38) !important;
}

html[data-theme="light"] .contract-image::after,
html[data-theme="light"] .focus-media::after {
  background: linear-gradient(180deg, transparent 44%, rgba(15, 23, 42, 0.62)) !important;
}

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .filter-btn {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #1e293b !important;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .cookie-btn-primary {
  color: #111827 !important;
}

html[data-theme="light"] .footer,
html[data-theme="light"] footer {
  background: rgba(248, 250, 252, 0.92) !important;
  border-top-color: rgba(15, 23, 42, 0.12) !important;
  color: #64748b !important;
}

html[data-theme="light"] footer a,
html[data-theme="light"] .footer a {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] .cookie-btn-secondary {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .cookie-link {
  color: #0369a1 !important;
}

@media (max-width: 780px) {
  header {
    overflow: visible;
  }

  .nav-inner {
    width: 100%;
    max-width: 100%;
    gap: 10px;
  }

  .brand,
  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

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

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-links.open {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .page,
  .container,
  section {
    max-width: 100%;
  }

  .hero,
  .hero-grid,
  .section-grid,
  .token-grid,
  .contact-grid,
  .contract-overview,
  .contract-flow,
  .roadmap-hero,
  .timeline-grid {
    min-width: 0;
  }

  .hero-kicker,
  .pill,
  .hero-highlight,
  .hero-signal,
  .hero-note,
  .hero-tags,
  .hero-badges,
  .launch-countdown-card,
  .countdown-panel {
    max-width: 100%;
  }

  .hero-title,
  .section-title,
  .launch-title,
  .contract-title {
    overflow-wrap: anywhere;
  }

  #inicio.section {
    padding-top: 48px !important;
  }
}

@media (max-width: 520px) {
  .brand-text-sub {
    display: none;
  }

  .brand-logo-img {
    width: 32px !important;
    height: 32px !important;
  }

  #inicio.section {
    padding-top: 36px !important;
  }

  .hero-kicker,
  .pill,
  .hero-highlight {
    white-space: normal;
    flex-wrap: wrap;
  }

  .hero-video-links a,
  .hero-actions > a {
    flex: 1 1 100%;
    justify-content: center;
    max-width: 100%;
    text-align: center;
  }

  .launch-countdown-card .countdown-value {
    font-size: 24px !important;
  }

  .cookie-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }

  .cookie-buttons {
    flex-wrap: wrap;
  }

  .cookie-btn {
    flex: 1 1 130px;
    min-width: 0;
  }
}
