/* FinalTech — landing "Pronto"
   Mobile-first. Breakpoints: 640 / 1024 / 1440. Sin !important. */

:root {
  /* Paleta derivada del video */
  --granito-900: #0D1417;
  --granito-700: #1E2A2E;
  --hielo-400:   #A8D4DA;
  --hielo-600:   #5E8C93;
  --arena-300:   #D9BC8F;
  --nieve-50:    #F2F0EC;
  --nieve-400:   rgba(242, 240, 236, .62);

  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 6vw, 4rem);
  --brand-size: 34px;
  --wordmark-size: 1.3rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* En móvil el encuadre se corre para que la familia de pumas no quede cortada */
  --bg-position: 70% center;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--nieve-50);
  background: var(--granito-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fondo: poster (siempre debajo), video, scrim ---------- */

/* Poster como capa base. Es lo único que se ve sin JS, con reduced-motion,
   con saveData o si el video falla. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--granito-900) url("assets/poster.jpg") no-repeat;
  background-size: cover;
  background-position: var(--bg-position);
  pointer-events: none;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--bg-position);
  z-index: -2;
  pointer-events: none;
}

.no-video .bg-video { display: none; }

/* Scrim: gradiente vertical (oscuro arriba y abajo) + velo plano leve.
   Desde 640px se suma un gradiente horizontal desde la izquierda, donde va el
   texto: el glaciar es claro y sin él el subtítulo no llega a AA. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    var(--scrim-side, linear-gradient(90deg, transparent, transparent)),
    linear-gradient(180deg,
      rgba(13, 20, 23, .78) 0%,
      rgba(13, 20, 23, .45) 30%,
      rgba(13, 20, 23, .45) 65%,
      rgba(13, 20, 23, .90) 100%),
    rgba(13, 20, 23, .22);
}

/* ---------- Header ---------- */

.site-header {
  padding: calc(var(--gutter) * .75) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--nieve-50);
}

.brand-mark {
  display: block;
  width: var(--brand-size);
  height: var(--brand-size);
  flex: none;
}

.wordmark {
  display: inline-flex;
  padding: 2px 0 2px 12px;
  border-left: 1px solid color-mix(in srgb, var(--hielo-600) 35%, transparent);
  font-size: var(--wordmark-size);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--nieve-50);
}

.wordmark-light { font-weight: 300; }
.wordmark-bold  { font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.25rem;
  color: var(--hielo-400);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--arena-300);
  flex: none;
}

.hero-title {
  margin: 0;
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 300;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--nieve-50);
}

.hero-subtitle {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, .6rem + 1vw, 1.2rem);
  font-weight: 400;
  color: var(--nieve-400);
}

.hero-rule {
  width: 80px;
  height: 1px;
  margin: 1.75rem 0 0;
  background: color-mix(in srgb, var(--hielo-600) 30%, transparent);
}

/* ---------- Lista de espera ---------- */

.waitlist {
  width: 100%;
  max-width: 30rem;
  margin: 2.25rem 0 0;
}

.waitlist-fields {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.waitlist-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: .85rem 1rem;
  font: inherit;
  line-height: 1.25;
  color: var(--nieve-50);
  background: rgba(13, 20, 23, .35);
  border: 1px solid color-mix(in srgb, var(--hielo-600) 40%, transparent);
  border-radius: 6px;
  transition: border-color .2s ease;
}

.waitlist-input::placeholder { color: var(--nieve-400); }

.waitlist-input:focus-visible {
  border-color: var(--hielo-400);
  outline: 2px solid var(--hielo-400);
  outline-offset: 2px;
}

.waitlist-input[aria-invalid="true"] {
  border-color: color-mix(in srgb, var(--nieve-50) 70%, transparent);
}

.waitlist-button {
  padding: .85rem 1.35rem;
  font: inherit;
  font-weight: 500;
  line-height: 1.25;
  color: var(--granito-900);
  background: var(--hielo-400);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.waitlist-button:hover {
  background: var(--hielo-600);
  color: var(--nieve-50);
}

.waitlist-button:disabled {
  opacity: .6;
  cursor: default;
}

.form-feedback {
  min-height: 1.4em;
  margin: .6rem 0 0;
  font-size: .85rem;
  color: var(--nieve-400);
}

.form-success {
  margin: 0;
  color: var(--nieve-50);
}

.form-success:focus { outline: none; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 1.25rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom));
  font-size: .8rem;
  color: var(--nieve-400);
  text-align: center;
}

/* El único hairline en arena: acento del footer */
.site-footer::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto .9rem;
  background: color-mix(in srgb, var(--arena-300) 45%, transparent);
}

.site-footer p { margin: 0; }

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.site-footer a:hover {
  color: var(--nieve-50);
  border-bottom-color: color-mix(in srgb, var(--hielo-600) 60%, transparent);
}

/* ---------- Foco ---------- */

:focus-visible {
  outline: 2px solid var(--hielo-400);
  outline-offset: 3px;
}

:focus:not(:focus-visible) { outline: none; }

/* ---------- Movimiento: solo la entrada ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 600ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.eyebrow       { --i: 0; }
.hero-title    { --i: 1; }
.hero-subtitle,
.hero-rule     { --i: 2; }
.waitlist      { --i: 3; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Utilidades ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden],
.waitlist[hidden],
.waitlist-fields[hidden],
.form-success[hidden] { display: none; }

/* ---------- Breakpoints ---------- */

@media (min-width: 640px) {
  :root {
    --scrim-side: linear-gradient(90deg,
      rgba(13, 20, 23, .85) 0%,
      rgba(13, 20, 23, .60) 40%,
      rgba(13, 20, 23, 0) 75%);
  }

  .hero {
    align-items: flex-start;
    text-align: left;
  }

  .waitlist-fields { flex-direction: row; }

  .site-footer { text-align: left; }
  .site-footer::before { margin-left: 0; }
}

@media (min-width: 1024px) {
  :root {
    --brand-size: 40px;
    --wordmark-size: 1.45rem;
    --gutter: clamp(3rem, 7vw, 6rem);
    --bg-position: center;
  }

  .hero { padding-block: 2rem; }
}

@media (min-width: 1440px) {
  :root { --gutter: clamp(5rem, 8vw, 8rem); }
}

/* ---------- Reduced motion: sin animaciones (el video de fondo sigue) ---------- */

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

  .waitlist-input,
  .waitlist-button,
  .site-footer a { transition: none; }
}
