:root {
  --bg: #0b141a;
  --bg-elevated: rgba(16, 28, 36, 0.72);
  --cyan: #a8e6f5;
  --cyan-soft: #7ed7f5;
  --cyan-muted: #5b9eb5;
  --text: #ffffff;
  --text-muted: #a5b4bc;
  --line: rgba(168, 230, 245, 0.18);
  --font: "Space Grotesk", "Segoe UI", sans-serif;
  --radius: 14px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Atmosphere — StonkFun ribbons */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #12202a 0%, var(--bg) 55%),
    var(--bg);
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.bg-blob--tr {
  top: -18%;
  right: -12%;
  width: min(72vw, 720px);
  height: min(52vw, 520px);
  background: linear-gradient(135deg, #c9f3ff 0%, #7ed7f5 45%, #3f8eab 100%);
  border-radius: 60% 40% 55% 45%;
  animation: drift-tr 18s var(--ease) infinite alternate;
}

.bg-blob--bl {
  bottom: -22%;
  left: -16%;
  width: min(80vw, 780px);
  height: min(56vw, 560px);
  background: linear-gradient(160deg, #9fe3f4 0%, #5b9eb5 50%, #1e3a47 100%);
  border-radius: 45% 55% 40% 60%;
  opacity: 0.45;
  animation: drift-bl 22s var(--ease) infinite alternate;
}

.bg-blob--mid {
  top: 42%;
  left: 38%;
  width: min(40vw, 380px);
  height: min(28vw, 260px);
  background: #6ec8e0;
  opacity: 0.12;
  filter: blur(100px);
  animation: pulse-mid 12s ease-in-out infinite;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

@keyframes drift-tr {
  from {
    transform: translate(0, 0) rotate(-4deg) scale(1);
  }
  to {
    transform: translate(-4%, 6%) rotate(6deg) scale(1.06);
  }
}

@keyframes drift-bl {
  from {
    transform: translate(0, 0) rotate(3deg);
  }
  to {
    transform: translate(5%, -4%) rotate(-5deg);
  }
}

@keyframes pulse-mid {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.15);
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(16px);
  background: rgba(11, 20, 26, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 20, 26, 0.82);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1rem;
}

.brand-mark img {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a:not(.nav-icon) {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:not(.nav-icon):hover {
  color: var(--text);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-icon:hover {
  background: rgba(168, 230, 245, 0.08);
  border-color: rgba(168, 230, 245, 0.4);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cyan);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: end;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-mascot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.02);
  animation: mascot-drift 14s ease-in-out infinite alternate;
}

.hero-media-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 20, 26, 0.35) 0%, rgba(11, 20, 26, 0.15) 28%, rgba(11, 20, 26, 0.55) 62%, rgba(11, 20, 26, 0.96) 100%),
    radial-gradient(80% 60% at 50% 20%, transparent 30%, rgba(11, 20, 26, 0.55) 100%);
  pointer-events: none;
}

@keyframes mascot-drift {
  from {
    transform: scale(1.02) translateY(0);
  }
  to {
    transform: scale(1.06) translateY(-1.5%);
  }
}

.hero-orbit {
  position: absolute;
  inset: 8% 6%;
  pointer-events: none;
  z-index: 1;
}

.orbit-word {
  position: absolute;
  color: rgba(200, 230, 240, 0.78);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(11, 20, 26, 0.9);
  animation: float-word 8s ease-in-out infinite;
}

.orbit-word--1 {
  top: 8%;
  left: 18%;
  animation-delay: 0s;
}
.orbit-word--2 {
  top: 14%;
  right: 16%;
  animation-delay: 1.2s;
}
.orbit-word--3 {
  bottom: 22%;
  left: 12%;
  animation-delay: 2s;
}
.orbit-word--4 {
  bottom: 18%;
  right: 14%;
  animation-delay: 0.6s;
}
.orbit-word--5 {
  top: 42%;
  right: 8%;
  animation-delay: 1.8s;
}

@keyframes float-word {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.hero-core {
  position: relative;
  z-index: 2;
  max-width: 860px;
  animation: hero-in 1s var(--ease) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-mark {
  margin: 0 auto 1rem;
  width: clamp(64px, 12vw, 88px);
  height: clamp(64px, 12vw, 88px);
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  border: 1px solid rgba(168, 230, 245, 0.35);
  box-shadow: 0 0 28px rgba(168, 230, 245, 0.28);
  animation: logo-breathe 5s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-brand {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(11, 20, 26, 0.85);
}

.hero-ticker {
  margin: 0.85rem 0 0;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
}

.hero-line {
  margin: 1.15rem auto 0;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 400;
}

.hero-ctas {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, color 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--cyan);
  color: #0b141a;
  box-shadow: 0 0 0 1px rgba(168, 230, 245, 0.2), 0 8px 32px rgba(126, 215, 245, 0.22);
}

.btn-primary:hover {
  background: #c5f2ff;
  box-shadow: 0 0 0 1px rgba(168, 230, 245, 0.35), 0 10px 36px rgba(126, 215, 245, 0.32);
}

.btn-ghost {
  background: rgba(168, 230, 245, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(168, 230, 245, 0.45);
  background: rgba(168, 230, 245, 0.1);
}

.btn-small {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
  background: rgba(168, 230, 245, 0.08);
  border: 1px solid var(--line);
  color: var(--cyan);
}

.btn-small:not(:disabled):hover {
  background: rgba(168, 230, 245, 0.16);
}

/* Sections */
.section {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

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

.section-inner.narrow {
  max-width: 720px;
}

.section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 40rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-head p {
  margin: 0.75rem 0 0;
  color: var(--text-muted); 
  font-size: 1.05rem;
}

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--cyan-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* CA */
.ca-section {
  padding-bottom: 2rem;
}

.ca-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ca-value {
  flex: 1 1 220px;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--cyan);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  word-break: break-all;
}

.ca-hint {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ca-hint code {
  color: var(--cyan-soft);
  font-size: 0.8em;
}

.ca-hint[hidden] {
  display: none;
}

/* Chart */
.chart-shell {
  position: relative;
  width: 100%;
  min-height: 560px;
  height: min(70vh, 720px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(8, 14, 18, 0.85);
}

.chart-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.chart-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(126, 215, 245, 0.12), transparent 55%),
    rgba(8, 14, 18, 0.92);
}

.chart-fallback p {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.chart-fallback-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.chart-shell.has-embed .chart-fallback {
  display: none;
}

/* Lore */
.lore-layout .section-head {
  margin-bottom: 1.5rem;
}

.lore-visual {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.lore-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 420px;
  object-position: center;
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.lore-block h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--cyan);
}

.lore-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Buy steps */
.buy-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.buy-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.buy-steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--cyan-muted);
  padding-top: 0.2rem;
}

.buy-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.buy-steps p {
  margin: 0;
  color: var(--text-muted);
}

.buy-cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Community */
.social-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(168, 230, 245, 0.03);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.social-link:hover {
  border-color: rgba(168, 230, 245, 0.45);
  background: rgba(168, 230, 245, 0.08);
  transform: translateY(-2px);
}

.social-link svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.social-link strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.social-link small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  padding: 3rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.footer-disclaimer,
.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 42rem;
}

.footer-copy {
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

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

  .orbit-word--5 {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(11, 20, 26, 0.96);
    backdrop-filter: blur(16px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a:not(.nav-icon) {
    padding: 0.85rem 1rem;
    border-radius: 10px;
  }

  .site-nav a:not(.nav-icon):hover {
    background: rgba(168, 230, 245, 0.06);
  }

  .nav-icon {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    height: auto;
  }

  .social-row {
    grid-template-columns: 1fr;
  }

  .chart-shell {
    min-height: 420px;
    height: 70vh;
  }

  .hero-orbit {
    inset: 4% 2%;
  }
}

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