/* Raíces · Nueva Escuela — landing ensamblada */

:root {
  --dark: #1f2329;
  --text: #1d2024;
  --green: #1b1f24;
  --beige: #ecdac3;
  --cream: #f5ecdd;
  --gold: #dbb072;
  --card-border: #8a4a3a;

  --rojo: #cf2b51;
  --naranja: #cf5b2e;
  --verde: #2d493d;
  --azul: #2c3a5a;
  --marco: 12px;
  --franja: 40px;

  --font-hero: "Cinzel Decorative", Georgia, serif;
  --font-title: "Fraunces", Georgia, serif;
  --font-body: "Raleway", Arial, sans-serif;

  --gutter: clamp(24px, 8.333vw, 200px);
  --gutter-header: clamp(24px, 5.555vw, 140px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%; /* CAMBIO: evita que iOS agrande el texto */
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--beige);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* CAMBIO: respeta usuarios que reducen animaciones */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow--line {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--green);
}

.eyebrow--line::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--green);
}

.eyebrow--dark {
  color: var(--green);
}

.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(32px, 3.3vw, 48px);
  line-height: 1.18;
  color: var(--text);
}

.section-title--light {
  color: var(--cream);
}

.btn {
  display: inline-block;
  padding: 16px 28px;
  background: var(--gold);
  color: var(--dark);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 0;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn--small {
  padding: 12px 18px;
  font-size: 15px;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--dark);
  height: 92px;
  display: flex;
  align-items: center;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-left: var(--gutter-header);
  padding-right: var(--gutter-header);
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo img {
  display: block;
  height: 54px;
  width: auto;
  object-fit: contain;
}

.nav__list {
  display: flex;
  gap: clamp(16px, 2vw, 36px);
}

.nav__list a {
  color: var(--cream);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.nav__list a:hover {
  color: var(--gold);
}

.menu-toggle,
.menu-btn {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  background: var(--green);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero__copy {
  max-width: 34rem;
}

.hero__title {
  font-family: var(--font-hero);
  font-weight: 700;
  font-size: clamp(56px, 6vw, 85px);
  line-height: 1;
  color: var(--cream);
  margin: 12px 0 18px;
}

.hero__text {
  font-size: 19px;
  color: var(--cream);
  margin-bottom: 28px;
  max-width: 28rem;
}

/* Cuenta regresiva */

.cuenta {
  padding: 72px 0 100px;
  text-align: center;
}

.cuenta__title {
  text-align: center;
}

.cuenta__sub {
  margin: 14px auto 32px;
  max-width: 40rem;
  font-size: 15px;
  color: #4a463e;
}

.cuenta__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bloque {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 8px;
}

.bloque:nth-child(1) { background: var(--rojo); }
.bloque:nth-child(2) { background: var(--naranja); }
.bloque:nth-child(3) { background: var(--verde); }
.bloque:nth-child(4) { background: var(--azul); }

.numero {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 600;
  line-height: 1;
  color: #f4ede0;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

.etiqueta {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e2b97b;
}

.cuenta__mensaje:empty {
  display: none;
}

.cuenta__mensaje {
  margin-top: 18px;
  font-weight: 600;
  color: var(--azul);
}

/* Sobre Raíces */

.about {
  padding: 48px 0 84px;
}

.about .section-title {
  margin: 22px 0 18px;
}

.about__text {
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 40rem;
}

/* El desfile */

.show {
  background: var(--green);
  padding: 80px 0;
}

.show .section-title {
  margin: 16px 0 28px;
}

/* Cards de texto */

.cards {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.cards--two {
  grid-template-columns: repeat(2, 1fr);
}

.cards--three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--cream);
  border: 1px solid var(--card-border);
  padding: 28px 28px 24px;
}

.card::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--green);
  margin-bottom: 14px;
}

.card__title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.card__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--green);
}

/* Colecciones / carrusel */

.colecciones {
  padding: 80px 0 72px;
}

.colecciones .section-title {
  margin: 14px 0 12px;
}

.colecciones__intro {
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 40rem;
}

.carrusel {
  --visibles: 4;
  --gap: 18px;
  position: relative;
  max-width: 100%;
}

.pista {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  anchor-name: --pista;
  scrollbar-width: thin;
  scrollbar-color: var(--text) transparent;
  padding: 18px 12px 26px;
  scroll-padding-inline: 12px;
}

.pista:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 4px;
}

