/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0b1e;
  --bg2: #16102e;
  --purple: #7b61ff;
  --purple-light: #a78bfa;
  --pink: #ec4899;
  --text: #e8eaf0;
  --text-dim: #9898b0;
  --card-bg: rgba(30, 24, 60, 0.85);
  --card-border: rgba(123, 97, 255, 0.25);
}

body {
  font-family: 'SN Pro', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem 4rem;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(123,97,255,0.15) 0%, transparent 60%);
}

.hero__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__stars .star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-size: clamp(4rem, 7vw, 7.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(123,97,255,0.3);
  color: #6aff07;
}

.accent {
  background: linear-gradient(135deg, #7b61ff, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== SOCK PAIR ===== */
.sock-pair {
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.sock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sock {
  width: 100px;
  height: 170px;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.sock-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--purple-light);
  letter-spacing: 0.05em;
}

/* ===== VANISH ANIMATION ===== */
.sock--left.vanishing {
  animation: sockVanish 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sockVanish {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0) brightness(1);
  }
  20% {
    transform: scale(1.1) rotate(-5deg);
    filter: brightness(1.5);
  }
  40% {
    transform: scale(1.05) rotate(3deg) translateY(-10px);
    filter: brightness(2) hue-rotate(30deg);
  }
  60% {
    transform: scale(0.9) rotate(-8deg) translateY(-30px);
    filter: blur(2px) brightness(2.5) hue-rotate(90deg);
    opacity: 0.7;
  }
  80% {
    transform: scale(0.5) rotate(15deg) translateY(-60px);
    filter: blur(6px) brightness(3) hue-rotate(180deg);
    opacity: 0.3;
  }
  100% {
    transform: scale(0) rotate(45deg) translateY(-100px);
    filter: blur(20px) brightness(5) hue-rotate(360deg);
    opacity: 0;
  }
}

/* Particles */
.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFly 1.2s cubic-bezier(0.2, 0, 0.3, 1) forwards;
}

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

/* After vanish - right sock sad */
.sock--right.sad {
  animation: sockSad 1s ease 2s forwards;
}

@keyframes sockSad {
  0% { transform: scale(1); filter: none; }
  50% { transform: scale(1.05); filter: brightness(0.7) grayscale(0.3); }
  100% { transform: scale(0.95); filter: brightness(0.6) grayscale(0.5); }
}

/* ===== BUTTON ===== */
.btn-magic {
  position: relative;
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 25px rgba(123,97,255,0.4);
}

.btn-magic:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 35px rgba(123,97,255,0.6);
}

.btn-magic:active {
  transform: scale(0.98);
}

.btn-magic.used {
  background: linear-gradient(135deg, #4a4a5a, #6a6a7a);
  cursor: default;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.btn-magic.used:hover {
  transform: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== STORIES / TIMELINE ===== */
.stories {
  padding: 5rem 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--purple-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--purple), var(--pink), transparent);
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideIn 0.6s ease forwards;
}

.timeline__item:nth-child(1) { animation-delay: 0.1s; }
.timeline__item:nth-child(2) { animation-delay: 0.2s; }
.timeline__item:nth-child(3) { animation-delay: 0.3s; }
.timeline__item:nth-child(4) { animation-delay: 0.4s; }
.timeline__item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}

.timeline__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 50%;
  z-index: 1;
}

.timeline__card {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(123,97,255,0.15);
}

.timeline__card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--purple-light);
}

.timeline__card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== GALLERY ===== */
.gallery {
  padding: 5rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery__card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  transition: transform 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.gallery__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(123,97,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.gallery__card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 12px 40px rgba(123,97,255,0.2);
}

.gallery__sock {
  width: 100px;
  height: 170px;
  margin: 0 auto 1rem;
  animation: float 4s ease-in-out infinite;
}

.gallery__card:nth-child(2) .gallery__sock { animation-delay: -0.5s; }
.gallery__card:nth-child(3) .gallery__sock { animation-delay: -1s; }
.gallery__card:nth-child(4) .gallery__sock { animation-delay: -1.5s; }
.gallery__card:nth-child(5) .gallery__sock { animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(2deg); }
  75% { transform: translateY(5px) rotate(-2deg); }
}

.gallery__name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.gallery__fate {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

.gallery__card--mystery {
  border-style: dashed;
  border-color: rgba(167,139,250,0.4);
}

.gallery__sock--ghost {
  animation: ghostFloat 3s ease-in-out infinite, glowPulse 2s ease-in-out infinite alternate;
}

@keyframes ghostFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-12px) rotate(5deg); opacity: 0.4; }
}

@keyframes glowPulse {
  0% { filter: drop-shadow(0 0 5px rgba(167,139,250,0.3)); }
  100% { filter: drop-shadow(0 0 20px rgba(167,139,250,0.7)); }
}

/* ===== STATS ===== */
.stats {
  padding: 5rem 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stats__card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s;
}

.stats__card:hover {
  transform: scale(1.03);
}

.stats__number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stats__label {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== FINAL ===== */
.final {
  padding: 6rem 1.25rem 4rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(123,97,255,0.1) 0%, transparent 50%);
}

.final__sock {
  width: 120px;
  margin: 0 auto 2rem;
}

.sock--floating {
  width: 120px;
  height: 200px;
  animation: floatHero 5s ease-in-out infinite;
}

@keyframes floatHero {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(3deg); }
  50% { transform: translateY(-5px) rotate(-2deg); }
  75% { transform: translateY(-20px) rotate(2deg); }
}

.final__title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text);
}

.final__text {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.final__whisper {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--purple-light);
  opacity: 0;
  animation: whisperIn 1s ease 3s forwards;
}

@keyframes whisperIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(123,97,255,0.1);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .sock-pair { gap: 1.5rem; }
  .sock { width: 80px; height: 140px; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .gallery__sock { width: 80px; height: 140px; }
  .timeline::before { left: 22px; }
  .timeline__icon { width: 44px; height: 44px; font-size: 1.2rem; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
}
