/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  --bg-dark: #08080f;
  --bg-card: rgba(16, 16, 30, 0.8);
  --bg-card-hover: rgba(22, 22, 42, 0.9);
  --accent-primary: #e94560;
  --accent-secondary: #533483;
  --gold: #f5c518;
  --gold-soft: #ffd97d;
  --text-primary: #ffffff;
  --text-secondary: #7a7a8e;
  --text-dim: #3e3e50;
  --tancel-accent: #D4642A;
  --tancel-bone: #e8e4df;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.14);
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-display: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
  --font-axie: 'Rowdies', 'Inter', system-ui, sans-serif;
  --font-accent: 'Playfair Display', 'Georgia', serif;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font-display);
  background: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

/* ── Noise ─────────────────────────────────────────────────────── */
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Dot Grid ──────────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 5%, transparent 50%);
  -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 50%, black 5%, transparent 50%);
}

/* ── Center Light Cone ─────────────────────────────────────────── */
.center-light {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.04) 0%, rgba(83, 52, 131, 0.02) 30%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ── Glow Orbs ─────────────────────────────────────────────────── */
.glow-orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }

.glow-1 {
  width: 900px; height: 900px; top: -30%; left: 15%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 55%);
  filter: blur(100px);
  animation: glowPulse 8s ease-in-out infinite;
}
.glow-2 {
  width: 700px; height: 700px; bottom: -25%; right: -10%;
  background: radial-gradient(circle, rgba(83, 52, 131, 0.12) 0%, transparent 50%);
  filter: blur(120px);
  animation: glowPulse 10s ease-in-out 2s infinite;
}
.glow-3 {
  width: 500px; height: 500px; top: 30%; left: -10%;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.15) 0%, transparent 50%);
  filter: blur(100px);
  animation: glowPulse 12s ease-in-out 4s infinite;
}
.glow-4 {
  width: 400px; height: 400px; top: 10%; right: 15%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.04) 0%, transparent 50%);
  filter: blur(120px);
  animation: glowPulse 9s ease-in-out 1s infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.08); }
}

/* ── Floating Energy Particles ─────────────────────────────────── */
.particles { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleDrift var(--p-duration, 20s) linear var(--p-delay, 0s) infinite;
  opacity: 0;
}

@keyframes particleDrift {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: var(--p-opacity, 0.4); }
  90% { opacity: var(--p-opacity, 0.4); }
  100% { transform: translate(var(--p-dx, 100px), var(--p-dy, -800px)); opacity: 0; }
}

/* ── Axie Logo Watermark ──────────────────────────────────────── */

/* ── Header ────────────────────────────────────────────────────── */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 36px;
  animation: fadeIn 1s ease 0.2s both;
  background: linear-gradient(180deg, rgba(8, 8, 15, 0.9) 0%, rgba(8, 8, 15, 0.6) 60%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.brand-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; gap: 2px;
  padding: 5px 11px;
  background: rgba(212, 100, 42, 0.06);
  border: 1px solid rgba(212, 100, 42, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.brand-bracket { color: var(--tancel-accent); font-weight: 800; }
.brand-letters { color: var(--tancel-bone); }
.brand-domain { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); opacity: 0.4; }

/* ── Scene ─────────────────────────────────────────────────────── */
.scene {
  position: relative; z-index: 1;
  width: 100vw; height: 100vh; overflow: hidden;
}

/* ── Decorations (floating shapes) ─────────────────────────────── */
.decorations { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

.deco {
  position: absolute;
  opacity: 0;
  animation: decoFadeIn 1.5s ease var(--deco-delay, 0s) forwards;
  will-change: transform;
}

/* Floating icon decorations (class icons, runes, charms) */
.deco-icon {
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(233,69,96,0.2));
  animation: decoIconFloat 6s ease-in-out var(--deco-delay, 0s) infinite;
  pointer-events: none;
}

.deco-icon img { width: 100%; height: 100%; object-fit: contain; }

@keyframes decoIconFloat {
  0%, 100% { opacity: 0.12; filter: drop-shadow(0 0 4px rgba(233,69,96,0.15)); }
  50% { opacity: 0.25; filter: drop-shadow(0 0 10px rgba(83,52,131,0.3)); }
}

/* Floating Axie character renders */
.deco-axie {
  opacity: 0;
  filter: blur(0.5px) drop-shadow(0 0 15px rgba(233, 69, 96, 0.2));
  animation: decoAxiePulse 8s ease-in-out var(--deco-delay, 0s) infinite;
  pointer-events: none;
}

.deco-axie img { width: 100%; height: 100%; object-fit: contain; }

@keyframes decoAxiePulse {
  0%, 100% { opacity: 0.08; filter: blur(0.5px) drop-shadow(0 0 15px rgba(233, 69, 96, 0.2)); }
  50% { opacity: 0.15; filter: blur(0px) drop-shadow(0 0 25px rgba(83, 52, 131, 0.3)); }
}

/* ── Hero Center ───────────────────────────────────────────────── */
.hero-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; z-index: 10; pointer-events: none;
  padding: 40px 60px;
}

