/* ────────────────────────────────────────────────────────────────────────
   AskMyKundli — Coming Soon
   Dark "celestial dawn" variant of the Celestial Morning system: deep
   Vedic-night indigo breaking into saffron dawn, standing in for the
   "ancient sky meets modern intelligence" idea the page is selling.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  --bg-deep:      #07070f;
  --bg-mid:       #14101f;
  --bg-dawn:      #2a1410;

  --ink:          #f6f1e9;
  --ink-muted:    rgba(246, 241, 233, 0.72);
  --ink-faint:    rgba(246, 241, 233, 0.46);

  --saffron:          #e07a5f;
  --saffron-deep:     #9a442d;
  --gold:             #d8ab6a;
  --teal:             #2bccb0;
  --indigo-light:     #9aa8d6;

  --card-bg:      rgba(20, 16, 31, 0.55);
  --card-border:  rgba(216, 171, 106, 0.22);
  --input-bg:     rgba(246, 241, 233, 0.06);
  --input-border: rgba(246, 241, 233, 0.16);

  --shadow-glow: 0 0 60px rgba(224, 122, 95, 0.18);

  --font-serif: 'Libre Caslon Text', 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Hanken Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-deva:  'Tiro Devanagari Sanskrit', serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-deep);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  input, textarea { font-size: 16px; }
}

::selection { background: var(--saffron); color: #1b0d08; }

/* ── Cosmic backdrop ───────────────────────────────────────────────────── */
.cosmic-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 62%, rgba(224, 122, 95, 0.22), transparent 70%),
    radial-gradient(90% 60% at 50% 100%, rgba(154, 68, 45, 0.35), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 55%, var(--bg-dawn) 100%);
  will-change: transform;
  transition: transform 0.4s ease-out;
}
#cosmic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(4, 3, 8, 0.55) 100%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout shell ──────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 28px clamp(20px, 5vw, 64px) 0;
  opacity: 0;
  animation: fadeDown 0.9s ease 0.15s forwards;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand .om {
  font-family: var(--font-deva);
  color: var(--saffron);
  font-size: 22px;
  line-height: 1;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.status-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(43, 204, 176, 0.6);
  animation: pulseDot 2.2s ease-in-out infinite;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 64px);
}
.hero-inner {
  width: 100%;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  opacity: 0;
  animation: revealUp 0.8s cubic-bezier(.2,.7,.2,1) 0.45s forwards;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

h1.headline {
  width: 100%;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 5.6vw, 58px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
h1.headline .word {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(14px);
  animation: revealWord 0.85s cubic-bezier(.2,.7,.2,1) forwards;
}
h1.headline .accent {
  background: linear-gradient(100deg, var(--saffron) 0%, var(--gold) 45%, var(--teal) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: revealWord 0.85s cubic-bezier(.2,.7,.2,1) forwards,
             shimmer 6s ease-in-out 1.4s infinite;
}

.subhead {
  width: 100%;
  opacity: 0;
  animation: revealUp 0.8s cubic-bezier(.2,.7,.2,1) 1.05s forwards;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 0 28px;
}

.rotator {
  width: 100%;
  opacity: 0;
  animation: revealUp 0.8s cubic-bezier(.2,.7,.2,1) 1.25s forwards;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 4px;
  gap: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--indigo-light);
  margin-bottom: 36px;
}
.rotator .quote-mark { color: var(--saffron); font-style: normal; }
.rotator .cursor {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--saffron);
  animation: blink 0.9s steps(1) infinite;
}

/* ── Waitlist form ─────────────────────────────────────────────────────── */
.waitlist-card {
  opacity: 0;
  animation: revealUp 0.9s cubic-bezier(.2,.7,.2,1) 1.45s forwards,
             float 7s ease-in-out 3s infinite;
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px clamp(18px, 4vw, 30px) 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-glow), 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-row {
  display: flex;
  gap: 10px;
}
.field {
  flex: 1;
  text-align: left;
}
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.field .input-shell {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 999px;
  padding: 0 4px 0 16px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field .input-shell:focus-within {
  border-color: var(--saffron);
  background: rgba(246, 241, 233, 0.09);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.14);
}
.field .prefix {
  color: var(--ink-faint);
  font-size: 14px;
  padding-right: 8px;
  border-right: 1px solid var(--input-border);
  margin-right: 10px;
  flex-shrink: 0;
}
.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 12px 12px 0;
}
.field input::placeholder { color: var(--ink-faint); }

.field.name-field .input-shell { padding-left: 16px; }

.error-msg {
  font-size: 12px;
  color: #ff9e8a;
  text-align: left;
  min-height: 16px;
  margin: 2px 4px 0;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s, transform 0.15s;
}
.error-msg.show { opacity: 1; transform: translateY(0); }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.submit-btn {
  margin-top: 6px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2a0f06;
  background: linear-gradient(100deg, var(--gold), var(--saffron) 60%, var(--saffron-deep));
  background-size: 180% 100%;
  background-position: 0% 0%;
  overflow: hidden;
  transition: background-position 0.5s ease, transform 0.12s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 28px rgba(224, 122, 95, 0.28);
}
.submit-btn:hover:not(:disabled) { background-position: 100% 0%; box-shadow: 0 10px 36px rgba(224, 122, 95, 0.4); }
.submit-btn:active:not(:disabled) { transform: scale(0.98); }
.submit-btn:disabled { cursor: not-allowed; opacity: 0.85; }

.submit-btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(42, 15, 6, 0.3);
  border-top-color: #2a0f06;
  animation: spin 0.7s linear infinite;
}
.submit-btn.loading .btn-label { visibility: hidden; position: absolute; }
.submit-btn.loading .spinner { display: inline-block; }

.fine-print {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

/* Success state swap */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 4px;
}
.success-state.show { display: flex; }
.waitlist-form.hide { display: none; }

.check-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--saffron-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(224, 122, 95, 0.12);
  animation: popIn 0.5s cubic-bezier(.2,1.4,.4,1) forwards;
}
.check-badge svg { width: 24px; height: 24px; }
.success-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 4px 0 0;
}
.success-copy {
  font-size: 13.5px;
  color: var(--ink-muted);
  text-align: center;
  max-width: 320px;
  margin: 0;
}

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  pointer-events: none;
  animation: sparkFly var(--dur, 0.8s) ease-out forwards;
}

footer.site-footer {
  opacity: 0;
  animation: fadeUp 0.9s ease 1.7s forwards;
  text-align: center;
  padding: 18px clamp(20px, 5vw, 64px) 30px;
  font-size: 12px;
  color: var(--ink-faint);
}
footer.site-footer .brand-mini {
  font-family: var(--font-deva);
  color: var(--saffron);
  margin-right: 6px;
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(8px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes revealUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes revealWord { to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(43, 204, 176, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(43, 204, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 204, 176, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes sparkFly {
  from { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.3); }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  h1.headline .word, h1.headline .accent { opacity: 1; filter: none; transform: none; }
  .eyebrow, .subhead, .rotator, .waitlist-card, footer.site-footer, .topbar { opacity: 1; }
}

@media (max-width: 480px) {
  .field-row { flex-direction: column; }
  .status-chip { font-size: 10px; padding: 6px 11px; gap: 6px; }
  .brand { font-size: 17px; }
  .rotator { font-size: 14px; }
}

@media (max-width: 360px) {
  .topbar { justify-content: center; }
}
