/* ===== Marca ===== */
:root {
  --crema: #F1E5D7;
  --crema-claro: #F7F0E6;
  --negro: #0E0D10;
  --tinta: #1A1714;
  --texto-suave: #6B6157;
  --dorado: #BA8B53;
  --dorado-claro: #E9C994;
  --dorado-oscuro: #7E5829;
  --linea: rgba(26, 23, 20, .12);

  --fondo: var(--crema);
  --fondo-alt: var(--crema-claro);
  --texto: var(--tinta);
  --boton-fondo: var(--tinta);
  --boton-texto: var(--crema);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, sans-serif;
  --suave: cubic-bezier(.22, .61, .36, 1);
}

[data-tema="noche"] {
  --fondo: var(--negro);
  --fondo-alt: #18161A;
  --texto: #F1E5D7;
  --texto-suave: #A99D90;
  --linea: rgba(241, 229, 215, .14);
  --boton-fondo: var(--dorado);
  --boton-texto: var(--negro);
}

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  transition: background .6s var(--suave), color .6s var(--suave);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ===== Barra de anuncios ===== */
.anuncio {
  background: var(--tinta);
  color: var(--crema);
  text-align: center;
  padding: 10px 16px;
}
.anuncio p {
  margin: 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.anuncio span { color: var(--dorado); margin: 0 .8em; }
[data-tema="noche"] .anuncio { background: var(--dorado); color: var(--negro); }
[data-tema="noche"] .anuncio span { color: var(--negro); }

/* ===== Cabecera ===== */
.cabecera {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 92px;
  padding: 0 clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--linea);
}

/* --- Botón de género --- */
.genero {
  position: relative;
  justify-self: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--linea);
  border-radius: 999px;
}
.genero button {
  position: relative;
  z-index: 1;
  min-width: 104px;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--texto-suave);
  transition: color .45s var(--suave);
}
.genero button[aria-checked="true"] { color: var(--boton-texto); }
.genero button:not([aria-checked="true"]):hover { color: var(--texto); }
.genero__marcador {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--boton-fondo);
  transition: transform .55s var(--suave), background .6s var(--suave);
}
[data-genero="hombre"] .genero__marcador { transform: translateX(100%); }

/* --- Menú de categorías --- */
.categorias {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid var(--linea);
}
.categorias #menu { display: contents; }
.categorias a {
  position: relative;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 0;
}
.categorias a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--dorado);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--suave);
}
.categorias a:hover::after { transform: scaleX(1); transform-origin: left; }
.categorias__club { color: var(--dorado); }
.categorias__club::before { content: "✦"; margin-right: 8px; font-size: 10px; }

.cabecera__logo img { height: 62px; width: auto; }
.logo-noche { display: none; }
[data-tema="noche"] .logo-dia { display: none; }
[data-tema="noche"] .logo-noche { display: block; }

.cabecera__acciones { display: flex; justify-content: flex-end; gap: 20px; }
.cabecera__acciones svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.3;
  transition: stroke .3s;
}
.cabecera__acciones a:hover svg { stroke: var(--dorado); }
.cabecera__carrito { position: relative; }
.cabecera__contador {
  position: absolute;
  top: -6px; right: -9px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--dorado);
  color: var(--negro);
  font-size: 10px;
  font-weight: 500;
  display: grid; place-items: center;
}

.cabecera__menu { display: none; width: 28px; height: 28px; position: relative; }
.cabecera__menu span {
  position: absolute; left: 3px; right: 3px; height: 1px; background: currentColor;
}
.cabecera__menu span:first-child { top: 10px; }
.cabecera__menu span:last-child { top: 17px; right: 9px; }

/* ===== Portada ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: 620px;
  height: calc(100svh - 180px);
  max-height: 880px;
  overflow: hidden;
}

/* --- Texto --- */
.hero__texto {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(40px, 6vh, 80px) clamp(24px, 4vw, 48px) clamp(32px, 5vh, 56px) clamp(24px, 7vw, 120px);
}

.hero__slides { display: grid; align-self: center; }
.hero__slide {
  grid-area: 1 / 1;
  align-self: center;
  max-width: 520px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--suave), visibility 0s .5s;
}
.hero__slide.activa {
  opacity: 1;
  visibility: visible;
  transition: opacity .6s var(--suave) .15s, visibility 0s;
}
.hero__slide > * {
  transform: translateY(18px);
  transition: transform .9s var(--suave);
}
.hero__slide.activa > * { transform: none; }
.hero__slide.activa > :nth-child(2) { transition-delay: .08s; }
.hero__slide.activa > :nth-child(3) { transition-delay: .16s; }
.hero__slide.activa > :nth-child(4) { transition-delay: .24s; }

