*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --white-muted: rgba(255, 255, 255, 0.55);
  --red: #e8192c;
  --red-soft: rgba(232, 25, 44, 0.14);
  --border: rgba(255, 255, 255, 0.22);
  --font-display: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;
  --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
  --screen-h: calc(var(--vh, 1vh) * 100);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body.phase-locked {
  overflow: hidden;
  height: var(--screen-h);
  min-height: 100dvh;
}

body.phase-interactive {
  overflow: hidden;
  height: var(--screen-h);
  min-height: 100dvh;
  touch-action: pan-y;
}

body.phase-interactive[data-scene="waitlist"] {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.phase-snap {
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.phase-snap::-webkit-scrollbar {
  display: none;
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

.viewport {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--screen-h);
  min-height: 100dvh;
  z-index: 10;
}

/* ── Scenes: one protagonist at a time ── */

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  padding: clamp(1rem, 4vw, 2rem);
  padding-top: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-top));
  padding-bottom: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.9s var(--ease-cinematic),
    visibility 0.9s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scene__inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.scene.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 12;
}

.scene--video.is-active {
  z-index: 11;
}

.scene--title.is-active {
  z-index: 11;
}

.scene--message.is-active,
.scene--waitlist.is-active {
  z-index: 12;
}

/* Escena video — blanco y negro, sin glow rojo */

.scene--video .scene__video-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.scene__video {
  width: min(84vw, 640px);
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.08) brightness(0.92);
  margin: 0 auto;
  display: block;
}

body[data-scene="video"] .scene--video {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 11;
}

body[data-scene="title"] .scene--title {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 11;
}

/* ── Título ── */

.title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.8vw, 2.5rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--white);
  width: 100%;
  max-width: 20ch;
  margin: 0 auto;
  animation: titleFadeIn 1s var(--ease-cinematic) both;
}

.title__accent {
  color: var(--red);
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mensaje principal ── */

.message-block {
  width: max-content;
  max-width: calc(100vw - 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  position: relative;
  margin: 0 auto;
}

.message-block__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 4.2vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  white-space: nowrap;
}

.message-block__line {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.6875rem, 2.85vw, 1rem);
  line-height: 1.65;
  color: var(--white);
  white-space: nowrap;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--white);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.typewriter-cursor.is-hidden {
  opacity: 0;
  animation: none;
}

.scene--waitlist.is-active {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

/* ── Waitlist ── */

.waitlist-panel {
  width: min(340px, 100%);
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
  margin: 0 auto;
}

.waitlist-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  text-align: center;
  width: 100%;
  margin-bottom: 0.35rem;
}

.waitlist-panel__subtitle {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--white-muted);
  text-align: center;
  width: 100%;
  margin-bottom: 1.25rem;
}

.waitlist-panel__tagline {
  margin-top: 1rem;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  width: 100%;
}

.form-box {
  width: 100%;
  border: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.5rem;
}

.form-box__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-bottom: 1.25rem;
}

.form-box__type {
  display: block;
  height: clamp(26px, 6.5vw, 32px);
  width: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.form-box__mark {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: auto;
  object-fit: contain;
}

.waitlist {
  width: 100%;
}

.waitlist__fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
}

.field__input {
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
}

.field__input:focus {
  border-bottom-color: var(--white);
}

.field__input--error {
  border-bottom-color: var(--red);
}

.field__error {
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: var(--red);
  line-height: 1.4;
}

.field__error--privacy {
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

.form__error {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--red);
  border: 1px solid var(--red);
  background: var(--red-soft);
}

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
  text-align: left;
}

.privacy__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.privacy__box {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid var(--white);
  position: relative;
}

.privacy__checkbox:checked + .privacy__box {
  background: var(--white);
}

.privacy__checkbox:checked + .privacy__box::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 8px;
  border: solid var(--black);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.privacy__text {
  font-size: 0.75rem;
  color: var(--white-muted);
  line-height: 1.5;
}

.privacy__link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

a.privacy__link {
  display: inline;
}

.privacy__link:hover {
  color: var(--white-muted);
}

.waitlist__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  background: var(--white);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.waitlist__submit:disabled {
  cursor: wait;
  opacity: 0.85;
}

.waitlist__submit-content,
.waitlist__submit-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.waitlist__submit-content[hidden],
.waitlist__submit-loader[hidden] {
  display: none !important;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.waitlist__submit-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--black);
}