.tarjeta {
  flex: 0 0 calc((100% - var(--gap) * (var(--visibles) - 1)) / var(--visibles));
  background: transparent;
  box-shadow: 0 6px 14px rgba(29, 26, 22, 0.22), 0 1px 3px rgba(29, 26, 22, 0.18);
  transform: rotate(var(--giro, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta:nth-child(odd) { --giro: -1.6deg; }
.tarjeta:nth-child(even) { --giro: 1.2deg; }
.tarjeta:nth-child(3n) { --giro: 0.5deg; }

.tarjeta:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 12px 24px rgba(29, 26, 22, 0.28), 0 2px 5px rgba(29, 26, 22, 0.2);
}

.tarjeta:nth-child(4n + 1) { scroll-snap-align: start; }

.color {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  position: relative;
  aspect-ratio: 8 / 10;
  background: var(--c);
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
}

.color img {
  position: absolute;
  top: var(--marco);
  left: var(--marco);
  right: var(--marco);
  bottom: var(--franja);
  width: calc(100% - var(--marco) * 2);
  height: calc(100% - var(--marco) - var(--franja));
  max-width: none;
  object-fit: cover;
  display: block;
  color: transparent;
  font-size: 0;
  transition: transform 0.4s ease;
}

.color:hover img { transform: scale(1.03); }

.color:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.info,
.lb-fig figcaption {
  display: none;
}

.carrusel__nav {
  position: absolute;
  top: 38%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.carrusel__nav:hover { transform: scale(1.08); }

.carrusel__nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.carrusel__nav--prev { left: 8px; }
.carrusel__nav--next { right: 8px; }

@supports selector(::scroll-button(left)) {
  .carrusel__nav { display: none; }

  .pista {
    scrollbar-width: none;
  }

  .pista::scroll-button(left),
  .pista::scroll-button(right) {
    position: fixed;
    position-anchor: --pista;
    top: calc(anchor(center) - 40px);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--dark);
    color: var(--cream);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 3;
  }

  .pista::scroll-button(left) { content: "‹" / "Anterior"; left: calc(anchor(left) - 22px); }
  .pista::scroll-button(right) { content: "›" / "Siguiente"; right: calc(anchor(right) - 22px); }

  .pista::scroll-button(left):hover,
  .pista::scroll-button(right):hover { transform: scale(1.08); }

  .pista::scroll-button(left):disabled,
  .pista::scroll-button(right):disabled {
    opacity: 0;
    pointer-events: none;
  }
}

/* Lightbox */

.lightbox {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 17, 13, 0.92);
  color: #f1eddc;
  overflow: hidden;
}

.lightbox:popover-open {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: aparece 0.2s ease;
}

@keyframes aparece {
  from { opacity: 0; }
}

.lb-fondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.lb-fig {
  position: relative;
  z-index: 1;
  max-width: min(900px, 86vw);
  text-align: center;
  pointer-events: none;
}

.lb-fig img {
  max-width: 100%;
  max-height: 78vh;
  display: block;
  margin: 0 auto;
  border: var(--marco) solid var(--c);
  border-bottom-width: var(--franja);
  object-fit: contain;
}

.lb-fig figcaption {
  margin-top: 14px;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.lb-fig figcaption strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lb-cerrar,
.lb-flecha {
  position: absolute;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #f1eddc;
  cursor: pointer;
}

.lb-cerrar {
  top: 16px;
  right: 24px;
  font-size: 2.6rem;
  line-height: 1;
}

.lb-flecha {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 12px 18px;
}

.lb-prev { left: 8px; }
.lb-next { right: 8px; }

/* Evento */

.evento {
  background: var(--green);
  padding: 80px 0;
}

.evento .section-title {
  margin: 14px 0 8px;
}

.info-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.info-box {
  background: var(--cream);
  color: var(--text);
  min-width: 200px;
  padding: 18px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.box-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6558;
}

.box-value {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 500;
}

/* Ubicación */

.ubicacion {
  padding: 80px 0;
}

.ubicacion__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.1fr;
  gap: 48px;
  align-items: center;
}

.ubicacion .section-title {
  margin: 12px 0 18px;
}

.ubicacion__name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ubicacion__dir {
  margin-bottom: 22px;
  line-height: 1.6;
}

.ubicacion__mapa iframe {
  width: 100%;
  height: 340px;
  border: 0;
  display: block;
}

/* Footer */

.footer {
  background: var(--dark);
  color: var(--cream);
  padding: 36px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer__logo {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
}

.footer__social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 2px;
  margin-top: 12px;
  color: var(--cream);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--cream);
  transition: color 0.2s ease;
}

