/* ==========================================================
   Port Samana — Coming Soon
   Breakpoints (según Figma):
   - Móvil:   < 600px   (frame 402px)
   - Tablet:  600–1023px (frame iPad 774px)
   - Desktop: >= 1024px (frame MacBook 1728px)
   ========================================================== */

/* Transat se carga desde Adobe Fonts (kit pdc3lzu) en el <head> */

:root {
  --verde-samana: #1c5633;
  --verde-oscuro: #163029;
  --crema: #fff9f1;
  --gris-placeholder: #929997;
  --blanco: #ffffff;
  --blanco-boton: #f5f5f5;
  --arena: #f8f4ea;
  --verde-boton: #1c5633;
  --verde-suave: #1c5633;
  --linea: #cfcec3;

  --font-title: 'transat', 'Outfit', 'Poppins', sans-serif;
  --font-subtitle: 'transat-text', 'transat', 'Outfit', 'Poppins', sans-serif;
  --font-body: "Gabarito", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--arena);
  color: var(--verde-oscuro);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.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;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: 140px 9px 32px;
  overflow: hidden;
  background: var(--verde-oscuro);
  color: var(--blanco);
  text-align: center;
}

/* Fondo animado (vídeo en loop) con la foto como respaldo mientras carga.
   Es más alto que el header para tener recorrido en el parallax. */
.hero__bg {
  position: absolute;
  top: -20%;
  right: 0;
  bottom: -20%;
  left: 0;
  background: url("../img/hero.png") center / cover no-repeat;
  will-change: transform;
}

.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Sin botón de play ni controles nativos (iOS los muestra si bloquea el autoplay) */
.hero__video::-webkit-media-controls,
.hero__video::-webkit-media-controls-panel,
.hero__video::-webkit-media-controls-overlay-play-button,
.hero__video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 48, 41, 0) 21.656%, rgba(28, 86, 51, 0.8) 85.581%);
}

/* Logo en blanco sobre el cielo. El JS calcula su "top" para que la base
   toque la línea del horizonte del vídeo y lo mueve junto con el parallax. */
.hero__logo {
  position: absolute;
  top: 28px;
  left: 50%;
  z-index: 1;
  width: 220px;
  height: auto;
  transform: translate(-50%, var(--parallax-y, 0px));
  /* Verde original del logo, con un halo claro suave para separarlo del cielo.
     Versión en blanco: filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(22, 48, 41, 0.45)); */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 700;
  /* Siempre en una sola línea: el tamaño se adapta al ancho de pantalla */
  font-size: clamp(30px, 12.5vw, 64px);
  line-height: 1.1;
  white-space: nowrap;
}