/* Soft radial fade behind hero — tight to text, no hard edges */
.hero-center::before {
  content: '';
  position: absolute; inset: -20px -30px;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(8, 8, 15, 0.7) 0%, rgba(8, 8, 15, 0.3) 50%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

.hero-logo {
  width: 160px; height: auto;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.8s ease 0.4s both;
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(233, 69, 96, 0.15));
}

.hero-title { animation: fadeSlideUp 0.8s ease 0.5s both; }

.hero-line-1 {
  display: block;
  font-family: var(--font-axie);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  color: var(--text-primary); line-height: 1.15;
}

.hero-line-2 {
  display: block;
  font-family: var(--font-axie);
  font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: 0.02em;
  color: var(--text-primary); line-height: 1; margin-top: 2px;
}

.hero-line-2 em {
  font-family: var(--font-axie);
  font-style: normal; font-weight: 300;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.9rem; color: var(--text-dim);
  margin-top: 16px; letter-spacing: 0.02em; font-weight: 400;
  animation: fadeSlideUp 0.8s ease 0.65s both;
}

.hero-count {
  margin-top: 20px;
  animation: fadeSlideUp 0.8s ease 0.8s both;
}

.hero-count-inner {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 5px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 20px;
}

.hero-count-num {
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

/* ── Floating Cards Container ──────────────────────────────────── */
.floating-cards { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* ── Card ──────────────────────────────────────────────────────── */
.float-card {
  position: absolute;
  pointer-events: auto;
  text-decoration: none;
  color: var(--text-primary);
  transform-style: preserve-3d;
  transition: box-shadow 0.5s ease, filter 0.4s ease;
  cursor: pointer;
  animation: cardFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--enter-delay, 0s) both;
  will-change: transform;
}

.float-card:hover {
  z-index: 20 !important;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 40px color-mix(in srgb, var(--card-accent, var(--accent-primary)) 10%, transparent);
  filter: brightness(1.12);
}

/* Glass body */
.float-card-inner {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.4s ease, background 0.4s ease;
  position: relative;
}

.float-card:hover .float-card-inner {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* Accent glow line on hover */
.float-card-inner::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent-primary)), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.float-card:hover .float-card-inner::after { opacity: 0.7; }

/* ── Card: Preview Banner ──────────────────────────────────────── */
.card-preview {
  height: 80px;
  position: relative;
  overflow: hidden;
}

.card-preview-bg {
  position: absolute; inset: 0;
  opacity: 0.55;
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.float-card:hover .card-preview-bg {
  opacity: 0.75;
  transform: scale(1.05);
}

/* Gradient fade at bottom of preview */
.card-preview::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(transparent, rgba(16, 16, 30, 0.95));
}

