/* ============================================================
   MEF — Meme Economy Fund
   Paleta tomada del diseño original
   ============================================================ */
:root {
  --ink: #171512;            /* bandas oscuras header/footer */
  --ink-soft: #211e1a;
  --steel: #ccff00;          /* lime del hero */
  --steel-deep: #b3e600;
  --pink: #7c3aed;           /* acento violeta (complementario del lime) */
  --pink-deep: #6d28d9;
  --cream: #e8d5b0;          /* texto tan/crema */
  --cream-soft: #f0e3c8;
  --teal: #2fd6c0;           /* acentos, LIVE, visualizador */
  --teal-deep: #17b3a0;
  --orange: #f0532d;         /* barra de progreso */
  --screen: #14222c;         /* fondo de pantalla del player */
  --white: #f5f1e8;

  --font-display: "Anton", sans-serif;
  --font-body: "Oswald", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

/* Textura de ruido sutil reutilizable */
.hero-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ============ BOTONES ============ */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.65em 1.6em;
  border-radius: 8px;
  display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-teal {
  background: var(--teal);
  color: #0d2b26;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.btn-teal:hover { background: #43e6d1; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); }

.btn-pink {
  background: var(--pink);
  color: #fff7ef;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.btn-pink:hover { background: var(--pink-deep); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); }

/* ============ HEADER ============ */
.site-header {
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.5rem, 4vw, 4rem);
  position: relative;
  z-index: 20;
}

.brand { display: flex; flex-direction: column; gap: 0.35rem; }
.brand-logo { height: 58px; width: auto; }
.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--cream);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--white);
}
.site-nav a:not(.btn) { position: relative; padding: 0.3em 0; }
.site-nav a:not(.btn):not(.nav-live)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-live {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(47, 214, 192, 0.55);
  animation: live-pulse 2.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 12px rgba(47, 214, 192, 0.55); }
  50% { opacity: 0.75; text-shadow: 0 0 22px rgba(47, 214, 192, 0.85); }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 55% 30%, rgba(255, 255, 255, 0.07), transparent 55%),
    var(--steel);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 1.3fr) minmax(300px, 0.95fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: clamp(1.2rem, 2vw, 2rem) clamp(1.5rem, 4vw, 4.5rem) clamp(1.2rem, 2vw, 2rem);
  /* La altura la define el contenido, no la pantalla */
}

/* --- Columna izquierda --- */
.hero-left { position: relative; z-index: 5; align-self: center; }

.hero-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--pink);
  font-size: clamp(3rem, 6.2vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  /* Contorno blanco alrededor de las letras */
  -webkit-text-stroke: 2px var(--white);
  paint-order: stroke fill;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.18);
  margin-bottom: 1.2rem;
}
.hero-title span {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.hero-title span:nth-child(1) { animation-delay: 0.05s; }
.hero-title span:nth-child(2) { animation-delay: 0.15s; }
.hero-title span:nth-child(3) { animation-delay: 0.25s; }
.hero-title span:nth-child(4) { animation-delay: 0.35s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  line-height: 1.25;
  max-width: 30ch;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: rise 0.55s ease 0.5s forwards;
}

.hero-copy {
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.7;
  max-width: 42ch;
  opacity: 0;
  animation: rise 0.55s ease 0.65s forwards;
}

/* --- Chica central --- */
.hero-girl {
  position: relative;
  z-index: 8;
  align-self: end;
  /* Cancela el padding inferior del hero: los pies quedan al ras de la división negra */
  margin-bottom: calc(-1 * clamp(1.2rem, 2vw, 2rem));
  opacity: 0;
  animation: girl-in 0.8s ease 0.3s forwards;
}
.hero-girl img {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.3));
}
@keyframes girl-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Columna derecha --- */
.hero-right {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 1.4rem;
  align-self: center;
}

.hero-right-title,
.hero-right-claim {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.2;
  max-width: 22ch;
  text-shadow: none;
}

/* ============ REPRODUCTOR ============ */
.player {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 545 / 315; /* proporción del marco */
  opacity: 0;
  animation: rise 0.6s ease 0.55s forwards;
}

/* El marco (imagen con centro transparente) va ENCIMA y no captura clics */
.player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* La pantalla vive debajo del marco; los % calzan con la ventana del marco */
.player-screen {
  position: absolute;
  /* ventana interior del marco: ajusta estos 4 valores si tu PNG difiere */
  top: 9%; bottom: 12%; left: 13%; right: 13%;
  background: var(--screen);
  overflow: hidden;
  z-index: 1;
}

#visualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Botón central play/pause */
.player-toggle {
  position: absolute;
  top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  aspect-ratio: 1;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, opacity 0.3s ease;
}
.player-toggle:hover { transform: translate(-50%, -50%) scale(1.12); }
.player-toggle svg {
  width: 70%;
  height: auto;
  fill: var(--cream-soft);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}
.player-toggle .icon-pause { display: none; }

/* Mientras suena: mostramos pausa y lo atenuamos hasta el hover */
.player.is-playing .icon-play { display: none; }
.player.is-playing .icon-pause { display: block; }
.player.is-playing .player-toggle { opacity: 0.35; }
.player.is-playing .player-toggle:hover,
.player.is-playing:hover .player-toggle { opacity: 1; }

/* Barra inferior */
.player-bottom {
  position: absolute;
  left: 4%; right: 4%;
  bottom: 5%;
  height: 9%;
  display: flex;
  align-items: center;
  gap: 4%;
  z-index: 2;
}

.player-progress {
  width: 30%;
  height: 55%;
  background: rgba(240, 83, 45, 0.25);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.player-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.2s linear;
}

.player-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}
.player-lines span {
  height: 3px;
  border-radius: 2px;
  background: var(--teal);
  opacity: 0.8;
}
.player-lines span:last-child { opacity: 0.4; width: 70%; }

.player-swatches { display: flex; gap: 5px; }
.player-swatches i {
  width: 9px; height: 9px;
  border-radius: 2px;
  display: block;
}
.sw-orange { background: var(--orange); }
.sw-teal   { background: var(--teal); }
.sw-cream  { background: var(--cream); }
.sw-mint   { background: #9ff2e4; }
.sw-purple { background: #c77bd9; }

/* ============ FOOTER / FEATURES ============ */
.features {
  position: relative;
  z-index: 6;
  background: var(--ink);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 4vw, 4rem);
}

.feature h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--pink);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-bottom: 0.9rem;
}

.feature p {
  text-transform: uppercase;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.75;
  color: var(--cream);
}

.feature-thumb {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.9rem;
  align-items: start;
}
.feature-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid rgba(232, 213, 176, 0.25);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
  .hero-girl {
    grid-column: 1 / -1;
    order: 3;
    margin-bottom: -3rem;
    max-width: 380px;
    justify-self: center;
  }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { align-items: flex-start; text-align: left; }
  .site-header { flex-direction: column; gap: 1.2rem; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
  .features { grid-template-columns: 1fr; }
  .hero-girl { margin-bottom: -2rem; }
}