/* Cuenta regresiva */
.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 10px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(22, 48, 41, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.countdown__value {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(22, 48, 41, 0.6);
}

.countdown__value.is-tick {
  animation: tick 0.45s ease;
}

.countdown__label {
  margin-top: 6px;
  font-family: var(--font-subtitle);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.12em;
}

@keyframes tick {
  from {
    opacity: 0;
    transform: translateY(-40%);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Animación de escritura de COMING SOON.
   Cada letra ya ocupa su sitio (invisible), así el texto no salta al escribirse. */
.typing .typing__char {
  opacity: 0;
}

.typing .typing__char.is-visible {
  opacity: 1;
}

/* El cursor va pegado a la última letra escrita (sin ocupar espacio) */
.typing__char {
  position: relative;
}

.typing__char.is-current::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 0.05em;
  height: 0.75em;
  margin-left: 0.04em;
  background: currentColor;
  transform: translateY(-50%);
  animation: caret-blink 0.8s steps(1) infinite;
}

/* Countdown: oculto hasta terminar la primera escritura, entra una sola vez y queda fijo */
.countdown.is-hidden {
  opacity: 0;
}

.countdown.is-in {
  animation: countdown-in 0.8s ease both;
}

@keyframes countdown-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Contenido ---------- */
.main {
  flex: 0 0 auto;
  padding: 40px 20px 0;
}

.main__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 40px;
  max-width: 480px;
  margin: 0 auto;
}

.intro {
  width: 100%;
  font-family: var(--font-body);
}

.intro__eyebrow {
  font-family: var(--font-title);
  margin-bottom: 10px;
  color: var(--verde-suave);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.intro__title {
  margin-bottom: 16px;
  color: var(--verde-oscuro);
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.intro__tagline {
  font-family: var(--font-title);
  margin-bottom: 12px;
  color: var(--verde-samana);
  font-size: 16px;
  font-weight: 700;
}

.intro__lead {
  color: var(--verde-oscuro);
  font-size: 15px;
  line-height: 1.6;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  align-items: flex-start;
}

.feature__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 6px;
  object-fit: contain;
}

.feature__body {
  margin-left: 18px;
  padding: 2px 0 2px 18px;
  border-left: 1px solid var(--linea);
}

.feature__title {
  margin-bottom: 4px;
  color: var(--verde-samana);
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.feature__text {
  color: #2a3a37;
  font-size: 14px;
  line-height: 1.6;
}

.aside {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.intro__closing {
  font-family: var(--font-title);
  margin-top: 28px;
  text-align: center;
  color: var(--verde-samana);
  font-size: 16px;
  font-weight: 700;
}

/* Tarjeta del formulario */
.signup {
  width: 100%;
  padding: 36px 24px 32px;
  border: 1px solid rgba(28, 86, 51, 0.45);
  border-radius: 12px;
  background: #fcf9f2;
  box-shadow: 0 18px 40px rgba(22, 48, 41, 0.08);
}

.signup__title {
  margin-bottom: 12px;
  color: var(--verde-oscuro);
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.signup__subtitle {
  margin-bottom: 28px;
  color: var(--verde-oscuro);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
}

.signup__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.signup__input {
  width: 100%;
  height: 50px;
  padding: 0 26px;
  border: 1px solid rgba(28, 86, 51, 0.6);
  border-radius: 60px;
  background: transparent;
  color: var(--verde-oscuro);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.signup__input::placeholder {
  color: #767a79;
  opacity: 1;
}

.signup__input:focus {
  border-color: var(--verde-samana);
  box-shadow: 0 0 0 3px rgba(28, 86, 51, 0.15);
}

.signup__input[aria-invalid="true"] {
  border-color: #b3261e;
}

.signup__button {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  padding: 0 21px;
  border: none;
  border-radius: 60px;
  background: var(--verde-boton);
  color: var(--blanco-boton);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.signup__button:hover,
.signup__button:focus-visible {
  background: var(--verde-oscuro);
}

.signup__message:empty {
  min-height: 0;
}

/* Honeypot antibot: invisible para personas */
.signup__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.signup__message {
  min-height: 1.2em;
  font-size: 14px;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  padding: 32px 0 0;
  text-align: center;
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18.5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__social a {
  display: block;
  transition: opacity 0.2s ease;
}

.footer__social a:hover {
  opacity: 0.75;
}

.footer__social li:nth-child(1) img,
.footer__social li:nth-child(2) img {
  width: 24.6px;
  height: 24.6px;
}

.footer__social li:nth-child(3) img {
  width: 34.5px;
  height: 22.2px;
}

.footer__copy {
  padding: 8px 0 18px;
  color: #324a3d;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: normal;
}

/* ---------- Popup de agradecimiento ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 48, 41, 0.6);
  animation: modal-fade 0.25s ease;
}

.modal__box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  padding: 40px 28px 28px;
  border-radius: 24px;
  background: var(--crema);
  text-align: center;
  box-shadow: 0 20px 50px rgba(22, 48, 41, 0.3);
  animation: modal-in 0.3s ease;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  color: var(--verde-oscuro);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal__logo {
  width: 180px;
  height: auto;
}

.modal__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
}

.modal__text {
  font-size: 16px;
  line-height: 22px;
}

.modal__button {
  margin-top: 8px;
  height: 38px;
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
}

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

/* ==========================================================
   Tablet (iPad)
   ========================================================== */
@media (min-width: 600px) {
  .br-mobile {
    display: none;
  }

  .hero {
    min-height: 480px;
    padding: 120px 32px 40px;
  }

  .hero__logo {
    top: 32px;
    width: 270px;
  }

  .hero__content {
    gap: 26px;
  }

  .hero__title {
    font-size: clamp(64px, 11vw, 80px);
    line-height: normal;
  }

  .countdown {
    gap: 14px;
  }

  .countdown__item {
    min-width: 92px;
    padding: 14px 10px 10px;
  }

  .countdown__value {
    font-size: 40px;
  }

  .countdown__label {
    font-size: 12px;
  }

  .main {
    padding: 56px 40px 0;
  }

  .main__inner {
    max-width: 600px;
    gap: 48px;
  }

  .intro__eyebrow {
    font-size: 13px;
  }

  .intro__title {
    font-size: 46px;
  }

  .intro__tagline {
    font-size: 17px;
  }

  .intro__lead {
    font-size: 17px;
  }

  .features {
    gap: 26px;
    margin-top: 30px;
  }

  .feature__icon {
    width: 50px;
    height: 50px;
  }

  .feature__body {
    margin-left: 26px;
    padding-left: 30px;
  }

  .feature__title {
    font-size: 23px;
  }

  .feature__text {
    font-size: 15px;
  }

  .intro__closing {
    font-size: 18px;
  }

  .signup {
    padding: 52px 46px 40px;
  }

  .signup__title {
    font-size: 42px;
    margin-bottom: 16px;
  }

  .signup__subtitle {
    font-size: 17px;
    margin-bottom: 44px;
  }

  .signup__form {
    gap: 26px;
  }

  .signup__input {
    height: 58px;
    padding: 0 32px;
    font-size: 17px;
  }

  .signup__button {
    height: 58px;
    font-size: 17px;
  }

  .footer {
    padding-top: 36px;
  }

  .footer__social {
    gap: 24px;
  }

  .footer__social li:nth-child(1) img,
  .footer__social li:nth-child(2) img {
    width: 32px;
    height: 32px;
  }

  .footer__social li:nth-child(3) img {
    width: 44.8px;
    height: 28.9px;
  }

  .footer__copy {
    padding: 12px 0 16px;
  }
}

/* ==========================================================
   Desktop
   ========================================================== */
@media (min-width: 1024px) {

  /* Header + contenido + footer caben en una sola pantalla:
     el header se queda con el alto que sobra */
  .hero {
    flex: 0 0 auto;
    height: clamp(440px, 56vh, 640px);
    height: clamp(440px, 56svh, 640px);
    min-height: 300px;
    padding: clamp(96px, 16vh, 160px) 32px clamp(24px, 4vh, 48px);
  }

  .hero__logo {
    top: clamp(20px, 4vh, 40px);
    width: clamp(200px, 30vh, 320px);
  }

  .hero__content {
    gap: clamp(16px, 3vh, 28px);
  }

  .hero__title {
    font-size: min(clamp(72px, 12vh, 120px), 10vw);
  }

  .countdown {
    gap: 18px;
  }

  .countdown__item {
    min-width: clamp(90px, 11vh, 112px);
    padding: clamp(10px, 1.6vh, 16px) 12px clamp(8px, 1.2vh, 12px);
  }

  .countdown__value {
    font-size: clamp(36px, 5.5vh, 52px);
  }

  .countdown__label {
    font-size: 13px;
  }

  .main {
    padding: 80px 48px 0;
  }

  .main__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 56px;
    max-width: 1370px;
  }

  .intro {
    flex: 1 1 auto;
    max-width: 730px;
  }

  .intro__title {
    font-size: clamp(44px, 3.6vw, 56px);
  }

  .intro__lead {
    max-width: 625px;
    font-size: 18px;
    line-height: 1.6;
  }

  .feature__text {
    max-width: 460px;
  }

  .aside {
    flex: 0 0 auto;
    width: clamp(440px, 37vw, 580px);
    margin-top: -16px;
  }

  .signup__title {
    font-size: clamp(40px, 3vw, 48px);
  }

  .signup__subtitle {
    max-width: 470px;
    font-size: 18px;
  }

  .signup__input,
  .signup__button {
    height: 60px;
  }

  .signup__input {
    font-size: 17px;
  }

  .footer {
    padding-top: 56px;
  }

  .footer__copy {
    padding: 10px 0 clamp(12px, 2vh, 20px);
  }
}