/* air.build — dark, elegant, minimal */

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

html,
body {
  height: 100%;
}

body {
  background-color: #000;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Fullscreen video background ---- */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.bg-video.is-ready {
  opacity: 1;
}

/* Subtle dark overlay so white text stays readable */
.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.25) 45%,
      rgba(0, 0, 0, 0.55) 100%
    );
}

/* ---- Centered foreground content ---- */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: 24px;
}

/* Entrance: fade in + translate up */
.stage {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.stage.is-in {
  opacity: 1;
  transform: translateY(0);
}

.logo {
  width: clamp(150px, 30vw, 380px);
  height: auto;
  display: block;
}

/* ---- Bottom CTA: tagline that morphs into an email input ---- */

.cta {
  position: absolute;
  bottom: clamp(24px, 6vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tagline {
  width: clamp(90px, 16vw, 180px);
  height: auto;
  display: block;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tagline:hover {
  transform: translateY(-1px);
}

.cta.is-input .tagline {
  opacity: 0;
  pointer-events: none;
}

.cta-form {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cta-form.is-in {
  opacity: 1;
  transform: translateY(0);
}

.cta-input {
  width: min(60vw, 240px);
  padding: 10px 16px;
  font: 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.cta-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.cta-input:focus {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.18);
}

.cta-input.is-invalid {
  border-color: rgba(255, 110, 110, 0.9);
}

.cta-submit {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #0b0f14;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.cta-submit svg {
  display: block;
}

.cta-submit .icon-check {
  display: none;
}

.cta-submit:hover {
  background: #fff;
  transform: scale(1.05);
}

.cta-submit.is-done {
  color: #fff;
  background: #34c759;
  transform: scale(1.08);
  cursor: default;
}

.cta-submit.is-done .icon-arrow {
  display: none;
}

.cta-submit.is-done .icon-check {
  display: block;
  width: 16px;
  height: 16px;
}

.cta-done {
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cta-done.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- SVG line-draw setup ----
   JS measures each path and sets dasharray/dashoffset inline.
   These base styles define stroke look + transitions. */

.draw-svg path {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill-opacity: 0;
  transition:
    stroke-dashoffset 1.6s cubic-bezier(0.65, 0, 0.35, 1),
    fill-opacity 1.1s ease,
    stroke-opacity 1.1s ease;
}

.draw-svg path.is-drawn {
  stroke-dashoffset: 0 !important;
}

.draw-svg path.is-filled {
  stroke-opacity: 0;
}

.logo path.is-filled {
  fill-opacity: 0.7;
}

.tagline path.is-filled {
  fill-opacity: 1;
}

/* ---- Reduced motion: skip everything, show final state ---- */

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

  .bg-video {
    opacity: 1;
    transition: none;
  }

  .draw-svg path {
    transition: none;
    stroke: none;
  }

  .logo path {
    fill-opacity: 0.7;
  }

  .tagline path {
    fill-opacity: 1;
  }
}
