/* $HAIRCOIN - Chaotic maximalist memecoin landing */
:root {
  --orange-primary: #FF6B00;
  --orange-light: #FF8C00;
  --orange-dark: #CC5500;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.2);
  --star-glow: rgba(255, 255, 255, 0.9);
  --font-display: 'Bebas Neue', 'Anton', Impact, sans-serif;
  --font-body: 'Fredoka', 'Comic Neue', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--orange-light) url('main_character.png') center center / contain no-repeat fixed;
  background-color: var(--orange-light);
  color: #1a1a1a;
  overflow-x: hidden;
}

/* ========== LOADER ========== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  animation: loader-bounce 0.8s ease-in-out infinite;
}

.loader-text {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@keyframes loader-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

/* ========== STARS ========== */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.star {
  position: absolute;
  color: #FFFFFF;
  font-size: 1rem;
  animation: twinkle 2s ease-in-out infinite, float 5s ease-in-out infinite;
  opacity: 0.9;
  text-shadow: 0 0 6px #fff, 0 0 12px rgba(255,255,255,0.8);
  -webkit-text-fill-color: #FFFFFF;
}

.star--s { font-size: 0.6rem; opacity: 0.7; }
.star--m { font-size: 1rem; }
.star--l { font-size: 1.5rem; opacity: 1; }

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.star--m { animation-duration: 2.5s, 4s; }
.star--l { animation-duration: 2s, 6s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(8px, -15px); }
  50% { transform: translate(-5px, -25px); }
  75% { transform: translate(10px, -10px); }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2;
  padding-top: 12vh;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 1rem 4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 15vw, 7.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--white);
  text-shadow:
    3px 3px 0 var(--orange-dark),
    -1px -1px 0 rgba(0,0,0,0.2),
    0 0 30px rgba(255, 107, 0, 0.8);
  margin: 0 0 1.5rem;
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { text-shadow: 3px 3px 0 var(--orange-dark), -1px -1px 0 rgba(0,0,0,0.2), 0 0 25px rgba(255, 107, 0, 0.7); }
  50% { text-shadow: 3px 3px 0 var(--orange-dark), -1px -1px 0 rgba(0,0,0,0.2), 0 0 45px rgba(255, 107, 0, 1); }
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--orange-primary);
  background: var(--white);
  border: 4px solid var(--orange-primary);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.cta-button .cta-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.cta-button:hover {
  transform: scale(1.05);
  background: var(--orange-primary);
  color: var(--white);
}

/* Кликабельное лого Pump.fun под заголовком (на 5 см ниже) */
.pump-logo-link {
  display: inline-block;
  margin-top: 5cm;
  transform: translate(5%, 8%);
  text-decoration: none;
  transition: transform 0.25s ease;
}

.pump-logo-link:hover {
  transform: translate(5%, 8%) scale(1.08);
}

.pump-logo-link:focus {
  outline: 3px solid var(--white);
  outline-offset: 4px;
  border-radius: 8px;
}

.pump-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(140px, 28vw);
  max-height: 140px;
}

.cta-button:focus {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

/* ========== SOCIAL BAR ========== */
.social-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
  padding: 0.5rem;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange-primary);
  color: var(--white);
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
  border: 2px solid var(--orange-dark);
}

.social-link:hover {
  transform: scale(1.15) rotate(8deg);
  background: var(--orange-dark);
}

.social-link:focus {
  outline: 3px solid var(--orange-dark);
  outline-offset: 3px;
}

.social-link .social-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .social-link .social-icon {
    width: 32px;
    height: 32px;
  }
}

/* ========== MEME GALLERY ========== */
.meme-gallery {
  position: relative;
  z-index: 2;
  padding: 4rem 1rem 5rem;
  background: rgba(255, 140, 0, 0.25);
}

.gallery-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  text-align: center;
  color: var(--white);
  margin: 0 0 2rem;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.meme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.meme-card {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), 0 0 0 2px var(--orange-dark);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: meme-fade-in 0.6s ease backwards;
}

.meme-card:nth-child(1) { animation-delay: 0.05s; transform: rotate(-3deg); }
.meme-card:nth-child(2) { animation-delay: 0.1s; transform: rotate(4deg); }
.meme-card:nth-child(3) { animation-delay: 0.15s; transform: rotate(-2deg); }
.meme-card:nth-child(4) { animation-delay: 0.2s; transform: rotate(2deg); }
.meme-card:nth-child(5) { animation-delay: 0.25s; transform: rotate(-4deg); }
.meme-card:nth-child(6) { animation-delay: 0.3s; transform: rotate(1deg); }
.meme-card:nth-child(7) { animation-delay: 0.35s; transform: rotate(3deg); }
.meme-card:nth-child(8) { animation-delay: 0.4s; transform: rotate(-1deg); }
.meme-card:nth-child(9) { animation-delay: 0.45s; transform: rotate(2deg); }

.meme-card:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,0.3), 0 0 0 3px var(--orange-primary);
}

.meme-card:nth-child(1):hover { transform: rotate(-3deg) scale(1.04); }
.meme-card:nth-child(2):hover { transform: rotate(4deg) scale(1.04); }
.meme-card:nth-child(3):hover { transform: rotate(-2deg) scale(1.04); }
.meme-card:nth-child(4):hover { transform: rotate(2deg) scale(1.04); }
.meme-card:nth-child(5):hover { transform: rotate(-4deg) scale(1.04); }
.meme-card:nth-child(6):hover { transform: rotate(1deg) scale(1.04); }
.meme-card:nth-child(7):hover { transform: rotate(3deg) scale(1.04); }
.meme-card:nth-child(8):hover { transform: rotate(-1deg) scale(1.04); }
.meme-card:nth-child(9):hover { transform: rotate(2deg) scale(1.04); }

.meme-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(380px, 90vw);
  max-height: 380px;
  object-fit: cover;
  object-position: center;
  vertical-align: bottom;
}

@keyframes meme-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  color: var(--white);
  background: var(--orange-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
  z-index: 101;
}

.lightbox-close:hover {
  background: var(--orange-dark);
  transform: scale(1.1);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(255, 107, 0, 0.4);
}

/* ========== FOOTER ========== */
.footer {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
  text-align: center;
  background: rgba(204, 85, 0, 0.75);
  color: var(--white);
  font-size: 0.95rem;
}

.footer p {
  margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
  .hero-title {
    font-size: clamp(4.5rem, 10vw, 6rem);
  }
  .social-bar {
    bottom: 2rem;
    gap: 1.25rem;
  }
  .social-link {
    width: 64px;
    height: 64px;
    font-size: 1.75rem;
  }
  .meme-grid {
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: clamp(5rem, 8vw, 7.5rem);
  }
  .social-bar {
    left: 2rem;
    bottom: 50%;
    transform: translateY(50%);
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star,
  .hero-title,
  .cta-button,
  .social-link,
  .meme-card {
    animation: none;
  }
  .meme-card:hover {
    transform: scale(1.02);
  }
}