/* Preview icon overlay */
.card-preview-icon {
  position: absolute;
  bottom: 10px; left: 16px;
  font-size: 1.6rem;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Card: Title Bar ───────────────────────────────────────────── */
.card-titlebar {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.card-dot { width: 6px; height: 6px; border-radius: 50%; }
.card-dot:nth-child(1) { background: #ef6461; opacity: 0.6; }
.card-dot:nth-child(2) { background: #f0c040; opacity: 0.6; }
.card-dot:nth-child(3) { background: #3dd68c; opacity: 0.6; }

.card-titlebar-label {
  font-size: 0.55rem; color: var(--text-dim);
  margin-left: 5px; letter-spacing: 0.02em; font-weight: 500;
}

/* ── Card: Content ─────────────────────────────────────────────── */
.card-content {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 5px;
}

.card-badge {
  font-weight: 700; font-size: 0.52rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--card-accent, var(--accent-primary));
  padding: 2px 7px;
  background: color-mix(in srgb, var(--card-accent, var(--accent-primary)) 12%, transparent);
  border-radius: 4px; width: fit-content;
}

.card-name {
  font-weight: 700; font-size: 0.88rem;
  letter-spacing: -0.01em; line-height: 1.3;
  margin-top: 2px;
}

.card-desc {
  font-size: 0.72rem; color: var(--text-secondary);
  line-height: 1.5;
}

.card-link-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.card-domain {
  font-size: 0.6rem; color: var(--text-dim);
  font-weight: 500; transition: color 0.3s;
}
.float-card:hover .card-domain { color: var(--text-secondary); }

.card-go {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  transition: all 0.35s ease;
}

.float-card:hover .card-go {
  background: rgba(233,69,96,0.1);
  border-color: rgba(233,69,96,0.25);
  color: var(--accent-primary);
  transform: translate(2px, -2px);
}

/* ── Card Variants ─────────────────────────────────────────────── */

/* Featured — larger, with bigger preview */
.float-card.card-featured { width: 300px; }
.float-card.card-featured .card-preview { height: 100px; }
.float-card.card-featured .card-preview-icon { font-size: 2rem; bottom: 12px; }
.float-card.card-featured .card-name { font-size: 1rem; }
.float-card.card-featured .card-content { padding: 16px 18px 18px; }

/* Standard */
.float-card.card-standard { width: 250px; }

/* Compact — minimal, for many cards */
.float-card.card-compact { width: 200px; }
.float-card.card-compact .card-preview { height: 50px; }
.float-card.card-compact .card-preview-icon { font-size: 1.2rem; bottom: 6px; left: 12px; }
.float-card.card-compact .card-content { padding: 10px 12px 12px; gap: 3px; }
.float-card.card-compact .card-name { font-size: 0.78rem; }
.float-card.card-compact .card-desc { display: none; }
.float-card.card-compact .card-link-row { display: none; }

/* ── Depth blur for distant cards ──────────────────────────────── */
.float-card[data-depth="far"] {
  filter: blur(1.5px) brightness(0.7);
  opacity: 0.6;
  z-index: 1;
}
.float-card[data-depth="far"]:hover {
  filter: brightness(1.1) blur(0) !important;
  opacity: 1;
}
.float-card[data-depth="mid"] {
  z-index: 5;
}
.float-card[data-depth="near"] {
  z-index: 10;
}

/* ── Browser Modal ─────────────────────────────────────────────── */
.browser-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 4, 10, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

.browser-overlay.active {
  opacity: 1; pointer-events: auto;
}

.browser-modal {
  width: 92vw; max-width: 1600px;
  height: 88vh;
  display: flex; flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 80px rgba(233,69,96,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.browser-overlay.active .browser-modal {
  transform: scale(1) translateY(0);
}

/* Chrome bar */
.browser-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #141420;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.browser-dots { display: flex; gap: 7px; align-items: center; }

.browser-dot-btn,
.browser-dot-yellow,
.browser-dot-green {
  width: 12px; height: 12px; border-radius: 50%; border: none; cursor: default;
}

.browser-dot-btn {
  background: #ef6461; cursor: pointer;
  transition: filter 0.2s;
}
.browser-dot-btn:hover { filter: brightness(1.3); }
.browser-dot-yellow { background: #f0c040; }
.browser-dot-green { background: #3dd68c; }

.browser-url-bar {
  flex: 1;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-open-tab {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.browser-open-tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* Body */
.browser-body {
  flex: 1; position: relative;
  background: #0a0a14;
}

.browser-frame {
  width: 100%; height: 100%;
  border: none; background: #0a0a14;
}

/* Loading state */
.browser-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: #0a0a14;
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: opacity 0.3s;
}

.browser-loading.hidden { opacity: 0; pointer-events: none; }

.browser-spinner {
  width: 28px; height: 28px;
  border: 2px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error state */
.browser-error {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: #0a0a14;
  text-align: center;
  padding: 24px;
}

.browser-error.active { display: flex; }
.browser-error-icon { font-size: 2.5rem; }
.browser-error-title { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.browser-error-desc { font-size: 0.85rem; color: var(--text-secondary); }

.browser-error-btn {
  margin-top: 8px;
  padding: 8px 20px;
  background: var(--accent-primary);
  color: white; text-decoration: none;
  border-radius: 8px;
  font-size: 0.8rem; font-weight: 600;
  transition: filter 0.2s;
}
.browser-error-btn:hover { filter: brightness(1.15); }

/* Mobile modal */
@media (max-width: 900px) {
  .browser-modal { width: 95vw; height: 85vh; border-radius: 10px; }
  .browser-chrome { padding: 10px 12px; }
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes cardFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes decoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  html, body { overflow: auto; height: auto; }
  .scene { height: auto; min-height: 100vh; padding-bottom: 60px; }
  .center-light { display: none; }

  .hero-center {
    position: relative; top: auto; left: auto;
    transform: none; padding: 100px 24px 40px; text-align: left;
  }

  .floating-cards {
    position: relative;
    display: flex; flex-direction: column; gap: 16px;
    padding: 0 24px 40px;
  }

  .float-card {
    position: relative !important;
    width: 100% !important;
    left: auto !important; top: auto !important;
    right: auto !important; bottom: auto !important;
    transform: none !important;
    animation: fadeSlideUp 0.5s ease both !important;
    filter: none !important; opacity: 1 !important;
  }
  .float-card[data-depth] { filter: none !important; opacity: 1 !important; }
  .float-card:hover { transform: translateY(-4px) !important; }

  .hero-center::before { display: none; }

  .float-card.card-compact .card-desc { display: block; }
  .float-card.card-compact .card-link-row { display: flex; }
  .float-card.card-compact { width: 100% !important; }

  .decorations { display: none; }
  .glow-1 { width: 500px; height: 500px; top: -20%; left: -10%; }
  .glow-2 { width: 400px; height: 400px; }
  .glow-4 { display: none; }
}
