/* ==========================================================================
   sections.css — Estilos propios de cada sección, en el orden de la página
   1 Hero · 2 Showreel · 3 Colección · 4 Cómo reservar · 5 Configurador
   6 Sobre mí · 7 Footer
   ========================================================================== */

/* ==========================================================================
   1. HERO — fotos de fondo (de a 3) + texto centrado
   Las fotos las maneja js/hero-slider.js (se editan en config.js → hero).
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;               /* respaldo para navegadores viejos */
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

/* Fondo: diapositivas apiladas que se funden entre sí.
   Cada diapositiva es una fila de 1 a 3 fotos verticales (--cols lo define el JS). */
.hero__slides { position: absolute; inset: 0; z-index: -2; background: var(--c-olive-deep); }
.hero__slide {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), 1fr);
  gap: 6px;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__cell { overflow: hidden; min-width: 0; }
.hero__cell img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .hero__slide.is-active img { animation: slow-zoom 7s linear forwards; }   /* movimiento constante: linear */
}
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Velo de la marca: oscurece parejo y más fuerte en el centro, detrás del texto */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(34, 35, 20, .5), transparent 100%),
    linear-gradient(180deg, rgba(38, 38, 22, .5) 0%, rgba(54, 55, 32, .5) 55%, rgba(38, 38, 22, .7) 100%);
}

.hero__content { display: grid; justify-items: center; }
.hero__logo { color: var(--c-rose); --logo-w: clamp(220px, 32vw, 380px); margin-bottom: 1.4rem; }
.hero h1 { font-size: var(--fs-h1); max-width: 24ch; letter-spacing: -.03em; line-height: 1.02; }
.hero__lead { margin-top: 1.4rem; font-size: var(--fs-lead); color: rgba(240, 231, 224, .94); }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }

/* Entrada del texto del inicio en secuencia: cada elemento entra 70 ms después del anterior */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo, .hero h1, .hero__lead, .hero__cta { animation: rise 650ms var(--ease-out) both; }
  .hero h1 { animation-delay: 70ms; }
  .hero__lead { animation-delay: 140ms; }
  .hero__cta { animation-delay: 210ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (max-width: 560px) {
  .hero__logo { --logo-w: 190px; margin-bottom: .6rem; }
  .hero h1 { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
}

/* Marco en arco: lo usa la sección "Sobre mí" */
.arch {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--r-l) var(--r-l);
  overflow: hidden;
  background: var(--c-olive);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   2. SHOWREEL — ahora vive en css/moving.css ("ByCar en movimiento").
   Acá solo quedan los botones del video grande.
   ========================================================================== */
.showreel__controls { position: absolute; right: .8rem; bottom: .8rem; display: flex; gap: .5rem; }
.showreel__controls button {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: 0 1.1rem;
  border: 0; border-radius: 999px;
  background: rgba(240, 231, 224, .94); color: var(--c-ink);
  font-weight: 600; font-size: var(--fs-body);
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.showreel__controls button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .showreel__controls button:hover { background: var(--c-rose); } }

/* ==========================================================================
   3. COLECCIÓN
   ========================================================================== */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem);
}
.product-card { display: grid; grid-template-rows: auto 1fr; gap: 1.1rem; }
.product-card__media {
  position: relative;
  display: block; width: 100%;
  padding: 0; border: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--c-rose);
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .product-card__media:hover img { transform: scale(1.04); } }

/* Cuando todavía no hay foto: silueta de camisa sobre fondo de color */
.product-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: .8rem; color: var(--c-olive-deep); font-size: var(--fs-small); font-weight: 500; }
.product-card__placeholder svg { width: 58%; }

.product-card__badge {
  position: absolute; left: .9rem; top: .9rem;
  padding: .3rem .8rem; border-radius: 999px;
  background: var(--c-cream); font-size: var(--fs-small); font-weight: 600;
}
.product-card__info { display: grid; gap: .5rem; align-content: start; }
.product-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.product-card__price { font-weight: 700; white-space: nowrap; }
.product-card__dots { display: flex; gap: .4rem; margin-block: .2rem .6rem; }
.product-card__dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--dot); border: 1px solid rgba(0, 0, 0, .25); }
.product-card__dots i.is-unavailable { opacity: .5; background-image: linear-gradient(to top right, transparent calc(50% - 1px), var(--c-ink-soft) calc(50% - 1px), var(--c-ink-soft) calc(50% + 1px), transparent calc(50% + 1px)); }

/* Celulares: 2 camisas por fila (se ve más de la colección sin tanto scroll) */
@media (max-width: 640px) and (min-width: 360px) {
  .catalog__grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem .9rem; }
  .product-card { gap: .8rem; }
  .product-card__media { border-radius: var(--r-s); }
  .product-card__row { flex-direction: column; gap: .1rem; }
  .product-card h3 { font-size: var(--fs-body); }
    .product-card .btn { min-height: 48px; padding-inline: .8rem; }
}

/* ==========================================================================
   4. CÓMO RESERVAR — acá sí es una secuencia, por eso van numerados
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; display: grid; gap: .8rem; align-content: start; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: var(--c-olive-deep); color: var(--c-cream);
  font-family: var(--f-display); font-size: var(--fs-h3);
}
.steps p { color: var(--c-ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Aviso de pre-order, debajo de los pasos */
.preorder { margin-top: clamp(2.2rem, 4vw, 3.6rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.6rem); }
.preorder__item { padding: clamp(1.4rem, 2.5vw, 2.1rem); border-radius: var(--r-m); background: var(--c-paper); display: grid; gap: .8rem; align-content: start; }
.preorder__item h3 { font-size: var(--fs-h3); }
.preorder__item p { color: var(--c-ink-soft); }
.preorder__item strong { color: var(--c-ink); font-weight: 600; }
@media (max-width: 760px) { .preorder { grid-template-columns: 1fr; } }

