/* =========================================================
   GLOW 22 · Estilos
   Las medidas en escritorio salen de los diseños de Figma
   (pantalla 16:9). Se escalan con el ancho de la ventana (vw).
   1. Variables
   2. Base
   3. Hero
   4. Categorías
   5. Próximamente
   6. Conócenos / contacto
   7. Móvil y tablet
   8. Animaciones suaves
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  --white: #ffffff;
  --black: #111111;
  --ink: #1d2a28;          /* verde casi negro del título de categorías */
  --grey: #8c8c8c;         /* textos secundarios */
  --line: #9a9a9a;         /* líneas de las categorías */
  --espresso: #2b2420;     /* texto oscuro sobre la pared del hero */

  --font-main: "Satoshi", "Montserrat", system-ui, sans-serif;
  --font-montserrat: "Montserrat", system-ui, sans-serif;
  --font-wide: "Phonk", "Archivo", "Arial Black", sans-serif;

  --side: 5.5vw;           /* margen lateral general */
}

/* Tipografías propias: los archivos van en la carpeta fonts/.
   Si aún no están, se usan Montserrat y Archivo como reserva. */
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Variable.woff2") format("woff2"),
       url("../fonts/Satoshi-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Phonk";
  src: url("../fonts/Phonk.woff2") format("woff2"),
       url("../fonts/Phonk.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}

/* Montserrat y Archivo, alojadas en la propia web (sin conectar con Google) */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-900.woff2") format("woff2");
  font-weight: 900;
  font-stretch: 125%;
  font-display: swap;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 3. Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  color: var(--white);
  background: #f4f2ee; /* mientras carga el vídeo (color de la pared) */
}

.hero__video {
  pointer-events: none;    /* el vídeo es decorativo: no se puede pausar ni pulsar */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;   /* marca y enlaces en la misma línea */
  padding: 2.6vw 3.75vw 0;
  color: var(--espresso);
  font-size: max(12px, 0.75vw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation-delay: 0.2s;
}
.nav__links {
  display: flex;
  gap: 2.25vw;
}
.nav a:hover { opacity: 0.7; }

.hero__text {
  position: absolute;
  font-family: var(--font-montserrat);
  z-index: 2;
  left: 3.75vw;            /* en la pared vacía de la izquierda, alineada con la marca */
  bottom: 9.5%;
  max-width: 19vw;
  color: var(--espresso);
  font-size: max(12px, 0.85vw);
  line-height: 1.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation-delay: 0.6s;
}

.hero__reveal {
  animation-name: hero-fade-in;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__reveal {
    animation: none;
  }
}

/* Ocultar el botón de play que Safari muestra si bloquea la reproducción */
.hero__video::-webkit-media-controls,
.hero__video::-webkit-media-controls-panel,
.hero__video::-webkit-media-controls-play-button,
.hero__video::-webkit-media-controls-overlay-play-button,
.hero__video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
}

/* El vídeo solo se muestra cuando ya se está reproduciendo; antes se ve el
   fotograma de fondo del hero. Así nunca se ve un botón de play. */
.hero { background-size: cover; background-position: center; }
.hero__video { opacity: 0; transition: opacity 0.6s ease; }
.hero__video.is-playing { opacity: 1; }

/* ---------- 4. Categorías ---------- */
.categories {
  min-height: 56.25vw;
  padding: 9.75vw 6.4vw 6vw 7.2vw;
}

.categories__title {
  padding-left: 0.45vw;
  color: var(--ink);
  text-transform: uppercase;
}
.categories__title-light {
  display: block;
  font-weight: 300;
  font-size: max(22px, 2.35vw);
  line-height: 1.05;
}
.categories__title-bold {
  display: block;
  font-family: var(--font-wide);
  font-weight: 900;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: max(28px, 3.6vw);
  line-height: 1.05;
}

.categories__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3.95vw;
  margin-top: 7vw;
}

