/* Landing de invitación. Se apoya en los tokens y componentes de site.css. */

:root {
  --cond: "Barlow Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
html { background: var(--oliva); }
body.inv { background: var(--oliva); }  /* Safari toma este color para teñir la barra */
::selection { background: var(--verde-claro); color: var(--oliva-oscuro); }
:focus-visible { outline: 2px solid var(--verde-claro); outline-offset: 3px; }
.inv-reg :focus-visible, .inv-donde :focus-visible { outline-color: var(--oliva); }

/* ---------- Portada ---------- */
.inv-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--beige);
  background: var(--oliva);
  overflow: hidden;
  isolation: isolate;
}
.inv-hero__img { position: absolute; inset: 0; z-index: -2; }
.inv-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform-origin: 50% 70%; }
/* Oliva arriba (sólido en el borde: Safari toma ese color para teñir la barra) y abajo (detrás del texto). */
.inv-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(72, 90, 38) 0%, rgba(72, 90, 38, .82) 8%, rgba(72, 90, 38, .3) 20%, rgba(72, 90, 38, 0) 32%),
    linear-gradient(0deg, rgba(52, 66, 27, .95) 0%, rgba(52, 66, 27, .78) 28%, rgba(52, 66, 27, 0) 55%);
}
.inv-hero__brand { display: flex; justify-content: center; padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 0; }
.inv-hero__brand img { width: clamp(92px, 22vw, 128px); height: auto; }

.inv-hero__body {
  grid-row: 3;
  width: min(100% - 2.5rem, 1080px);
  margin-inline: auto;
  padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1.25rem));
}
.inv-hero__title {
  font-weight: 300;
  font-size: clamp(2.3rem, 9.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 1.1rem;
  max-width: 11ch;
  color: #fff;
  text-wrap: balance;
}
.inv-date {
  display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .9rem; row-gap: .1rem;
  font-family: var(--cond); font-weight: 500; text-transform: uppercase;
  color: var(--verde-claro);
  margin: 0 0 1.6rem;
}
.inv-date__day { font-size: clamp(2.6rem, 12vw, 4.4rem); line-height: .9; letter-spacing: .01em; }
.inv-date__rest { font-size: clamp(1.1rem, 4.4vw, 1.5rem); letter-spacing: .12em; line-height: 1.2; }
.inv-hero .btn--primary { min-width: min(100%, 18rem); }

/* ---------- Cuenta regresiva ---------- */
.inv-count {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--oliva); color: var(--beige);
  padding-block: clamp(4rem, 12vw, 7rem);
}
.inv-count__rama {
  position: absolute; z-index: -1; pointer-events: none;
  width: clamp(420px, 120vw, 1100px); right: -32%; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  opacity: .09;
}
.inv-count__inner { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }
.inv-count__lead { font-size: clamp(1.05rem, 3.6vw, 1.25rem); color: var(--verde-claro); margin: 0 0 .6rem; font-weight: 500; }
.inv-cd { display: flex; flex-wrap: wrap; gap: 0 clamp(1rem, 4vw, 2.5rem); margin: 0 0 2rem; font-family: var(--cond); }
.inv-cd__unit { display: flex; align-items: baseline; gap: .35rem; }
.inv-cd__n { font-size: clamp(4.2rem, 20vw, 8.5rem); font-weight: 500; line-height: .95; color: #fff; font-variant-numeric: tabular-nums; }
.inv-cd__l { font-size: clamp(.95rem, 3.4vw, 1.3rem); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--verde-claro); }
.inv-cd__unit--s { display: none; }
.countdown--over .inv-cd__n { opacity: .45; }
.inv-count__text { font-size: clamp(1.15rem, 4vw, 1.6rem); font-weight: 300; line-height: 1.35; max-width: 26ch; margin: 0 0 1.8rem; color: var(--beige); text-wrap: balance; }
.inv-count__text strong { font-weight: 500; color: #fff; }
.btn--light { background: transparent; color: var(--beige); box-shadow: inset 0 0 0 1.5px rgba(242, 236, 226, .55); }
.btn--light:hover { box-shadow: inset 0 0 0 1.5px var(--verde-claro); color: var(--verde-claro); }
.btn--light[aria-disabled="true"] { opacity: .6; cursor: default; }
.btn--light svg { width: 1.05em; height: 1.05em; }

/* ---------- Registro ---------- */
.inv-reg { background: var(--beige); padding-block: clamp(3.5rem, 10vw, 6rem); scroll-margin-top: 0; }
.inv-reg__inner { width: min(100% - 2.5rem, 1080px); margin-inline: auto; display: grid; gap: 2rem; }
.inv-reg h2 { font-size: clamp(2rem, 7.5vw, 3.2rem); font-weight: 300; color: var(--oliva); letter-spacing: -.02em; margin: 0 0 .6rem; }
.inv-reg__intro p { color: var(--tinta-suave); font-size: 1.05rem; max-width: 34ch; margin: 0; }
.inv-reg .form-card { box-shadow: 0 24px 60px -36px rgba(52, 66, 27, .45); border-radius: 22px; }
.inv-reg .field span { letter-spacing: .04em; }
.inv-reg .form-note { text-align: center; }
.inv-reg .confirm__head h2 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); }
.inv-reg__inner.is-confirmed { grid-template-columns: 1fr; }
.inv-reg__inner.is-confirmed .confirm { width: min(100%, 30rem); margin-inline: auto; text-align: center; }
.inv-reg__inner.is-confirmed .pass { text-align: left; }
.inv-reg__inner.is-confirmed .confirm__head { margin-inline: auto; }
.inv-reg__inner.is-confirmed .confirm__head p { margin-inline: auto; max-width: 34ch; }

