:root {
  --bg: #eef3f8;
  --bg-2: #e4edf6;
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(15, 55, 80, 0.08);
  --text: #1e2c38;
  --text-dim: rgba(30, 44, 56, 0.62);
  --text-faint: rgba(30, 44, 56, 0.4);
  --blue: #0098d9;
  --blue-light: #7fd4f2;
  --blue-dark: #0678ab;
  --gray: #8a8a8a;
  --gray-dark: #5c5c5c;
  --enter: cubic-bezier(0.22, 1, 0.36, 1);
  --move: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 96px 16px 32px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 45%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Cursor spotlight ---------- */

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    480px circle at var(--mx, 50%) var(--my, 30%),
    rgba(0, 152, 217, 0.14),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 400ms ease;
}

body.pointer-fine .spotlight { opacity: 1; }

/* ---------- Background blobs ---------- */

.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform;
}

.blob-1 {
  width: 460px;
  height: 460px;
  left: -140px;
  top: -120px;
  background: radial-gradient(circle at 30% 30%, var(--blue-light), transparent 70%);
  animation: drift1 26s var(--move) infinite alternate;
}

.blob-2 {
  width: 420px;
  height: 420px;
  right: -150px;
  top: 6%;
  background: radial-gradient(circle at 30% 30%, var(--blue), transparent 72%);
  animation: drift2 32s var(--move) infinite alternate;
}

.blob-3 {
  width: 380px;
  height: 380px;
  left: 28%;
  bottom: -200px;
  background: radial-gradient(circle at 30% 30%, var(--gray), transparent 74%);
  animation: drift3 30s var(--move) infinite alternate;
}

@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-50px, 60px) scale(1.15); }
}
@keyframes drift3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.08); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(15, 55, 80, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 55, 80, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 5;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo { animation: none; }
}

@media (max-width: 640px) {
  .site-header { top: 14px; left: 16px; }
  .brand-logo { height: 34px; }
  body { padding-top: 72px; }
}

/* ---------- Floating illustration cards ---------- */

.floaters {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.floater {
  position: absolute;
  transition: transform 500ms var(--move);
  will-change: transform;
}

.floater-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(15, 55, 80, 0.1);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-dark);
  animation: float-idle 6s ease-in-out infinite;
}

.floater-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floater-icon img { display: block; }

.floater-1 { top: 16%; left: 8%; }
.floater-2 { top: 20%; right: 9%; }
.floater-2 .floater-card { animation-delay: -2s; }
.floater-3 { bottom: 12%; left: 12%; }
.floater-3 .floater-card { animation-delay: -4s; }

@keyframes float-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .floater-card { animation: none; }
}

@media (max-width: 1080px) {
  .floaters { display: none; }
}

/* ---------- Card ---------- */

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 44px 32px 36px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 55, 80, 0.12);
  transform-style: preserve-3d;
  will-change: transform;
}

/* Higher specificity than .reveal: fast transform response for pointer tilt,
   while still honoring the entrance stagger delay on first paint. */
#card {
  transition:
    opacity 480ms var(--enter) var(--d, 0ms),
    transform 200ms var(--enter) var(--d, 0ms),
    box-shadow 300ms var(--enter);
}

/* entrance system: fade + rise, staggered via inline --d delay */
.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 480ms var(--enter), transform 480ms var(--enter);
  transition-delay: var(--d, 0ms);
}
body.mounted .reveal {
  opacity: 1;
}
body.mounted .card.reveal {
  transform: none;
}
body.mounted .reveal:not(.card) {
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition-duration: 1ms; transition-delay: 0ms; }
  #card { transition: none; }
}

/* ---------- Text ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.title {
  margin: 0 0 14px;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--enter), transform 420ms var(--enter);
  transition-delay: calc(160ms + var(--i, 0) * 45ms);
}

.title span:last-child {
  background: linear-gradient(120deg, var(--blue), var(--blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.mounted .title span {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .title span { transition-duration: 1ms; transition-delay: 0ms; }
}

.subtitle {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Countdown ---------- */

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.countdown .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  padding: 10px 6px;
  background: rgba(0, 152, 217, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.countdown .value {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  transition: opacity 160ms var(--enter), transform 160ms var(--enter);
}

.countdown .value.tick {
  opacity: 0.4;
  transform: translateY(-3px);
}

.countdown .label {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.countdown .sep {
  color: var(--text-faint);
  font-weight: 700;
  transform: translateY(-6px);
}

@media (max-width: 420px) {
  .countdown { gap: 6px; }
  .countdown .unit { min-width: 46px; padding: 8px 4px; }
}

/* ---------- Progress ---------- */

.progress-wrap {
  margin-bottom: 30px;
}

.progress-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 55, 80, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.2s ease-in-out infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill::after { animation: none; }
}

.progress-label {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Form ---------- */

.notify-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.notify-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 55, 80, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.notify-form input::placeholder {
  color: var(--text-faint);
}

.notify-form input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 152, 217, 0.15);
}

.notify-form input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #e0575c;
}

.notify-form button {
  flex-shrink: 0;
  padding: 13px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--blue), var(--blue-dark));
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease, opacity 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .notify-form button:hover {
    box-shadow: 0 10px 26px rgba(0, 152, 217, 0.35);
  }
}

.notify-form button:active {
  transform: scale(0.97);
}

.notify-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 420px) {
  .notify-form { flex-direction: column; }
}

.form-message {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--blue-dark);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 260ms var(--enter), transform 260ms var(--enter);
}

.form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.form-message.error {
  color: #d1484d;
}

/* ---------- Socials ---------- */

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(15, 55, 80, 0.12);
  color: var(--text-dim);
  text-decoration: none;
  transition: transform 160ms var(--enter), color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .social:hover {
    color: var(--blue-dark);
    border-color: var(--blue);
    background: rgba(0, 152, 217, 0.1);
    transform: translateY(-3px);
  }
}

.social:active {
  transform: scale(0.94);
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.footer-icon {
  height: 16px;
  width: auto;
  opacity: 0.7;
}
