@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&display=swap');

/* ===================== polish layer (loaded last) ===================== */

/* display serif everywhere the old stack was used */
:root { --display: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif; }
.hero h1, .speech p, .speech .sign, .page-head h1, .lead-block h1,
.coin-head h1, .home-coins .hc-head h2, .howit h2, nav .brand {
  font-family: var(--display) !important;
}
.hero h1, .page-head h1, .lead-block h1, .coin-head h1, .howit h2, .home-coins .hc-head h2 { letter-spacing: -0.015em; }

/* starfield canvas sits between the image and the scrim */
body::before { z-index: -3 !important; }
#stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

/* gradient, glowing hero title */
.hero h1 {
  background: linear-gradient(180deg, #fff 0%, #ffe9c4 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 40px rgba(0,0,0,0.6)) drop-shadow(0 0 60px rgba(234,163,62,0.25));
}
.hero { animation: heroIn 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* sticky glass nav */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 8, 15, 0.55);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
  max-width: none; padding-left: max(22px, calc((100% - 1080px) / 2)); padding-right: max(22px, calc((100% - 1080px) / 2));
}
nav.scrolled { border-bottom-color: var(--line); }
nav .brand { font-weight: 600; font-size: 1.15rem; }

/* hero live stats */
.hero-stats { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.hero-stats .hs { text-align: center; }
.hero-stats .hs .v { font-size: 1.3rem; font-weight: 700; color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,0.8); font-variant-numeric: tabular-nums; }
.hero-stats .hs .k { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); margin-top: 3px; }
.hero-stats .sep { width: 1px; background: var(--line); align-self: stretch; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero { animation: none; }
  #stars { display: none; }
}

/* how it works */
.howit { position: relative; z-index: 2; padding: 20px 0 10px; }
.howit h2 { font-weight: 600; font-size: 1.6rem; margin: 0 0 6px; }
.howit .sub { color: var(--muted); margin: 0 0 24px; }
.howit .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.howit .card { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 20px; backdrop-filter: blur(12px); transition: transform 0.15s, border-color 0.15s; }
.howit .card:hover { transform: translateY(-3px); border-color: rgba(234,163,62,0.4); }
.howit .card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(234,163,62,0.14); border: 1px solid rgba(234,163,62,0.35); color: var(--gold-soft); font-size: 1.1rem; margin-bottom: 14px; }
.howit .card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--ink); }
.howit .card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* richer footer */
footer.big { background: linear-gradient(180deg, transparent, rgba(6,8,15,0.75)); border-top: 1px solid var(--line); margin-top: 70px; padding: 40px 0 54px; position: relative; z-index: 2; }
footer.big .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
footer.big .brandcol { max-width: 320px; }
footer.big .brandcol .logo { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
footer.big .brandcol .logo .dot { color: var(--gold); }
footer.big .brandcol p { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; line-height: 1.6; }
footer.big .lnk { display: flex; flex-direction: column; gap: 10px; }
footer.big .lnk a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
footer.big .lnk a:hover { color: var(--gold-soft); }
footer.big .lnk .h { color: var(--gold-soft); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
footer.big .base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
footer.big .base code { font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem; word-break: break-all; }

/* ===================== animated cosmic background ===================== */
/* retire the static hero image; rich space gradient base */
body { background: radial-gradient(140% 100% at 50% -8%, #121833 0%, #080b1a 46%, #04050c 100%) !important; }
body::before { display: none !important; }
/* gentler scrim: bright up top where the disk lives, dim toward the footer */
body::after {
  background:
    radial-gradient(130% 80% at 50% 12%, transparent 0%, rgba(4,5,12,0.22) 62%, rgba(4,5,12,0.62) 100%) !important;
}

#cosmos { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
#cosmos > div { position: absolute; will-change: transform, opacity; }

/* accretion disk: bright elliptical core, slow pulse + sway */
.c-disk {
  top: 19%; left: 50%; width: 132vw; height: 30vw; max-height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255,247,233,0.85), rgba(255,214,158,0.4) 38%, rgba(234,163,62,0.14) 60%, transparent 74%);
  border-radius: 50%; filter: blur(10px); opacity: 0.5; mix-blend-mode: screen;
  animation: diskPulse 10s ease-in-out infinite, diskSway 26s ease-in-out infinite;
}
/* spinning shimmer ring across the disk */
.c-ring {
  top: 19%; left: 50%; width: 122vw; height: 27vw; max-height: 330px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 6%, rgba(255,210,150,0.18) 12%, transparent 24% 50%, rgba(255,236,202,0.14) 62%, transparent 76% 100%);
  filter: blur(16px); opacity: 0.55; mix-blend-mode: screen;
  animation: ringSpin 54s linear infinite;
}
/* planet-horizon glow at the bottom, breathing */
.c-horizon {
  bottom: -42vw; left: 50%; width: 180vw; height: 92vw; max-height: 900px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150,190,255,0.22), rgba(90,130,220,0.1) 45%, transparent 70%);
  filter: blur(20px); opacity: 0.6; mix-blend-mode: screen;
  animation: horizonBreathe 14s ease-in-out infinite;
}
/* drifting nebula orbs */
.c-neb { width: 62vw; height: 62vw; max-width: 780px; max-height: 780px; border-radius: 50%; filter: blur(60px); mix-blend-mode: screen; opacity: 0.5; }
.c-neb.a { top: -12vw; left: -8vw; background: radial-gradient(closest-side, rgba(234,163,62,0.3), transparent 70%); animation: drift1 36s ease-in-out infinite; }
.c-neb.b { bottom: -8vw; right: -10vw; background: radial-gradient(closest-side, rgba(120,90,220,0.28), transparent 70%); animation: drift2 44s ease-in-out infinite; }

@keyframes diskPulse { 0%,100% { opacity: 0.42; } 50% { opacity: 0.62; } }
@keyframes diskSway { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-52%) scale(1.04); } }
@keyframes ringSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes horizonBreathe { 0%,100% { opacity: 0.5; } 50% { opacity: 0.72; } }
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(6vw,4vw); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-5vw,-4vw); } }

@media (prefers-reduced-motion: reduce) { #cosmos > div { animation: none !important; } }
