/*
 * Home / landing — Marinera en el Mundo (tema "Órbita").
 * Hero azul noche con el globo del logo girando detrás del afiche; el dorado marca la fecha.
 * El fondo difuminado del hero viene de theme.css. Depende de los tokens --o-* y --portal-*.
 */

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.home-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: var(--ui-width);
  margin: 0 auto;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.home-hero__ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-hero__ribbon path {
  fill: none;
  stroke: var(--o-gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1200;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
  animation: oDraw 2.6s ease-out both 0.3s;
}

.home-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.home-hero__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #34d399;
  animation: homePulse 1.6s ease-out infinite;
}

@keyframes homePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
}

.home-hero__title {
  max-width: 16ch;
  margin: 0;
  color: #fff;
  font-family: var(--portal-font-serif);
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

.home-hero__lead {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--o-on-dark);
  font-size: 1.125rem;
  line-height: 1.6;
}

.home-hero__when {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.home-hero__day {
  color: var(--o-gold);
  font-family: var(--portal-font-serif);
  font-size: clamp(4rem, 8vw, 5.75rem);
  font-weight: 800;
  line-height: 0.8;
}

.home-hero__date {
  display: grid;
  gap: 0.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(200, 162, 74, 0.55);
}

.home-hero__date strong {
  font-size: 1.3rem;
  font-weight: 700;
}

.home-hero__date strong::first-letter {
  text-transform: uppercase;
}

.home-hero__date span {
  color: var(--o-on-dark);
}

.home-hero__modalities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.home-hero__modalities li {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: var(--o-navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.home-hero__actions .ui-btn {
  min-height: 3.4rem;
  padding: 0 2rem;
  font-size: 1.1rem;
}

.home-countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.home-countdown div {
  min-width: 4.5rem;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.home-countdown strong {
  display: block;
  color: var(--o-gold);
  font-family: var(--portal-font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.home-countdown span,
.home-countdown p {
  margin: 0;
  color: var(--o-on-dark);
  font-size: 0.85rem;
}

.home-hero__copy > * {
  animation: oFadeUp var(--portal-dur-slow) var(--portal-ease) backwards;
}

.home-hero__copy > :nth-child(2) { animation-delay: 80ms; }
.home-hero__copy > :nth-child(3) { animation-delay: 160ms; }
.home-hero__copy > :nth-child(4) { animation-delay: 240ms; }
.home-hero__copy > :nth-child(5) { animation-delay: 320ms; }
.home-hero__copy > :nth-child(6) { animation-delay: 400ms; }

/* Visual: globo + órbita + afiche flotando. */
.home-hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 420px;
}

.home-hero__globe {
  position: absolute;
  width: min(480px, 100%);
  height: auto;
  opacity: 0.5;
  pointer-events: none;
}

.home-hero__globe circle,
.home-hero__globe ellipse,
.home-hero__globe line {
  fill: none;
  stroke: var(--o-steel);
  stroke-width: 1.2;
}

.home-hero__meridian {
  transform-box: fill-box;
  transform-origin: center;
  animation: homeSpin 9s linear infinite;
}

@keyframes homeSpin {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(-1); }
}

.home-hero__orbit {
  position: absolute;
  width: min(520px, 100%);
  aspect-ratio: 1;
  border: 1px dashed rgba(200, 162, 74, 0.45);
  border-radius: 50%;
  animation: homeOrbit 22s linear infinite;
  pointer-events: none;
}

.home-hero__orbit span {
  position: absolute;
  top: -7px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--o-gold);
  box-shadow: 0 0 16px rgba(200, 162, 74, 0.8);
}

@keyframes homeOrbit {
  to { transform: rotate(360deg); }
}

.home-hero__poster {
  position: relative;
  display: block;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 40px 80px -30px rgba(0, 0, 0, 0.75);
  animation:
    homeReveal 900ms var(--portal-ease) 120ms backwards,
    homeFloat 7s ease-in-out 1s infinite;
}

@keyframes homeReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
}

@keyframes homeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* El afiche se muestra completo: nunca se recorta ni se usa de fondo. */
.home-hero__poster img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(600px, 70vh);
}

.home-hero__poster--wide img {
  width: 100%;
  max-height: none;
}

.home-hero__poster--logo {
  width: min(100%, 420px);
  padding: 2.5rem;
  background: #fff;
}

.home-hero__poster--logo img {
  width: 100%;
}

/* ---------- Cuerpo ---------- */
.home-body {
  width: var(--ui-width);
  margin: 0 auto;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.home-section {
  padding-block: clamp(3rem, 6vw, 4.5rem) 0;
}

.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
}

.home-section__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--o-gold-ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-section__title {
  margin: 0;
  color: var(--o-night);
  font-family: var(--portal-font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

/* Agenda: tarjetas con afiche y fecha. */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--o-line);
  border-radius: var(--o-radius);
  background: #fff;
  transition: transform var(--portal-dur-base) var(--portal-ease), box-shadow var(--portal-dur-base) var(--portal-ease);
  animation: oFadeUp 0.6s var(--portal-ease) both;
}

.home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -16px rgba(7, 15, 36, 0.28);
}

