/*
  KinConfirm Waitlist Styles
  Palette (brand shield):
  --shield-teal: #06A1BE; --shield-aqua: #29D8EB; --shield-shine: #A2FAFD
  UI Base: --white: #FFFFFF; --gray: #111827
*/

:root {
  /* Legacy tokens mapped to brand palette for compatibility */
  --blue: #06a1be; /* teal */
  --green: #29d8eb; /* aqua */
  --white: #ffffff;
  --gray: #111827;
  /* Brand tokens */
  --shield-teal: #06a1be;
  --shield-aqua: #29d8eb;
  --shield-shine: #a2fafd;
  /* Background tints using rgb components */
  --bg-1: 255, 255, 255; /* white */
  --bg-2: 6, 161, 190; /* teal */
  --bg-3: 41, 216, 235; /* aqua */
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--gray);
  background:
    radial-gradient(
      1200px 600px at 80% -20%,
      rgba(var(--bg-2), 0.24),
      transparent 60%
    ),
    radial-gradient(
      1000px 500px at -10% 110%,
      rgba(var(--bg-3), 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, #f8faff 0%, #f0f6ff 100%);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.5;
}

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.brand-name a {
  text-decoration: none;
  padding: 0;
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start; /* move content closer to top */
  padding-top: clamp(8px, 2vh, 16px);
}

.copy h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin: 8px 0 16px 0;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #374151;
  margin-bottom: 28px;
}


.store-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.store-link {
  display: inline-block;
  line-height: 0;
  border-radius: 0;
  transition: transform 160ms ease;
}

.store-link:hover {
  transform: translateY(-2px);
}

.store-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(6, 161, 190, 0.28);
}

.store-badge {
  display: block;
  height: 60px;
  width: auto;
  border-radius: 0;
}

.btn-primary {
  height: 48px;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  color: var(--white);
  background: var(--blue);
  cursor: pointer;
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
  box-shadow: 0 10px 30px rgba(6, 161, 190, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(6, 161, 190, 0.32);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-spinner {
  --s: 16px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  display: inline-block;
  opacity: 0;
  transform: scale(0.8);
  position: absolute;
  right: 12px;
}
.loading .btn-spinner {
  animation: spin 900ms linear infinite;
  opacity: 1;
  transform: scale(1);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status {
  margin-top: 14px;
  min-height: 22px;
  font-weight: 600;
}
.status.success {
  color: var(--blue);
}
.status.error {
  color: #dc2626;
}

/* Reveal animations */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
}
.reveal.revealed {
  animation: fadeUp 600ms ease-out forwards;
}
.delay-1 {
  animation-delay: 80ms;
}
.delay-2 {
  animation-delay: 160ms;
}
.delay-3 {
  animation-delay: 240ms;
}
.delay-4 {
  animation-delay: 320ms;
}

.visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.phone-frame {
  position: relative;
  border-radius: 24px;
  padding: 8px;
  /* backdrop-filter: saturate(140%) blur(10px); */
  /* box-shadow:
    0 30px 80px rgba(17, 24, 39, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6); */
  overflow: hidden;
  transform: perspective(600px) rotateY(-6deg) rotateX(1deg) translateY(0);
  animation: float 6s ease-in-out infinite;
  max-width: 400px; /* match native image size to prevent upscaling blur */
  margin: -60px auto 0; /* move significantly up and center horizontally */
}
.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast; /* crisper scaling in WebKit */
}

@keyframes float {
  0%,
  100% {
    transform: perspective(600px) rotateY(-6deg) rotateX(1deg) translateY(0);
  }
  50% {
    transform: perspective(600px) rotateY(-6deg) rotateX(1deg) translateY(-8px);
  }
}

.footer {
  padding-top: 8px;
  padding-bottom: 32px;
  color: #6b7280;
}

/* Animated ambient background */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      800px 400px at 10% 15%,
      rgba(var(--bg-2), 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 450px at 90% 85%,
      rgba(var(--bg-3), 0.16),
      transparent 60%
    ),
    linear-gradient(180deg, #f8faff 0%, #f0f6ff 100%);
}

/* Confetti/check burst */
.burst {
  position: relative;
}
.burst::after {
  content: "";
  position: absolute;
  inset: -12px;
  pointer-events: none;
  background: conic-gradient(
    from 90deg,
    var(--green),
    transparent 25%,
    var(--blue),
    transparent 25%
  );
  -webkit-mask: radial-gradient(circle at center, transparent 20px, #000 21px);
  mask: radial-gradient(circle at center, transparent 20px, #000 21px);
  opacity: 0;
  transform: scale(0.9);
  border-radius: 50%;
}
.burst-active::after {
  animation: burst 700ms ease forwards;
}
@keyframes burst {
  0% {
    opacity: 0;
    transform: scale(0.85);
    filter: blur(8px);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
    filter: blur(6px);
  }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .phone-frame {
    animation: none;
    transform: none;
  }
  .btn-primary {
    transition: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }
  /* Show copy (text + form) before the visual on mobile */
  .visual {
    order: 2;
  }
  .phone-frame {
    max-width: 300px;
    margin: 8px auto 0;
    transform: none;
    animation: none;
  }
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
