:root {
  --orange-bg: #f9a72a;
  --orange-bright: #ff9933;
  --orange-deep: #e88b20;
  --orange-dark: #c76b0a;
  --green: #3d9b4a;
  --green-bright: #4caf50;
  --green-dark: #2d7a36;
  --ink: #1a0f06;
  --ink-soft: #3d2612;
  --muted: #5c3814;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-dark: rgba(26, 15, 6, 0.92);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  --container: min(1200px, 94vw);
}

* {
  box-sizing: border-box;
}

/* —— Load overlay —— */
.load-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f9a72a 0%, #ff9933 50%, #e88b20 100%);
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.load-overlay.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.load-word {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(3rem, 12vw, 6rem);
  color: #1a0f06;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: scale(0.92);
  animation: loadPop 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 0.15s forwards;
}

.load-overlay.done .load-word {
  animation: none;
}

@keyframes loadPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9a72a 0%, #ff9933 40%, #ffad4d 80%, #e88b20 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-halo {
  position: fixed;
  inset: -30% -30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 50% at 50% 0%, rgba(255, 200, 120, 0.3), transparent 50%),
    radial-gradient(40% 40% at 80% 80%, rgba(255, 153, 51, 0.2), transparent 45%);
}

/* —— Topbar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: var(--surface-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.brand {
  font-family: "Bungee", cursive;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  min-height: 40px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill.solid {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-bright) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(45, 122, 54, 0.35);
}

.pill.ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.icon-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  display: none;
  grid-column: 1 / -1;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}

.mobile-menu a {
  padding: 12px;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
}

.mobile-menu.hidden {
  display: none !important;
}

/* —— Hero —— */
main {
  position: relative;
  z-index: 1;
}

main section[id] {
  scroll-margin-top: 80px;
}

.hero-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: min(85vh, 720px);
  padding: 60px 24px 80px;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-tagline {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.hero-title {
  margin: 0 0 16px;
  font-family: "Bungee", cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0 0 24px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 42ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-pill {
  padding: 14px 28px;
  font-size: 1rem;
}

.ca-card {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(61, 155, 74, 0.5);
  background: rgba(255, 255, 255, 0.9);
}

.ca-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ca-row code {
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
  word-break: break-all;
}

.ca-card .pill.ghost {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(61, 155, 74, 0.5);
  color: var(--green-dark);
}

.hero-visual {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1;
  max-height: 420px;
  background: var(--surface);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gallery-link:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* —— Marquee —— */
.marquee-strip {
  overflow: hidden;
  background: var(--orange-dark);
  color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.marquee-track {
  display: flex;
  overflow: hidden;
}

.marquee-group {
  flex: 0 0 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 48px;
  padding: 14px 24px;
  animation: marquee 70s linear infinite;
}

.marquee-group span {
  font-family: "Bungee", cursive;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* —— Blocks —— */
.block {
  padding: 80px 24px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.block-title {
  margin: 0 0 16px;
  font-family: "Bungee", cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.block-lead {
  margin: 0 0 40px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 60ch;
}

.block-light {
  background: var(--surface);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.block-mid {
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(61, 155, 74, 0.2);
}

.block-dark {
  background: var(--surface-dark);
  color: #fff;
}

.block-dark .block-title,
.block-dark .block-lead {
  color: #fff;
}

.block-dark .block-lead {
  color: rgba(255, 255, 255, 0.85);
}

.block-tagline {
  padding: 48px 24px;
  background: linear-gradient(90deg, var(--orange-deep) 0%, var(--orange-bright) 100%);
  text-align: center;
}

.tagline {
  margin: 0;
  font-family: "Bungee", cursive;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.block-cta {
  background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange-deep) 50%, var(--orange-bright) 100%);
  color: #fff;
}

.block-cta .block-title,
.block-cta .block-lead {
  color: #fff;
}

.block-cta .block-lead {
  color: rgba(255, 255, 255, 0.9);
}

.block-cta .pill.ghost {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* —— Pillars (About) —— */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.pillar {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(61, 155, 74, 0.2);
}

.pillar h3 {
  margin: 0 0 10px;
  font-family: "Bungee", cursive;
  font-size: 1.1rem;
  color: var(--green-dark);
}

.pillar p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* —— Token stats —— */
.token-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-value {
  display: block;
  font-family: "Bungee", cursive;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: #fff;
  margin-bottom: 6px;
}

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

/* —— Gallery —— */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.gallery-grid figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g1 { grid-column: span 7; min-height: 320px; }
.g2 { grid-column: span 5; min-height: 320px; }
.g3 { grid-column: span 4; min-height: 220px; }
.g4 { grid-column: span 4; min-height: 220px; }
.g5 { grid-column: span 4; min-height: 220px; }

.gallery-link:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}

/* —— Ecosystem cards —— */
.ecosystem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.eco-card {
  display: block;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(61, 155, 74, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.eco-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.eco-card-disabled {
  opacity: 0.85;
  cursor: default;
}

.eco-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.eco-card h3 {
  margin: 0 0 10px;
  font-family: "Bungee", cursive;
  font-size: 1.25rem;
  color: var(--ink);
}

.eco-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* —— Steps —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.step {
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(61, 155, 74, 0.2);
}

.step-num {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-family: "Bungee", cursive;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  margin-bottom: 16px;
}

.step h3 {
  margin: 0 0 10px;
  font-family: "Bungee", cursive;
  font-size: 1.1rem;
  color: var(--green-dark);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* —— Footer —— */
.footer {
  background: var(--surface-dark);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  margin: 0;
  font-family: "Bungee", cursive;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

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

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox.hidden {
  display: none;
}

.lightbox-image {
  max-width: min(1000px, 92vw);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }

  .topbar-actions .pill:not(.solid) {
    display: none;
  }

  .icon-button {
    display: inline-flex;
  }

  .mobile-menu:not(.hidden) {
    display: flex !important;
  }
}

@media (max-width: 920px) {
  .hero-full {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px 60px;
  }

  .hero-desc {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .token-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ecosystem-cards {
    grid-template-columns: 1fr;
  }

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

  .g1, .g2 { grid-column: span 12; min-height: 280px; }
  .g3, .g4, .g5 { grid-column: span 12; min-height: 220px; }
}

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

  .token-stats {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-height: 300px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .marquee-group {
    animation-duration: 70s !important;
  }

  .load-overlay,
  .load-overlay * {
    animation-duration: 0.55s !important;
    animation-delay: 0.15s !important;
    transition-duration: 0.6s !important;
  }
}