.category__img {
  height: 17vw;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.5vw;
}
.category__img img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.category__name {
  margin-top: 1.5vw;
  padding: 1.05vw 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-weight: 500;
  font-size: max(13px, 1.05vw);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- 5. Próximamente ---------- */
.soon {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 56.25vw;
  color: var(--white);
}

.soon__img { background-size: cover; background-position: center; }
.soon__img--left { background-color: #2a1d16; background-image: url("../img/proximamente-izquierda.jpg"); }
.soon__img--right { background-color: #b9aea1; background-image: url("../img/proximamente-derecha.jpg"); }

.soon__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 1.5vw;
}
.soon__title {
  font-family: var(--font-montserrat);
  font-weight: 800;
  font-size: max(28px, 3.5vw);
  letter-spacing: 0.28em;
  margin-right: -0.28em; /* compensa el espaciado de la última letra para centrar */
  text-transform: uppercase;
}
.soon__address {
  margin-top: 1.4vw;
  font-weight: 300;
  font-size: max(14px, 1.35vw);
  letter-spacing: 0.06em;
}

.soon--reveal .soon__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
}
.soon--reveal .soon__address { opacity: 0; }

.soon--visible .soon__letter {
  animation: soon-letter-reveal 0.8s ease-out both;
  animation-delay: var(--letter-delay);
}
.soon--visible .soon__address {
  animation: soon-address-reveal 0.8s ease-out both;
  animation-delay: var(--address-delay);
}

@keyframes soon-letter-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes soon-address-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .soon--reveal .soon__letter,
  .soon--reveal .soon__address {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- 6. Conócenos / contacto ---------- */
.about {
  position: relative;
  height: 56.25vw;
}

.about__brand {
  position: absolute;
  top: 3.9vw;
  left: var(--side);
  font-weight: 300;
  font-size: max(24px, 2.4vw);
  letter-spacing: 0.1em;
}
.about__tagline {
  position: absolute;
  top: 5.55vw;
  right: 3.5vw;
  font-weight: 300;
  font-size: max(11px, 0.75vw);
  color: var(--grey);
  text-transform: uppercase;
}

.about__img {
  position: absolute;
  top: 14.65vw;            /* mismo centro vertical que en Figma */
  left: 0;
  right: 0;
  margin: 0 auto;          /* centrada sin transform, para no chocar con la animación */
  width: 15.8vw;           /* 30% más pequeña que en Figma */
  aspect-ratio: 451 / 643;
  object-fit: cover;
  filter: grayscale(1); /* la foto siempre en blanco y negro */
}

.about__text {
  position: absolute;
  font-size: max(11px, 0.68vw);
  line-height: 1.3;
  letter-spacing: 0.08em;
}
.about__text--left { left: var(--side); top: 47.25vw; }
.about__text--right { right: 3.5vw; top: 46.4vw; text-align: right; }

/* ---------- 7. Móvil y tablet ----------
   Medidas del diseño móvil de Figma (frame de 390 px de ancho) */
@media (max-width: 900px) {
  /* Hero: recorte del vídeo vertical con el logo y el grupo grandes */
  /* Zoom del 120 % para que GLOW ocupe de lado a lado, y menos aire arriba.
     El logo del vídeo vertical va de x 22 a 883 (de 1080), así que se recorta
     el trozo de x 2 a 902 y se muestra desde un poco encima de la onda (y 1100). */
  .hero { height: auto; min-height: 0; aspect-ratio: 900 / 820; background-size: 120% auto; background-position: -0.2vw bottom; }
  .hero__video { inset: auto; left: -0.2vw; bottom: 0; width: 120%; height: auto; object-fit: fill; }
  .nav { padding: 20px 20px 0; justify-content: flex-end; }
  .hero .nav__brand { display: none; } /* en el hero del móvil solo el botón del menú */
  .nav__links { gap: 20px; margin-top: 0; }
  .hero__text { display: none; } /* en el diseño móvil no hay frase */

  /* Categorías: una columna, líneas de lado a lado */
  .categories { min-height: 0; padding: 62px 0 0; }
  .categories__title { padding: 0 20px; text-align: center; }
  .categories__title-light { font-size: 17px; }
  .categories__title-bold { font-size: 28px; }
  .categories__title-line { display: block; }
  .categories__list { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
  .category__img { height: 330px; padding: 0 20px; }
  .category__img img { max-width: 220px; max-height: 240px; }
  .category__name { margin-top: 22px; padding: 12px 0; font-size: 15px; font-weight: 400; }

  /* Próximamente: una foto encima de otra y el texto en la unión */
  .soon { height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto; margin-top: 20px; }
  .soon__img { aspect-ratio: 1 / 1; }
  .soon__text { padding-bottom: 0; }
  .soon__title { font-size: 27px; letter-spacing: 0.2em; margin-right: -0.2em; }
  .soon__address { margin-top: 8px; padding: 0 20px; font-size: 14px; }

  /* Conócenos */
  .about { height: auto; display: flex; flex-direction: column; padding: 58px 38px 80px; }
  .about > * { position: static; transform: none; }
  .about__brand { font-size: 30px; }
  .about__tagline { margin-top: 6px; font-size: 10px; }
  .about__img { width: 130px; margin: 74px auto 40px; }
  .about__text { font-size: 12px; line-height: 1.35; }
  .about__text br { display: none; }
  .about__text--right { margin-top: 24px; text-align: left; } /* contacto debajo del texto */
  .about__text--right br { display: inline; }
}

/* ---------- 8. Animaciones suaves ----------
   Los elementos con .reveal aparecen con un fundido al llegar a ellos (js/main.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ---------- 9. Pie y páginas legales ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 1.6vw var(--side);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--grey);
  font-size: max(11px, 0.68vw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__links { display: flex; gap: 2vw; }
.footer a:hover { color: var(--black); }

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  font-size: 15px;
  line-height: 1.7;
}
.legal__back {
  display: inline-block;
  margin-bottom: 48px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.legal .legal__back { text-decoration: none; }
.legal__back:hover { color: var(--black); }
.legal h1 {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal__date { margin-bottom: 40px; color: var(--grey); font-size: 13px; }
.legal h2 { margin: 36px 0 10px; font-size: 16px; font-weight: 600; }
.legal p, .legal ul { margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 20px; }
.legal a { text-decoration: underline; }
.legal mark { background: #fff1a8; padding: 0 3px; } /* TODO: datos por rellenar */

@media (max-width: 900px) {
  .footer { flex-direction: column; padding: 24px 20px; font-size: 11px; text-align: center; }
  .footer__links { gap: 20px; }
}

/* ---------- 10. Página Productos (venta online próximamente) ---------- */
.shop { min-height: 100svh; display: flex; flex-direction: column; }
.nav--page { position: static; }
.shop__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vw var(--side) 4vw;
}
.shop__label {
  color: var(--grey);
  font-size: max(12px, 0.75vw);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.shop__title {
  margin-top: 1vw;
  font-family: var(--font-montserrat);
  font-weight: 800;
  font-size: max(30px, 3.5vw);
  letter-spacing: 0.28em;
  margin-right: -0.28em;
  text-transform: uppercase;
  color: var(--ink);
}
.shop__text {
  max-width: 34em;
  margin-top: 2vw;
  font-size: max(15px, 1.05vw);
  line-height: 1.7;
}
.shop__address {
  margin-top: 1.4vw;
  font-family: var(--font-montserrat);
  font-size: max(12px, 0.8vw);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.shop__actions { display: flex; gap: 12px; margin-top: 2.4vw; flex-wrap: wrap; justify-content: center; }
.shop__btn {
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}
.shop__btn--ghost { background: transparent; color: var(--ink); }
.shop__btn:hover { opacity: 0.75; }
.shop__packs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 3vw;
  width: 100%;
  max-width: 60vw;
  margin-top: 5vw;
}
.shop__packs img { max-height: 9vw; width: auto; margin: 0 auto; object-fit: contain; }
.shop .hero__reveal:nth-child(2) { animation-delay: 0.35s; }
.shop .hero__reveal:nth-child(3) { animation-delay: 0.5s; }
.shop .hero__reveal:nth-child(4) { animation-delay: 0.65s; }
.shop .hero__reveal:nth-child(5) { animation-delay: 0.8s; }
.shop .hero__reveal:nth-child(6) { animation-delay: 1s; }

@media (max-width: 900px) {
  .shop__main { padding: 56px 24px 48px; }
  .shop__title { margin-top: 10px; font-size: 27px; letter-spacing: 0.2em; margin-right: -0.2em; }
  .shop__text { margin-top: 20px; }
  .shop__address { margin-top: 16px; }
  .shop__actions { margin-top: 28px; }
  .shop__packs { grid-template-columns: repeat(3, 1fr); max-width: 320px; gap: 20px; margin-top: 48px; }
  .shop__packs li:nth-child(n+4) { display: none; }
  .shop__packs img { max-height: 90px; }
}

/* ---------- 11. Menú del móvil ---------- */
.nav__toggle,
.menu { display: none; }

@media (max-width: 900px) {
  .nav { align-items: center; }
  .nav__links { display: none; }

  /* Botón de dos rayas */
  .nav__toggle,
  .menu__close {
    position: relative;
    width: 32px;
    height: 32px;
    margin: -8px -6px -8px 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }
  .nav__toggle { display: block; }
  .nav__toggle span,
  .menu__close span {
    position: absolute;
    left: 6px;
    right: 6px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.4s ease;
  }
  .nav__toggle span:first-child { top: 12px; }
  .nav__toggle span:last-child { top: 19px; }
  .menu__close span { top: 15px; }
  .menu__close span:first-child { transform: rotate(45deg); }
  .menu__close span:last-child { transform: rotate(-45deg); }

  /* Panel a pantalla completa */
  .menu {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f4efe8;
    color: var(--espresso);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
  }
  .menu.is-open { opacity: 1; visibility: visible; }
  .menu__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .menu__links {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
  }
  .menu__links a {
    font-family: var(--font-montserrat);
    font-weight: 800;
    font-size: 30px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .menu.is-open .menu__links a { opacity: 1; transform: none; }
  .menu.is-open .menu__links a:nth-child(2) { transition-delay: 0.08s; }
  .menu.is-open .menu__links a:nth-child(3) { transition-delay: 0.16s; }
  .menu__foot {
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: var(--grey);
  }
  .menu-open, .menu-open body { overflow: hidden; }
}

/* Texto solo para Google y lectores de pantalla (no se ve) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
