@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --negro: #000;
  --crema: #f2ede4;
  --rojo: #e0412b;
  --gris: #8a857d;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: var(--negro); color: var(--crema); }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* El logo ocupa el espacio libre; el texto va debajo, sin pisarlo */
.media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* Imagen fija debajo; el vídeo solo se muestra si de verdad se reproduce,
   así nunca sale el botón de play de Safari */
.still, .ident {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--negro);
}
.ident { opacity: 0; }
.is-playing .ident { opacity: 1; }
.ident::-webkit-media-controls,
.ident::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

/* Texto que aparece cuando el logo se queda quieto */
.after {
  position: relative;
  z-index: 1;
  flex: none;
  margin-top: -2vh;
  text-align: center;
  padding: 0 16px;
  pointer-events: none;
}

.after > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.claim {
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.02em;
}
.claim span { color: var(--rojo); }

.sub {
  margin-top: 10px;
  font-weight: 500;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gris);
}

.mail {
  margin-top: 18px;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 500;
}
.mail a {
  color: var(--crema);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 237, 228, 0.3);
  padding-bottom: 2px;
  pointer-events: auto;
  transition: color 200ms ease, border-color 200ms ease;
}
.mail a:focus-visible { outline: 2px solid var(--rojo); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .mail a:hover { color: var(--rojo); border-color: var(--rojo); }
}

.sub span { white-space: nowrap; }
@media (max-width: 560px) {
  .sub span { display: block; }
  .sub .sep { display: none; }
  .sub span + .sep + span { margin-top: 6px; }
}

.is-done .after > * { opacity: 1; transform: none; }
.is-done .sub { transition-delay: 180ms; }
.is-done .mail { transition-delay: 360ms; }


.foot {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex; justify-content: center; gap: 20px;
  padding: clamp(28px, 6vh, 64px) 16px calc(18px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--gris);
  opacity: 0;
  transition: opacity 700ms var(--ease-out) 400ms;
}
.is-done .foot { opacity: 1; }
.foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.foot a:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .foot a:hover { color: var(--crema); }
}

/* Móvil en vertical: vídeo cuadrado centrado */
@media (max-aspect-ratio: 1/1) {
  .stage { justify-content: center; }
  .media { flex: 0 1 auto; width: min(100%, 70vh); aspect-ratio: 1 / 1; }
  .after { margin-top: -4vh; }
}

@media (prefers-reduced-motion: reduce) {
  .after > *, .foot { transition: none; }
}

/* Página de aviso legal */
.legal {
  overflow: auto;
}
.legal main {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 16px 80px;
  line-height: 1.65;
  font-size: 15px;
}
.legal h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 24px 0 24px; }
.legal h2 { font-size: 17px; font-weight: 700; margin: 32px 0 8px; }
.legal p, .legal li { color: #d6d0c6; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--crema); text-underline-offset: 3px; }
.legal .back { font-size: 13px; color: var(--gris); }
.legal .logo { width: 48px; height: 48px; }