.waitlist__vip {
  padding: 0.2rem 0.55rem;
  background: var(--red);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--white);
}

/* ── Footer ── */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 60%, transparent);
  pointer-events: none;
}

.site-footer--landing {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease-cinematic), visibility 0.6s;
}

.site-footer--landing.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}

.site-footer__link {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--white-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__link:hover {
  color: var(--white);
}

.site-footer__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.site-footer__copy {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ── Thank you page ── */

.page-thanks,
.page-legal {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-thanks .site-footer,
.page-legal .site-footer {
  position: relative;
  background: transparent;
  margin-top: auto;
  pointer-events: auto;
}

.thanks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 8vh, 4rem) clamp(1.25rem, 5vw, 2rem);
  padding-bottom: 2rem;
}

.thanks__logo {
  width: clamp(40px, 10vw, 48px);
  height: auto;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.thanks__type {
  height: clamp(28px, 7vw, 36px);
  width: auto;
  margin-bottom: 2rem;
}

.thanks__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 4.5vw, 1.75rem);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  max-width: 22ch;
}

.thanks__message {
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
  color: var(--white-muted);
  line-height: 1.6;
  max-width: 32ch;
  margin-bottom: 2rem;
}

.thanks__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.thanks__back:hover {
  opacity: 0.9;
}

/* ── Legal pages ── */

.legal {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 3.5rem) clamp(1.25rem, 5vw, 2rem) 2rem;
}

.legal__back {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--white-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.legal__back:hover {
  color: var(--white);
}

.legal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  margin-bottom: 1.5rem;
}

.legal__body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--white-muted);
}

.legal__body p + p {
  margin-top: 1rem;
}

.legal__link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal__link:hover {
  color: var(--white-muted);
}

.legal__updated {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
}

.scroll-hint {
  position: fixed;
  bottom: max(clamp(1.25rem, 4vw, 2rem), env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-cinematic);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: max-content;
  max-width: calc(100% - 2rem);
}

.scroll-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-hint__btn {
  display: none;
  margin-top: 0.35rem;
  padding: 0.65rem 1.5rem;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.is-mobile .scroll-hint__btn {
  display: inline-flex;
}

.is-mobile .scroll-hint__line,
.is-mobile .scroll-hint__text {
  display: none;
}

.tap-start {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  border: none;
  padding: 1.5rem;
  cursor: pointer;
  color: var(--white);
  font-family: var(--font-body);
}

.tap-start[hidden] {
  display: none !important;
}

.tap-start__text {
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.scroll-hint__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.45));
  animation: hintPulse 2.2s ease-in-out infinite;
}

.scroll-hint__text {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Privacy modal — legacy, kept for reference if re-enabled */

.privacy-modal {
  border: 1px solid var(--border);
  background: #0a0a0a;
  color: var(--white);
  padding: 0;
  max-width: min(92vw, 480px);
  width: 100%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.privacy-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.privacy-modal__inner {
  padding: 2rem 1.75rem;
  position: relative;
}

.privacy-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--white-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.privacy-modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.privacy-modal__body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--white-muted);
}

.privacy-modal__body p + p {
  margin-top: 1rem;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 580px) {
  .scene__video {
    width: 100vw;
    max-height: 70vh;
  }

  .title {
    max-width: 90%;
    font-size: clamp(1.375rem, 6vw, 2rem);
  }

  .message-block {
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    padding: 0;
  }

  .message-block__headline {
    font-size: clamp(1rem, 4.8vw, 1.75rem);
  }

  .message-block__line {
    font-size: clamp(0.625rem, 2.9vw, 0.9375rem);
  }

  .waitlist-panel {
    width: min(340px, calc(100% - 0.5rem));
    max-height: calc(var(--screen-h) - 6rem);
  }

  .form-box {
    padding: 1rem 1rem 1.25rem;
  }

  .field__input {
    font-size: 16px;
    padding: 0.65rem 0;
  }

  .waitlist__submit {
    min-height: 52px;
  }

  .privacy__text {
    font-size: 0.8125rem;
  }

  .site-footer__nav {
    flex-direction: column;
    gap: 0.35rem;
  }

  .site-footer__sep {
    display: none;
  }

  .scene--waitlist.is-active {
    align-items: flex-start;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .scene--waitlist.is-active .waitlist-panel {
    margin: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.phase-locked {
    overflow: auto;
  }

  .scene {
    transition-duration: 0.01ms;
  }

  .typewriter-cursor {
    display: none;
  }
}
