/* Bahumati beta waitlist. Tokens mirror the Figma file (LP.1 master). */
:root {
  --canvas: #f8f4ee;
  --surface: #ffffff;
  --surface-muted: #f1ece4;
  --brand: #4a1c2f;
  --brand-strong: #2a0e1a;
  --brand-hover: #3a1424;
  --gold: #e8cd8e;
  --gold-soft: #f6ebd0;
  --gold-line: #d9b46a;
  --text: #1d1517;
  --text-2: #6b615c;
  --text-3: #736862;
  --danger: #b3261e;
  --danger-line: #d93a2f;
  --danger-soft: #fcebea;
  --success: #1f6e40;
  --success-line: #2e9e5b;
  --border: #e7ded2;
  --border-subtle: #f1ece4;
  --scrim: rgba(29, 21, 23, .56);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Phone rig scale; app.js keeps it in sync with the viewport. */
  --s: 1;
  --cs: 1;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, p, dl, dd, figure { margin: 0; }
button, input { font: inherit; color: inherit; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--brand); color: #fff; padding: 8px 16px; border-radius: var(--r-pill);
  text-decoration: none; font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 2px; }

/* ───────────── Background ───────────── */
.bg { position: absolute; inset: 0 0 auto; height: 1500px; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-jaali {
  position: absolute; inset: 0 0 auto; height: 1064px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23d9b46a' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='24'/%3E%3Ccircle cx='24' cy='0' r='24'/%3E%3Ccircle cx='0' cy='24' r='24'/%3E%3Ccircle cx='24' cy='24' r='24'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center -22px;
  opacity: .3;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 86%);
          mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 86%);
}
.bg-glow {
  position: absolute; left: 50%; top: 560px; width: 1900px; height: 560px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gold-soft);
  filter: blur(140px);
}

main, .footer { position: relative; z-index: 1; }

/* ───────────── Hero ───────────── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 24px 16px;
  text-align: center;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--brand); text-decoration: none;
  font-weight: 800; font-size: 30px; line-height: 42px; letter-spacing: -.01em;
}
.logo img { width: 48px; height: 48px; }
.hero-heading { margin-top: 32px; max-width: 560px; }
.hero-heading h1 {
  font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -.02em; color: var(--brand);
}
.hero-heading p { margin: 12px auto 0; max-width: 540px; color: var(--text-2); }

/* ───────────── Form ───────────── */
.signup {
  width: 100%; max-width: 480px; margin-top: 32px;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  box-shadow: 0 6px 16px rgba(74, 28, 47, .06);
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text); }
.input {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 50px; padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #d6c9b8; }
.input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(74, 28, 47, .12); }
.input input {
  flex: 1; min-width: 0; height: 24px; padding: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; line-height: 24px; color: var(--text);
}
.input input::placeholder { color: var(--text-3); opacity: 1; }
.prefix { color: var(--text-2); font-size: 16px; line-height: 24px; font-weight: 500; }
.ok { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--success-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.field.is-valid .ok { opacity: 1; transform: none; }
.field.is-invalid .input { border-color: var(--danger-line); background: #fffbfa; }
.field.is-invalid .input:focus-within { box-shadow: 0 0 0 3px rgba(217, 58, 47, .14); }
.error { display: none; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--danger); }
.field.is-invalid .error { display: block; animation: drop .2s ease-out; }
.helper { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.field.is-invalid .helper { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--danger-soft); color: var(--danger);
  font-size: 14px; line-height: 20px; font-weight: 500;
  animation: drop .2s ease-out;
}
.alert[hidden] { display: none; }
.alert svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; padding: 16px 24px; border: 0; border-radius: var(--r-pill);
  background: var(--brand); color: #fff;
  font-size: 16px; line-height: 24px; font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-hover); box-shadow: 0 8px 20px rgba(74, 28, 47, .22); }
.btn:active { transform: scale(.985); }
.btn:disabled { cursor: progress; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.signup.is-busy .spinner { display: block; }
.signup.is-busy .btn { background: var(--brand-hover); }
.signup.is-busy .input { background: var(--canvas); }

/* ───────────── Social proof ───────────── */
.proof { margin-top: 32px; display: flex; align-items: center; gap: 12px; }
.avatars { display: flex; }
.avatars img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--canvas); margin-left: -8px; background: var(--surface-muted);
}
.avatars img:first-child { margin-left: 0; }
.proof p { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); }

/* ───────────── Phone stage ───────────── */
.stage {
  position: relative;
  height: calc(766px * var(--s));
  overflow: hidden;
}
.rig {
  position: absolute; left: 50%; top: 0;
  width: 1200px; height: 766px;
  margin-left: -600px;
  transform: scale(var(--s));
  transform-origin: 50% 0;
}
.halo { position: absolute; left: 150px; top: 26px; width: 900px; height: 900px; opacity: .5; }
.halo-glow {
  position: absolute; left: 140px; top: 140px; width: 620px; height: 620px; border-radius: 50%;
  background: var(--brand); opacity: .1; filter: blur(120px);
}
.halo-mandala { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 120s linear infinite; will-change: transform; }

