/* =========================================================
   HYPE MACHINE — styles.css
   Dark OLED + Glassmorphism + Gradient Mesh
   Design tokens: purple #A855F7 | pink #EC4899 | cyan #06B6D4
   ========================================================= */

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

:root {
  /* Colors */
  --bg:           #0A0A0F;
  --bg-card:      rgba(255, 255, 255, 0.04);
  --bg-card-hover:rgba(255, 255, 255, 0.07);
  --border:       rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.4);

  --purple:       #A855F7;
  --purple-dim:   rgba(168, 85, 247, 0.15);
  --pink:         #EC4899;
  --pink-dim:     rgba(236, 72, 153, 0.15);
  --cyan:         #06B6D4;
  --cyan-dim:     rgba(6, 182, 212, 0.15);

  --text-primary:   #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;

  /* Glow */
  --glow-purple: 0 0 30px rgba(168, 85, 247, 0.35);
  --glow-pink:   0 0 30px rgba(236, 72, 153, 0.35);
  --glow-cyan:   0 0 30px rgba(6, 182, 212, 0.35);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Z-index scale */
  --z-bg:      -1;
  --z-base:    1;
  --z-card:    10;
  --z-overlay: 20;
  --z-header:  30;
  --z-tooltip: 50;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
               'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Cascadia Code',
               'Consolas', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

/* ─── Visually Hidden (a11y) ─────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Background Mesh ────────────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  overflow: hidden;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
  opacity: 0.55;
}

.mesh-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #A855F7 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: orb-float-1 18s ease-in-out infinite;
}

.mesh-orb--2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: orb-float-2 22s ease-in-out infinite;
}

.mesh-orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #06B6D4 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation: orb-float-3 16s ease-in-out infinite;
  opacity: 0.3;
}

.scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 2px,
    rgba(255, 255, 255, 0.012) 4px
  );
  pointer-events: none;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, 40px) scale(1.08); }
  66%       { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-80px, -50px) scale(1.1); }
  66%       { transform: translate(40px, -90px) scale(0.92); }
}

@keyframes orb-float-3 {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%       { transform: translateX(-50%) scale(1.15); }
}

/* ─── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding: var(--space-md) 0;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.logo:hover,
.logo:focus-visible {
  color: var(--text-primary);
  outline: 2px solid var(--purple);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: var(--space-lg);
  padding: 6px 14px;
  background: var(--purple-dim);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-full);
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.gradient-text {
  background: linear-gradient(135deg, #A855F7 0%, #EC4899 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease-in-out infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ─── Sections ───────────────────────────────────────────── */
.section {
  padding: var(--space-xl) 0;
}

.section--stats {
  padding: var(--space-lg) 0 var(--space-3xl);
}

/* ─── Cards Grid ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

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

/* ─── Glass Card ─────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background var(--transition-normal);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 50%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
}

.card--hype:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-purple), inset 0 1px 0 rgba(168, 85, 247, 0.1);
  background: rgba(168, 85, 247, 0.05);
}

.card--countdown:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: var(--glow-cyan), inset 0 1px 0 rgba(6, 182, 212, 0.1);
  background: rgba(6, 182, 212, 0.04);
}

/* ─── Card Header ────────────────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.card-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

.card-icon--cyan {
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ─── Hype Counter ───────────────────────────────────────── */
.counter-display {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.counter-number {
  display: block;
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-fast);
  will-change: transform;
}

.counter-number.bump {
  animation: counter-bump 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes counter-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.counter-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ─── Particles ──────────────────────────────────────────── */
.particles-host {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-fly var(--dur, 600ms) ease-out forwards;
}

@keyframes particle-fly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ─── Hype Button ────────────────────────────────────────── */
.hype-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 16px;
  min-height: 52px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #A855F7, #EC4899);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              filter var(--transition-fast);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4),
              0 0 0 0 rgba(168, 85, 247, 0.2);
}

.hype-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.6),
              0 4px 15px rgba(236, 72, 153, 0.3);
  filter: brightness(1.1);
}

.hype-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
  filter: brightness(0.95);
}

.hype-btn:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

.hype-btn__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hype-btn__ripple {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%),
    rgba(255,255,255,0.25) 0%,
    transparent 60%);
  opacity: 0;
  transition: opacity 400ms ease;
}

.hype-btn.rippling .hype-btn__ripple {
  opacity: 1;
  transition: opacity 0ms;
}

.hype-btn.rippling:not(:active) .hype-btn__ripple {
  opacity: 0;
  transition: opacity 600ms ease;
}

/* ─── Counter Meta ───────────────────────────────────────── */
.counter-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.meta-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.meta-stat__value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.meta-stat__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
  white-space: nowrap;
}

.reset-btn:hover {
  color: var(--pink);
  border-color: rgba(236, 72, 153, 0.4);
  background: var(--pink-dim);
}

.reset-btn:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* ─── Countdown ──────────────────────────────────────────── */
.countdown-event-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--space-xl);
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--space-xl);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
}

.countdown-value {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 56px;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  will-change: transform;
}

.countdown-value.tick {
  animation: cd-tick 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cd-tick {
  0%   { transform: scaleY(1); }
  30%  { transform: scaleY(0.85); }
  100% { transform: scaleY(1); }
}

.countdown-unit-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-sep {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(6, 182, 212, 0.4);
  margin-bottom: 18px;
  line-height: 1;
  align-self: center;
}

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-bar-wrap {
  height: 4px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #818CF8);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1s linear;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.progress-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  letter-spacing: 0.04em;
  min-height: 16px;
}

/* ─── Stats Row ──────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: border-color var(--transition-normal),
              background var(--transition-normal);
}

.stat-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  background: var(--bg-card-hover);
}

.stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--purple-dim);
}

.stat-card__value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-card__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  background: rgba(10, 10, 15, 0.5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-tech {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
  letter-spacing: 0.04em;
}

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

  .mesh-orb {
    animation: none;
  }

  .gradient-text {
    animation: none;
    background-position: 0% 50%;
  }

  .counter-number.bump,
  .countdown-value.tick {
    animation: none;
  }
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.7);
}

/* ─── Focus Ring (global) ────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Selection ──────────────────────────────────────────── */
::selection {
  background: rgba(168, 85, 247, 0.35);
  color: var(--text-primary);
}