/* ==========================================================================
   5. CONFIGURADOR "DISEÑÁ TU CAMISA"
   (Su lógica está en js/configurator.js; acá solo el aspecto)
   ========================================================================== */
.config__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.config__stage {
  position: sticky; top: calc(var(--header-h) + 1rem);
  background: var(--c-rose);
  border-radius: var(--r-l);
  padding: clamp(1rem, 3vw, 2rem);
  display: grid; justify-items: center; gap: .8rem;
}
.config__stage svg { width: min(100%, 440px); height: auto; overflow: visible; }
.config__stage .shirt-part { cursor: pointer; transition: filter 160ms ease; }
@media (hover: hover) and (pointer: fine) { .config__stage .shirt-part:hover { filter: brightness(1.06); } }
.config__hint { color: var(--c-ink-soft); font-size: var(--fs-small); text-align: center; }

.config__panel { background: var(--c-paper); color: var(--c-ink); border-radius: var(--r-l); padding: clamp(1.3rem, 3vw, 2.2rem); display: grid; gap: 1.6rem; }
.config__panel .field-label { font-family: var(--f-body); font-size: var(--fs-body); font-weight: 700; letter-spacing: 0; line-height: 1.3; }

.dot-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
.dot-grid input { position: absolute; opacity: 0; pointer-events: none; }
.dot { display: block; width: 48px; height: 48px; border-radius: 50%; background: var(--dot); border: 1px solid rgba(0, 0, 0, .22); cursor: pointer; transition: transform 160ms var(--ease-out); }
.dot:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .dot:hover { transform: scale(1.1); } }
input:checked + .dot { outline: 3px solid var(--c-olive-deep); outline-offset: 3px; }
input:focus-visible + .dot { outline: 3px solid var(--c-rose-deep); outline-offset: 7px; }
.config__current { margin-top: .6rem; color: var(--c-ink-soft); font-size: var(--fs-small); }

.config__summary { padding: 1rem 1.1rem; border-radius: var(--r-s); background: var(--c-cream); font-size: var(--fs-small); color: var(--c-ink-soft); }
.config__summary strong { color: var(--c-ink); }
.config__actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

@media (max-width: 900px) {
  .config__grid { grid-template-columns: 1fr; }
  .config__stage { position: static; }
}

/* Modo "Próximamente" (config.js → configurator.comingSoon) */
.config-lock { position: relative; }
@media (max-width: 900px) { .config-lock { max-height: 520px; overflow: hidden; border-radius: var(--r-l); } }
.config__grid.is-locked { filter: blur(9px) saturate(.85); opacity: .85; pointer-events: none; user-select: none; }
.config-lock__overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; }
.config-lock__card {
  display: grid; gap: .5rem; justify-items: center; text-align: center;
  max-width: 24rem; padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1.6rem, 5vw, 2.8rem);
  border-radius: var(--r-l);
  background: var(--c-cream); color: var(--c-ink);
}
.config-lock__badge { font-family: var(--f-display); font-size: var(--fs-h2); line-height: 1.1; color: var(--c-olive-deep); }

/* ==========================================================================
   6. SOBRE MÍ
   ========================================================================== */
.about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about__figure { position: relative; width: min(100%, 560px); justify-self: center; }
.about__figure .arch { background: var(--c-olive); }
.about__stamp { position: absolute; right: -1.2rem; bottom: -1.2rem; color: var(--c-olive-deep); --badge-w: 128px; background: var(--c-rose); border-radius: 50%; padding: 0; }
.about__stamp .logo-badge { --badge-w: 128px; display: block; }
.about__text { display: grid; gap: 1.2rem; }
.about__text p { font-size: var(--fs-lead); color: var(--c-ink); max-width: 44rem; }
.about__sign { color: var(--c-olive-deep); --logo-w: 130px; margin-top: .4rem; }
@media (max-width: 800px) { .about__grid { grid-template-columns: 1fr; } .about__figure { width: min(86%, 380px); } }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer { background: var(--c-olive-deep); color: var(--c-cream); padding-block: clamp(3rem, 6vw, 5rem) 6rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; align-items: start; }
.footer__brand { color: var(--c-rose); --logo-w: 200px; }
.footer__brand-text { margin-top: 1rem; max-width: 22rem; color: rgba(240, 231, 224, .8); }
.footer__title { font-family: var(--f-body); font-size: var(--fs-body); font-weight: 700; letter-spacing: 0; margin-bottom: .8rem; }
.footer__list { display: grid; gap: .4rem; }
.footer__list a { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem 0; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer__list a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.footer__legal { margin-top: 3rem;  font-size: var(--fs-small); color: rgba(240, 231, 224, .7); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Aparición al hacer scroll (js/ui.js → initReveal)
   Los elementos con data-reveal entran con un fundido y un leve movimiento hacia arriba, de a uno (escalonado de 60 ms).
   Solo se activa si la persona NO pidió "reducir movimiento". Sin JavaScript, todo se ve normal.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
}