.phone {
  position: absolute;
  background: var(--brand-strong);
  box-shadow: 0 40px 80px -20px rgba(42, 14, 26, .35), 0 12px 24px -12px rgba(42, 14, 26, .25);
}
.phone .screen { position: absolute; overflow: hidden; background: var(--canvas); }
.phone .screen img { width: 100%; height: auto; }
.island { position: absolute; left: 50%; transform: translateX(-50%); background: #0e0609; border-radius: var(--r-pill); }

.phone--main { left: 395px; top: 126px; width: 410px; height: 864px; border-radius: 49px; z-index: 3; }
.phone--main .screen { inset: 10px; border-radius: 40px; }
.phone--main .island { top: 20px; width: 120px; height: 34px; }

.phone--side { top: 236px; width: 336px; height: 708px; border-radius: 41px; z-index: 2; }
.phone--side .screen { inset: 8px; border-radius: 33px; }
.phone--side .island { top: 16px; width: 98px; height: 28px; }
.phone--home { left: 139px; }
.phone--gift { left: 725px; }

.chip {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(42, 14, 26, .16);
  transform: scale(var(--cs));
}
.chip .disc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--gold-soft); }
.chip svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.chip-text { display: flex; flex-direction: column; text-align: left; white-space: nowrap; }
.chip small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.chip strong { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text); }
.chip--gold { left: 319px; top: 186px; transform-origin: 100% 100%; }
.chip--save { left: 2px; top: 499px; transform-origin: 100% 50%; }

.stage-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(240px * max(var(--s), .7));
  background: linear-gradient(to bottom, rgba(248, 244, 238, 0), rgba(248, 244, 238, .85) 55%, var(--canvas) 90%);
  z-index: 5; pointer-events: none;
}
/* ───────────── FAQ ───────────── */
.faq { padding: 120px 24px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.section-heading { text-align: center; }
.section-heading h2 { font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.section-heading p { margin-top: 12px; color: var(--text-2); }
.faq-list {
  width: 100%; max-width: 720px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-xl);
}
.faq-list details { border-bottom: 1px solid var(--border-subtle); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; cursor: pointer; list-style: none;
  font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text);
  border-radius: var(--r-md);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: #fcfaf7; }
.faq-list summary i { position: relative; width: 24px; height: 24px; flex: none; }
.faq-list summary i::before, .faq-list summary i::after {
  content: ""; position: absolute; left: 5px; top: 11.5px; width: 14px; height: 1px; background: var(--text);
  transition: transform .25s ease;
}
.faq-list summary i::after { transform: rotate(90deg); }
.faq-list details[open] summary i::after { transform: rotate(0); }
.answer { padding: 0 16px 16px; margin-top: -4px; }
.answer p { font-size: 14px; line-height: 20px; color: var(--text-2); max-width: 640px; }
.faq-list details[open] .answer { animation: drop .25s ease-out; }

/* ───────────── Footer ───────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 40px 48px; text-align: center; }
.footer p { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text-2); }
.footer-ig {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 15px; font-weight: 700; color: var(--brand); text-decoration: none;
}
.footer-ig svg { width: 22px; height: 22px; fill: currentColor; }
.footer-ig:hover { text-decoration: underline; }

/* ───────────── Pop-ups ───────────── */
.modal {
  width: calc(100% - 32px); max-width: 440px; padding: 0; border: 0; background: transparent; color: inherit;
  overflow: visible;
}
.modal::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .28s cubic-bezier(.2, .9, .3, 1.2); }
.modal[open]::backdrop { animation: fade .2s ease-out; }
.modal-panel {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 32px 32px;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(29, 21, 23, .24);
}
.modal-close {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer;
}
.modal-close:hover { background: var(--surface-muted); }
.modal-close svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; }
.modal-illo { width: 120px; height: 120px; animation: float 4s ease-in-out infinite; }
.modal h2 { margin-top: 16px; font-size: 24px; line-height: 32px; font-weight: 700; color: var(--text); }
.modal p { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.summary {
  width: 100%; margin-top: 20px; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface-muted); border-radius: var(--r-md); text-align: left;
}
.summary div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.summary dt { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.summary dd { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); text-align: right; overflow-wrap: anywhere; }
.modal .btn { margin-top: 16px; }
.ig-follow {
  position: relative; overflow: hidden;
  width: 100%; margin-top: 20px; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  text-decoration: none; color: var(--text); transition: background-color .15s, border-color .15s;
}
.ig-follow::before {
  content: ""; position: absolute; top: 0; left: 0; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .75) 50%, transparent 80%);
  transform: translateX(-180%); pointer-events: none;
  animation: ig-shimmer 2.8s ease-in-out infinite;
}
.ig-follow > * { position: relative; z-index: 1; }
.ig-follow:hover { background: #f1e3c2; border-color: #cda75a; }
@keyframes ig-shimmer { 0% { transform: translateX(-180%); } 60%, 100% { transform: translateX(320%); } }
.ig-follow .ig-glyph { width: 30px; height: 30px; flex: none; fill: var(--brand); }
.ig-follow span { font-size: 13px; line-height: 18px; color: var(--text-2); text-align: left; }
.ig-follow strong { color: var(--brand); font-weight: 700; }
.ig-follow .ig-arrow { width: 18px; height: 18px; flex: none; margin-left: auto; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.modal-open { overflow: hidden; }

/* ───────────── Motion ───────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes bob { 50% { translate: 0 -8px; } }
@keyframes rise { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }

.js .reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.js.ready .reveal { opacity: 1; translate: 0 0; }
.js .phone, .js .chip { opacity: 0; }
.js .stage.in-view .phone--main { animation: rise .9s cubic-bezier(.2, .8, .2, 1) .05s both; }
.js .stage.in-view .phone--side { animation: rise .9s cubic-bezier(.2, .8, .2, 1) .2s both; }
.js .stage.in-view .chip { animation: rise .7s cubic-bezier(.2, .8, .2, 1) .5s both, bob 6s ease-in-out 1.3s infinite; }
.js .stage.in-view .chip--save { animation-delay: .65s, 2.2s; }

/* ── Extra polish animations ── */
/* 1. Gold shine sweeping across the primary button */
.signup .btn { overflow: hidden; }
.signup .btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(232, 205, 142, .55), transparent);
  transform: skewX(-18deg);
  animation: shine 5s ease-in-out 1.5s infinite;
  pointer-events: none;
}
.signup.is-busy .btn::after { animation: none; }
@keyframes shine { 0% { left: -60%; } 22%, 100% { left: 130%; } }