.home-card__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 190px;
  overflow: hidden;
  background: var(--o-aurora);
}

.home-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s var(--portal-ease);
}

.home-card:hover .home-card__media img {
  transform: scale(1.05);
}

.home-card__media .home-card__logo {
  width: 70%;
  height: auto;
  object-fit: contain;
}

.home-card__date {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: var(--o-night);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.home-card__date span {
  display: block;
  color: var(--o-gold);
  font-family: var(--portal-font-serif);
  font-size: 1.75rem;
  font-weight: 800;
}

.home-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.2rem 1.25rem 1.35rem;
}

.home-card__status {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eef0f4;
  color: #33415c;
  font-size: 0.8rem;
  font-weight: 700;
}

.home-card__status--open {
  background: #ddf7ec;
  color: #05603a;
}

.home-card__status--upcoming {
  background: #fbf3df;
  color: #6b4f12;
}

.home-card__name {
  margin: 0;
  font-family: var(--portal-font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.home-card__name a {
  color: var(--o-ink);
}

.home-card__name a:hover {
  color: var(--o-navy);
}

.home-card__place {
  margin: 0;
  color: var(--o-muted);
}

.home-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Pasos: tarjetas numeradas. */
.home-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: home-step;
}

.home-steps__item {
  padding: 1.75rem;
  border: 1px solid var(--o-line);
  border-radius: var(--o-radius);
  background: #fff;
  counter-increment: home-step;
}

.home-steps__item::before {
  content: counter(home-step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.6rem;
  color: var(--o-gold-ink);
  font-family: var(--portal-font-serif);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
}

.home-steps__item h3 {
  margin: 0 0 0.4rem;
  color: var(--o-ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.home-steps__item p {
  margin: 0;
  color: var(--o-muted);
  line-height: 1.6;
}

/* Verificación rápida. */
.home-verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: 28px;
  color: #fff;
}

.home-verify > div {
  flex: 1 1 340px;
}

.home-verify__title {
  margin: 0 0 0.4rem;
  color: #fff;
  font-family: var(--portal-font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
}

.home-verify p {
  margin: 0;
  color: var(--o-on-dark);
  font-size: 1.05rem;
}

.home-verify__form {
  display: flex;
  flex: 1 1 380px;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-verify__form input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.home-verify__form .ui-btn {
  min-height: 3.25rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
    padding-block: 2.5rem 3.5rem;
  }

  .home-hero__visual {
    min-height: 0;
    padding-block: 1.5rem;
  }

  .home-hero__poster img {
    max-height: 520px;
  }
}

@media (max-width: 575.98px) {
  .home-hero__actions .ui-btn,
  .home-verify__form .ui-btn {
    width: 100%;
  }

  .home-hero__poster img {
    max-height: 440px;
  }

  .home-countdown p {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__ribbon path,
  .home-hero__dot,
  .home-hero__meridian,
  .home-hero__orbit,
  .home-hero__poster,
  .home-hero__copy > *,
  .home-card {
    animation: none !important;
  }
}