.footer__social svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer__social a:hover {
  color: var(--gold);
}

.footer__social a.footer__web {
  width: auto;
  margin-left: 8px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__address {
  font-size: 14px;
  text-align: right;
}

.footer__address a:hover {
  color: var(--gold);
}

.footer__legal {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(245, 236, 221, 0.78);
}

/* Responsive */

@media (max-width: 1040px) {
  .container,
  .header__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* CAMBIO: mejor render de texto y sin flash gris al tocar */
  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }

  /* CAMBIO: títulos sin palabras sueltas (ej. "comenzó.") */
  .section-title,
  .hero__title {
    text-wrap: balance;
  }

  /* CAMBIO: eyebrow un poco más legible */
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  /* CAMBIO: botones con área táctil cómoda, esquinas suaves y feedback */
  .btn {
    min-height: 48px;
    border-radius: 8px;
    transition: filter 0.2s ease, transform 0.15s ease;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .header {
    height: 76px;
  }

  .header__logo img {
    height: 48px;
  }

  .footer__logo {
    height: 44px;
  }

  .header__cta {
    display: none;
  }

  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--gold);
    cursor: pointer;
  }

  .menu-btn__icon,
  .menu-btn__icon::before,
  .menu-btn__icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--cream);
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .menu-btn__icon {
    position: relative;
  }

  .menu-btn__icon::before,
  .menu-btn__icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-btn__icon::before { top: -6px; }
  .menu-btn__icon::after { top: 6px; }

  .menu-toggle:checked ~ .menu-btn .menu-btn__icon {
    background: transparent;
  }

  .menu-toggle:checked ~ .menu-btn .menu-btn__icon::before {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle:checked ~ .menu-btn .menu-btn__icon::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    padding: 8px 20px 20px;
    border-top: 1px solid rgba(219, 176, 114, 0.3);
  }

  .menu-toggle:checked ~ .nav {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(245, 236, 221, 0.12);
  }

  /* CAMBIO: el video sigue a pantalla completa de fondo (como en desktop) */
  .hero {
    display: flex;
    align-items: flex-end; /* texto abajo, deja ver el video arriba */
    aspect-ratio: auto;
    min-height: min(calc(100svh - 76px), 760px);
    padding: 48px 0 40px;
  }

  /* se conserva position: absolute + object-fit: cover del desktop */
  .hero__video {
    object-position: 60% center; /* ajustá para encuadrar el maniquí */
  }

  /* degradé oscuro para que el texto se lea sobre el video */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* arriba del video, abajo del texto */
    background: linear-gradient(
      to top,
      rgba(31, 35, 41, 0.88) 0%,
      rgba(31, 35, 41, 0.55) 45%,
      rgba(31, 35, 41, 0.15) 100%
    );
    pointer-events: none;
  }

  .hero__copy {
    width: 100%;
    max-width: none;
  }

  .hero .eyebrow {
    margin-bottom: 12px;
  }

  .hero__title {
    font-size: clamp(52px, 16vw, 85px);
    line-height: 0.95;
    margin: 8px 0 12px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  }

  .hero__text {
    font-size: 16px;
    margin-bottom: 24px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  }

  .hero .btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .about,
  .show,
  .colecciones,
  .evento,
  .ubicacion {
    padding: 48px 0;
  }

  .cuenta {
    padding: 48px 0 16px;
  }

  .cards--two,
  .cards--three,
  .ubicacion__grid {
    grid-template-columns: 1fr;
  }

  .ubicacion .btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .info-box {
    width: 100%;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__address {
    text-align: left;
  }
}

@media (max-width: 800px) {
  .carrusel { --visibles: 2; --gap: 12px; }
  .tarjeta:nth-child(4n + 1) { scroll-snap-align: none; }
  .tarjeta:nth-child(2n + 1) { scroll-snap-align: start; }
}

@media (max-width: 700px) {
  .cuenta__grid {
    grid-template-columns: 1fr 1fr;
  }

  .bloque {
    min-height: 128px;
  }

}

@media (max-width: 600px) {
  .carrusel { --visibles: 1.15; }
  .tarjeta:nth-child(n) { scroll-snap-align: start; }

  .carrusel__nav,
  .pista::scroll-button(left),
  .pista::scroll-button(right) {
    display: none;
  }
}

.banner-desfile {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.banner-desfile__figure {
  width: 100%;
  margin: 0;
  padding: 0;
}

.banner-desfile__figure picture,
.banner-desfile__figure img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}