.hero__etiqueta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dorado);
}
.hero__etiqueta::before {
  content: "";
  width: 36px; height: 1px;
  background: var(--dorado);
}

.hero__titulo {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 6.4vw, 104px);
  line-height: .95;
  letter-spacing: -.01em;
}
.hero__titulo em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(100deg, var(--dorado-oscuro), var(--dorado) 40%, var(--dorado-claro) 60%, var(--dorado) 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brillo 7s ease-in-out infinite;
  padding-right: .08em;
}
@keyframes brillo {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.hero__descripcion {
  max-width: 380px;
  margin: 28px 0 40px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--texto-suave);
}

.hero__botones { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

.boton {
  position: relative;
  display: inline-block;
  padding: 18px 38px;
  background: var(--boton-fondo);
  color: var(--boton-texto);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: color .45s var(--suave);
}
.boton::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--dorado);
  transform: translateY(101%);
  transition: transform .45s var(--suave);
  z-index: -1;
}
.boton:hover::before { transform: none; }
.boton:hover { color: var(--negro); }
[data-tema="noche"] .boton::before { background: var(--crema); }

.enlace {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding-bottom: 6px;
  background: linear-gradient(var(--dorado), var(--dorado)) left bottom / 100% 1px no-repeat;
  transition: background-size .4s var(--suave), color .3s;
}
.enlace:hover { color: var(--dorado); background-size: 40% 1px; }

/* --- Controles: fases de la luna --- */
.hero__controles { display: flex; align-items: center; gap: 28px; }
.hero__numero { font-size: 12px; letter-spacing: .2em; color: var(--texto-suave); }
.hero__numero b { font-weight: 500; color: var(--texto); }

.hero__fases { display: flex; gap: 14px; }
.hero__fases button {
  position: relative;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid var(--dorado);
  overflow: hidden;
  padding: 0;
}
/* La sombra se desliza: luna nueva -> luna llena mientras avanza la diapositiva */
.hero__fases button::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--dorado);
  transform: translateX(-100%);
}
.hero__fases button[aria-selected="true"]::after {
  animation: fase var(--duracion, 7s) linear forwards;
}
.hero.pausado .hero__fases button[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes fase { to { transform: none; } }

/* --- Visual --- */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--fondo-alt);
  transition: background .6s var(--suave);
}

.hero__resplandor {
  position: absolute;
  width: min(78%, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(233, 201, 148, .45), rgba(233, 201, 148, 0) 65%);
}

.hero__orbita {
  position: absolute;
  width: min(72%, 600px);
  aspect-ratio: 1;
  border: 1px solid rgba(186, 139, 83, .45);
  border-radius: 50%;
  animation: girar 60s linear infinite;
}
.hero__orbita img {
  position: absolute;
  top: 0; left: 50%;
  width: 54px;
  transform: translate(-50%, -50%) rotate(-20deg);
  filter: drop-shadow(0 4px 10px rgba(126, 88, 41, .35));
}
@keyframes girar { to { transform: rotate(360deg); } }

.hero__arco {
  position: relative;
  width: min(54%, 430px);
  aspect-ratio: 3 / 4.15;
  border-radius: 999px 999px 4px 4px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(26, 23, 20, .45);
}
.hero__arco img, .hero__circulo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
  transform: scale(1.12);
  transition: clip-path 1.1s var(--suave), transform 1.6s var(--suave);
}
.hero__arco img.activa, .hero__circulo img.activa {
  clip-path: inset(0 0 0 0);
  transform: scale(1);
  z-index: 1;
}
.hero__arco img.saliendo, .hero__circulo img.saliendo { clip-path: inset(0 0 0 0); z-index: 0; }

.hero__circulo {
  position: absolute;
  left: calc(50% - min(27%, 215px) - 70px);
  bottom: 12%;
  width: clamp(120px, 13vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--fondo-alt);
  box-shadow: 0 20px 40px -20px rgba(26, 23, 20, .5);
  transition: border-color .6s var(--suave);
  z-index: 2;
}

