/* ============================================
   $COSMOSCAT — A Tribute to Félicette
   The First Cat in Space (1963)
   ============================================ */

:root {
  --neon: #FFD700;
  --neon-glow: rgba(255, 215, 0, 0.4);
  --purple: #A855F7;
  --pink: #F43F5E;
  --cyan: #22D3EE;
  --dark: #030014;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; color: inherit; font-family: inherit; }

/* ---- 3D Canvas ---- */
#space {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

/* ---- Loader ---- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-ring {
  width: 80px;
  height: 80px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 6px;
  color: var(--neon);
}

.loader-percent {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

/* ---- HUD Nav ---- */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s, backdrop-filter 0.5s;
}

#hud.scrolled {
  background: rgba(3, 0, 20, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.hud-logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 20px var(--neon-glow);
}

.hud-center {
  display: flex;
  gap: 32px;
}

.hud-link {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.5;
  transition: opacity 0.3s, text-shadow 0.3s;
}

.hud-link:hover {
  opacity: 1;
  text-shadow: 0 0 12px var(--neon-glow);
}

.hud-btn {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid var(--neon);
  border-radius: 50px;
  color: var(--neon);
  transition: all 0.4s var(--ease);
}

.hud-btn:hover {
  background: var(--neon);
  color: var(--dark);
  box-shadow: 0 0 30px var(--neon-glow);
}

/* ---- Progress Bar ---- */
#progress-bar {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 99;
  background: rgba(255,255,255,0.05);
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--cyan), var(--purple));
  transition: width 0.1s;
}

/* ---- Panels / Sections ---- */
.panel {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 48px;
  overflow: hidden;
}

.panel-content {
  max-width: 1300px;
  width: 100%;
}

.panel-content.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.panel-content.two-col {
  display: flex;
  align-items: center;
  gap: 80px;
}

.panel-content.two-col.reverse {
  flex-direction: row-reverse;
}

.col-text { flex: 1; }
.col-visual {
  flex: 0 0 45%;
  position: relative;
}

.reveal-img {
  width: 100%;
  border-radius: 24px;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
}

/* ---- Typography ---- */
.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
  opacity: 0;
}

.section-h2 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 28px;
  opacity: 0;
}

.section-h2.center { text-align: center; }

.section-p {
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin-bottom: 16px;
  opacity: 0;
}

.section-p.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-p.muted { color: rgba(255,255,255,0.4); }

.section-p strong {
  color: var(--neon);
  font-weight: 600;
}

.glow-text {
  color: var(--neon);
  text-shadow: 0 0 40px var(--neon-glow), 0 0 80px rgba(255,215,0,0.15);
}

/* ---- Hero ---- */
#hero { padding-top: 100px; }

.hero-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-col-text { flex: 1; }
.hero-col-img {
  flex: 0 0 auto;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 8px 20px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 50px;
  background: rgba(34, 211, 238, 0.05);
  margin-bottom: 32px;
  opacity: 0;
}

.tag-pulse {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 28px;
}

.split-line {
  display: block;
  overflow: hidden;
}

.split-word {
  display: inline-block;
  transform: translateY(120%);
}

.hero-sub {
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin-bottom: 40px;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  opacity: 0;
}

.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 40px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--neon);
  color: var(--dark);
  border-radius: 60px;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-neon::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--neon), var(--cyan), var(--purple), var(--neon));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
  filter: blur(8px);
}

.btn-neon:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px var(--neon-glow);
}

.btn-neon:hover::before { opacity: 1; }

.btn-neon.big {
  padding: 20px 56px;
  font-size: 0.9rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 60px;
  color: #fff;
  transition: all 0.4s var(--ease);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
}

.hero-float {
  position: relative;
}

.hero-float::before {
  content: '';
  position: absolute;
  inset: -60px;
  background: radial-gradient(circle, var(--neon-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  to { transform: scale(1.15); opacity: 0.4; }
}

.hero-character {
  position: relative;
  width: 420px;
  max-width: 40vw;
  animation: heroFloat 5s ease-in-out infinite alternate;
  opacity: 0;
  transform: scale(0.7);
}

@keyframes heroFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
  100% { transform: translateY(-25px) rotate(-1deg); }
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--neon);
  border-bottom: 2px solid var(--neon);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 0.3; }
}

.scroll-hint span {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ---- Mission Stats ---- */
.mission-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  opacity: 0;
}

.m-stat { display: flex; flex-direction: column; }

.m-stat-val {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 20px var(--neon-glow);
}

.m-stat-lbl {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Token Grid ---- */
.token-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 48px 0;
  width: 100%;
}

.t-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.5s var(--ease);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}

.t-card:hover {
  transform: translateY(-6px) scale(1);
  border-color: var(--neon);
  box-shadow: 0 0 40px rgba(255,215,0,0.08), 0 20px 60px rgba(0,0,0,0.4);
}

.t-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--neon);
}

.t-card h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.t-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.contract-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 60px;
  margin-top: 8px;
  opacity: 0;
}

.contract-box span {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 2px;
}

.contract-box code {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.contract-box button {
  font-size: 1.1rem;
  color: var(--neon);
  transition: transform 0.3s;
}

.contract-box button:hover { transform: scale(1.3); }

/* ---- Social Buttons ---- */
.social-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  opacity: 0;
}

.s-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.4s var(--ease);
}

.s-btn.tg { background: #0088CC; }
.s-btn.tw { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.s-btn.ds { background: #5865F2; }

.s-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* ---- Finale ---- */
.finale-h2 {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 28px;
  opacity: 0;
}

/* ---- Footer ---- */
#footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 32px 48px;
}

.footer-row {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

.footer-socials {
  display: flex;
  gap: 16px;
  font-size: 1.3rem;
}

.footer-socials a {
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.footer-socials a:hover {
  opacity: 1;
  transform: scale(1.2);
  color: var(--neon);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .panel { padding: 100px 24px; }
  .hero-layout { flex-direction: column-reverse; text-align: center; gap: 28px; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-character { max-width: 50vw; width: 260px; }
  .panel-content.two-col,
  .panel-content.two-col.reverse { flex-direction: column; gap: 40px; }
  .col-visual { flex: auto; }
  .hud-center { display: none; }
  .token-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-row { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 640px) {
  .hero-h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero-actions { flex-direction: column; align-items: center; }
  .mission-stats { flex-direction: column; gap: 16px; }
  .token-grid { grid-template-columns: 1fr; }
  .social-row { flex-direction: column; align-items: stretch; }
  .s-btn { justify-content: center; }
}