/* ---------- Dónde ---------- */
.inv-donde { background: var(--beige); padding-bottom: clamp(3.5rem, 10vw, 6rem); }
.inv-donde__inner { width: min(100% - 2.5rem, 1080px); margin-inline: auto; display: grid; gap: 1.75rem; align-items: center; }
.inv-donde__img { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--beige-2); }
.inv-donde__img img { width: 100%; height: 100%; object-fit: cover; }
.inv-donde h2 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); font-weight: 300; color: var(--oliva); letter-spacing: -.02em; margin: 0 0 1rem; }
.inv-donde dl { margin: 0 0 1.6rem; display: grid; gap: .9rem; }
.inv-donde dt { font-family: var(--cond); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: .95rem; color: var(--oliva-suave); }
.inv-donde dd { margin: .1rem 0 0; font-size: 1.1rem; color: var(--tinta); }

/* ---------- Pie ---------- */
.inv-foot { background: var(--oliva); color: rgba(242, 236, 226, .8); text-align: center; padding: 3rem 1.25rem max(2.5rem, calc(env(safe-area-inset-bottom) + 1.5rem)); }
.inv-foot__cipres { width: 88px; margin: 0 auto; }
/* Firma del desarrollador: filete corto, "Desarrolla" en condensada y el logo de Deltamorphosis. */
.inv-foot__dev { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin: 2.25rem auto 0; padding-top: 2rem; width: min(100%, 15rem); position: relative; }
.inv-foot__dev::before { content: ""; position: absolute; top: 0; left: 50%; width: 2.5rem; height: 1px; transform: translateX(-50%); background: rgba(225, 232, 164, .45); }
.inv-foot__label { font-family: var(--cond); font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--verde-claro); font-size: .8rem; line-height: 1; padding-left: .28em; }
.inv-foot__delta { display: block; width: 168px; height: auto; opacity: .92; }
.inv-foot__legal { font-size: .75rem; max-width: 34rem; margin: 2.25rem auto 0; opacity: .7; }
.inv-foot__legal a { color: inherit; text-underline-offset: 3px; margin-left: .35em; }

/* ---------- Movimiento: un solo momento, la portada se asienta ---------- */
@media (prefers-reduced-motion: no-preference) {
  .inv-hero__img img { animation: settle 2.4s var(--ease-out) both; }
  .inv-hero__body > * { animation: rise 1s var(--ease-out) both; }
  .inv-hero__body > :nth-child(2) { animation-delay: .12s; }
  .inv-hero__body > :nth-child(3) { animation-delay: .24s; }
  .inv-hero__brand img { animation: rise 1s var(--ease-out) .1s both; }
}
@keyframes settle { from { transform: scale(1.08); filter: saturate(.8); } to { transform: scale(1); filter: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 760px) {
  .inv-hero__brand { justify-content: flex-start; width: min(100% - 2.5rem, 1080px); margin-inline: auto; padding: 2rem 0 0; }
  .inv-hero__body { padding-bottom: clamp(3rem, 7vh, 5rem); }
  .inv-hero__img img { object-position: 50% 55%; }
  /* En pantalla ancha el texto vive a la izquierda: velo oliva lateral para que se lea sobre el render. */
  .inv-hero::before {
    background:
      linear-gradient(180deg, rgb(72, 90, 38) 0%, rgba(72, 90, 38, .75) 7%, rgba(72, 90, 38, 0) 24%),
      linear-gradient(90deg, rgba(52, 66, 27, .92) 0%, rgba(52, 66, 27, .72) 28%, rgba(52, 66, 27, .2) 52%, rgba(52, 66, 27, 0) 66%),
      linear-gradient(0deg, rgba(52, 66, 27, .7) 0%, rgba(52, 66, 27, 0) 35%);
  }
  .inv-count__rama { right: -12%; width: 900px; }
  .inv-cd__unit--s { display: flex; }
  .inv-reg__inner { grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: start; }
  .inv-reg__intro { position: sticky; top: 3rem; }
  .inv-donde__inner { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; }
}