/* 2. Hero gold glow breathing */
.bg-glow { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .85; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.05); } }

/* 3. Gold shimmer passing over the wordmark on load */
.js .logo span {
  background: linear-gradient(100deg, var(--brand) 40%, var(--gold) 50%, var(--brand) 60%);
  background-size: 250% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.js.ready .logo span { animation: wordmark-shimmer 1.6s ease-out .4s 1 forwards; }
@keyframes wordmark-shimmer { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* 4. Avatars lift on hover */
.avatars img { transition: transform .2s ease, z-index 0s; position: relative; }
.avatars img:hover { transform: translateY(-4px) scale(1.1); z-index: 2; }

/* 5. Gold-dust burst in the success pop-up */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: var(--r-xl); }
.confetti span {
  position: absolute; top: 96px; left: 50%; width: 8px; height: 8px; border-radius: 2px;
  background: var(--g, var(--gold)); opacity: 0;
  animation: dust 1100ms ease-out forwards; animation-delay: var(--delay, 0ms);
}
@keyframes dust {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(1) rotate(var(--rot)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .halo-mandala, .modal-illo, .signup .btn::after, .bg-glow, .confetti { animation: none !important; }
  .signup .btn::after, .confetti, .ig-follow::before { display: none !important; }
  .js .logo span { -webkit-text-fill-color: var(--brand); animation: none !important; }
  .js .reveal, .js .phone, .js .chip { opacity: 1; translate: 0 0; }
}

/* ───────────── Responsive ───────────── */
@media (max-width: 1239px) { .chip--save { left: 48px; } }
@media (max-width: 1100px) { :root { --s: .82; } }
@media (max-width: 860px) { :root { --s: .64; } }
@media (max-width: 640px) {
  :root { --s: .5; --cs: 1.5; }
  .hero { padding: 32px 16px 8px; }
  .logo { font-size: 22px; line-height: 32px; gap: 8px; }
  .logo img { width: 32px; height: 32px; }
  .hero-heading { margin-top: 20px; }
  .hero-heading h1 { font-size: 32px; line-height: 40px; }
  .hero-heading p { font-size: 14px; line-height: 20px; margin-top: 8px; }
  .signup { margin-top: 24px; padding: 20px 16px; border-radius: 20px; }
  .proof { margin-top: 20px; }
  .bg { height: 1200px; }
  .bg-jaali { height: 900px; }
  .bg-glow { top: 520px; width: 900px; height: 420px; filter: blur(90px); }
  /* On phones the auto-save chip moves to the right of the main phone, like the mobile design. */
  .chip--save { left: 660px; top: 420px; transform-origin: 0 50%; }
  .chip--gold { left: 345px; top: 170px; }
  .faq { padding: 64px 16px 72px; gap: 24px; }
  .section-heading h2 { font-size: 24px; line-height: 32px; }
  .section-heading p { font-size: 14px; line-height: 20px; margin-top: 8px; }
  .faq-list { padding: 4px; border-radius: 20px; }
  .footer { padding: 24px 16px 32px; }
  .footer p { font-size: 14px; line-height: 20px; }
  .modal-panel { padding: 32px 20px 20px; }
}
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; }

/* Casual content protection: block selection everywhere except form fields. */
body { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; -moz-user-select: text; user-select: text; }
img { -webkit-user-drag: none; user-drag: none; }