.hero__estrella {
  position: absolute;
  right: calc(50% - min(27%, 215px) - 46px);
  top: 18%;
  color: var(--dorado);
  font-size: 26px;
  animation: titilar 3.2s ease-in-out infinite;
}
@keyframes titilar {
  0%, 100% { opacity: .35; transform: scale(.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
}

/* --- Redes sociales --- */
.hero { position: relative; }
.hero__redes {
  position: absolute;
  right: 26px; bottom: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 3;
}
.hero__redes span {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--texto-suave);
  padding-bottom: 6px;
}
.hero__redes span::before {
  content: "";
  display: inline-block;
  width: 1px; height: 40px;
  margin-bottom: 14px;
  background: var(--dorado);
}
.hero__redes svg { width: 19px; height: 19px; transition: fill .3s, stroke .3s, transform .3s var(--suave); }
.hero__redes .trazo { fill: none; stroke: currentColor; stroke-width: 1.3; }
.hero__redes .trazo .punto { fill: currentColor; stroke: none; }
.hero__redes .relleno { fill: currentColor; transform: scale(.88); }
.hero__redes a:hover { color: var(--dorado); }
.hero__redes a:hover svg { transform: translateY(-2px); }

/* ===== Cortina al cambiar de género ===== */
.cortina {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--fondo-alt);
  transform: translateY(100%);
  pointer-events: none;
  visibility: hidden;
}
.cortina img { width: 84px; opacity: 0; transform: rotate(-40deg) scale(.7); }
.cortina__texto {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  color: var(--dorado);
  opacity: 0;
  transform: translateY(12px);
}
.cortina.entra, .cortina.sale { visibility: visible; pointer-events: auto; }
.cortina.entra { transform: none; transition: transform .7s cubic-bezier(.76, 0, .24, 1); }
.cortina.entra img, .cortina.entra .cortina__texto {
  opacity: 1; transform: none;
  transition: opacity .5s .25s, transform .7s .2s var(--suave);
}
.cortina.sale { transform: translateY(-100%); transition: transform .7s cubic-bezier(.76, 0, .24, 1); }
.cortina.sale img, .cortina.sale .cortina__texto { opacity: 1; transform: none; }

.solo-lectores {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Vista previa (no va en la web final) ===== */
.vista-previa {
  position: fixed;
  right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 5px 5px 14px;
  background: rgba(26, 23, 20, .88);
  color: #F1E5D7;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .08em;
  z-index: 10;
  backdrop-filter: blur(6px);
}
.vista-previa span { margin-right: 6px; opacity: .7; }
.vista-previa button { padding: 6px 12px; border-radius: 999px; font-size: 11px; }
.vista-previa button[aria-pressed="true"] { background: var(--dorado); color: var(--negro); }

/* ===== Móvil y tablet ===== */
@media (max-width: 900px) {
  .cabecera {
    height: auto;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "menu logo acciones" "genero genero genero";
    row-gap: 12px;
    padding-top: 12px;
    padding-bottom: 14px;
  }
  .cabecera__menu { display: block; grid-area: menu; }
  .cabecera__logo { grid-area: logo; }
  .cabecera__acciones { grid-area: acciones; }
  .cabecera__logo img { height: 48px; }
  .solo-escritorio { display: none; }

  .genero { grid-area: genero; justify-self: stretch; }
  .genero button { min-width: 0; padding: 11px 0; }

  /* Categorías: fila deslizable */
  .categorias {
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .categorias::-webkit-scrollbar { display: none; }

  .hero {
    grid-template-columns: 1fr;
    height: auto; max-height: none; min-height: 0;
  }
  .hero__visual { order: -1; padding: 36px 16px 40px; }
  .hero__arco { width: min(56%, 320px); }
  .hero__orbita { width: min(88%, 460px); }
  .hero__resplandor { width: 100%; }
  .hero__circulo {
    width: clamp(96px, 26vw, 150px);
    left: calc(50% - min(32%, 170px) - 30px);
    bottom: 40px;
  }
  .hero__estrella { right: calc(50% - min(32%, 170px) - 30px); }
  .hero__redes {
    position: static;
    flex-direction: row;
    justify-content: center;
    gap: 22px;
    padding: 0 16px 48px;
  }
  .hero__redes span { writing-mode: horizontal-tb; padding: 0; }
  .hero__redes span::before { display: none; }

  .hero__texto { padding: 40px 16px 48px; text-align: center; }
  .hero__slide { justify-self: center; }
  .hero__etiqueta, .hero__botones, .hero__controles { justify-content: center; }
  .hero__descripcion { margin-left: auto; margin-right: auto; }
  .hero__controles { margin-top: 40px; }
  .vista-previa span { display: none; }
}

@media (max-width: 420px) {
  .anuncio p { font-size: 10px; letter-spacing: .14em; }
  .hero__botones { flex-direction: column; gap: 22px; }
  .boton { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
