/*
  CTA 24 — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy these three
  files into any project and open index.html as-is.
*/

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

:root {
  --slate-900: #0f172a;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --white: #ffffff;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.5;
}

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

.cta {
  padding: clamp(3.5rem, 2.9rem + 2.4vw, 5.5rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.cta__card {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 1rem;
  background-color: var(--slate-900);
}

.cta__copy {
  padding: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.cta__heading {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.cta__description {
  margin: 1rem 0 0;
  max-width: 24rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--slate-300);
}

.cta__form {
  margin-top: 1.75rem;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.625rem;
}

.input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--white);
}

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

.input:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-color: rgba(255, 255, 255, 0.4);
}

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

.input[aria-invalid="true"]:focus-visible {
  outline-color: #f87171;
  border-color: #f87171;
}

.cta__field-error {
  margin: 0.5rem 0 0;
  width: 100%;
  font-size: 0.75rem;
  color: #fca5a5;
}

.cta__field-error[hidden] {
  display: none;
}

.button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.button--primary {
  color: var(--slate-900);
  background-color: var(--white);
}

.button--primary:hover {
  background-color: var(--slate-300);
}

.cta__success {
  margin-top: 1.75rem;
  width: 100%;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.cta__success[hidden] {
  display: none;
}

.coil-frame {
  display: none;
  height: 14rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.coil {
  height: 100%;
  width: 100%;
}

@media (min-width: 640px) {
  .cta__form {
    flex-direction: row;
  }

  .cta__card {
    grid-template-columns: minmax(0, 1fr) 14rem;
  }

  .coil-frame {
    display: flex;
  }
}

/* Motion — disabled entirely under reduced motion; the coil renders static
   at rest and every element already renders at its final, fully visible
   state outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-cta24-float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }

  @keyframes al-cta24-up {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .float {
    animation: al-cta24-float 5200ms ease-in-out infinite;
  }

  .reveal {
    animation: al-cta24-up 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
