/* =============================================================================
   Social Buddy — design system
   Hand-written CSS, no framework. The whole stylesheet is ~20KB and the site
   ships no JS framework at all, because the audience is on cheap Android phones
   on rural 3G: the previous Flutter build shipped a 48MB CanvasKit bundle and
   painted nothing until all of it arrived.
   ========================================================================== */

:root {
  /* Brand. Violet is the app's own accent; saffron carries the festival and
     political warmth the posters themselves are full of. */
  --violet-50:  #f5f3ff;
  --violet-100: #ede9fe;
  --violet-300: #c4b5fd;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  --violet-900: #4c1d95;

  --saffron-400: #fb923c;
  --saffron-500: #f97316;

  --ink:        #0f172a;
  --ink-soft:   #475569;
  --ink-mute:   #64748b;
  --line:       #e2e8f0;
  --surface:    #ffffff;
  --surface-2:  #f8fafc;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow:    0 4px 20px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.14);
  --shadow-violet: 0 18px 40px rgba(124,58,237,.35);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ── Type ─────────────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; margin: 0; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
p  { margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--violet-600); background: var(--violet-100);
  padding: 7px 14px; border-radius: 999px;
}
.eyebrow--onDark { color: var(--violet-300); background: rgba(255,255,255,.10); }

.lede { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--ink-soft); max-width: 62ch; }
.lede--onDark { color: rgba(255,255,255,.72); }

/* A gradient that animates only while the element is on screen — see app.js. */
.grad-text {
  background: linear-gradient(100deg, var(--violet-500), var(--saffron-400), var(--violet-500));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s linear infinite;
}
@keyframes sheen { to { background-position: -220% 0; } }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .98rem; letter-spacing: -.01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  will-change: transform;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet-600), var(--violet-500) 55%, var(--saffron-500));
  box-shadow: var(--shadow-violet);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 26px 50px rgba(124,58,237,.42); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-3px); }
.btn-light { background: var(--surface); color: var(--violet-700); box-shadow: var(--shadow); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.06rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--violet-700); background: var(--violet-50); }
.nav .btn { padding: 11px 20px; font-size: .92rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; gap: 2px;
    background: var(--surface); padding: 14px 20px 20px; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .35s var(--ease); box-shadow: var(--shadow);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .nav > .btn { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 15% 0%, #2e1065 0%, #1e1b4b 45%, #0b1120 100%);
  padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 11vw, 140px);
}
/* Slow-drifting colour blobs. Pure CSS so there is no JS cost on first paint. */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5;
  pointer-events: none;
}
.hero::before {
  width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, #7c3aed, transparent 65%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.hero::after {
  width: 460px; height: 460px; right: -140px; bottom: -180px;
  background: radial-gradient(circle, #f97316, transparent 65%);
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(90px, 70px, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-80px, -60px, 0) scale(1.1); } }

.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin: 20px 0 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-note { margin-top: 22px; font-size: .9rem; color: rgba(255,255,255,.6); }

/* Stat row */
.stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 52px); margin-top: 44px; }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; }
.stat span { font-size: .84rem; color: rgba(255,255,255,.62); }

/* ── Phone mock with stacked posters ──────────────────────────────────────── */
.showcase { position: relative; height: clamp(400px, 52vw, 540px); }
.poster-card {
  position: absolute; width: clamp(150px, 21vw, 215px); aspect-ratio: 1;
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.14);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: float 7s ease-in-out infinite;
}
.poster-card:nth-child(1) { left: 4%;  top: 8%;  transform: rotate(-8deg);  animation-delay: 0s; }
.poster-card:nth-child(2) { left: 32%; top: 30%; transform: rotate(3deg);   animation-delay: .9s; z-index: 3; }
.poster-card:nth-child(3) { right: 2%; top: 4%;  transform: rotate(9deg);   animation-delay: 1.7s; }
.poster-card:nth-child(4) { left: 12%; bottom: 2%; transform: rotate(5deg); animation-delay: 2.4s; }
@keyframes float { 50% { translate: 0 -16px; } }

.poster-art { position: absolute; inset: 0; }
.poster-strip {
  position: relative; padding: 9px 10px; display: flex; align-items: center; gap: 8px;
  background: rgba(14,42,71,.94); backdrop-filter: blur(4px);
}
.poster-strip .pfp { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.28); flex: none; }
.poster-strip b { font-size: .62rem; color: #fff; line-height: 1.25; font-weight: 700; }
.poster-strip small { display: block; font-size: .5rem; color: rgba(255,255,255,.72); font-weight: 500; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin: 16px 0 14px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1040px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
/* One column on a phone. Four price columns at 375px wrap to a word per line,
   which is how "Shuru karne ke liye" became four stacked words. */
@media (max-width: 620px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--violet-300); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .97rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 18px; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--violet-100), #fff);
  border: 1px solid var(--violet-100);
}

/* ── Steps ────────────────────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--violet-600), var(--violet-500));
  box-shadow: var(--shadow-violet);
}
.step h3 { font-size: 1.06rem; margin-bottom: 4px; }
.step p { color: var(--ink-soft); font-size: .96rem; }

/* ── Marquee of categories ────────────────────────────────────────────────── */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; gap: 12px; width: max-content; animation: slide 34s linear infinite; }
.marquee:hover .marquee-row { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.chip {
  padding: 11px 20px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-weight: 600; font-size: .93rem; white-space: nowrap;
  color: var(--ink-soft);
}

/* ── CTA band ─────────────────────────────────────────────────────────────── */
.cta {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: linear-gradient(135deg, var(--violet-700), var(--violet-900) 60%, #0b1120);
  border-radius: var(--radius-xl); padding: clamp(44px, 7vw, 76px) 28px;
}
.cta h2 { margin-bottom: 14px; }
.cta .lede { margin-inline: auto; }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: #0b1120; color: rgba(255,255,255,.66); padding: clamp(48px, 7vw, 72px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; letter-spacing: .02em; }
.site-footer a { display: block; padding: 5px 0; font-size: .94rem; transition: color .2s, transform .2s; }
.site-footer a:hover { color: #fff; transform: translateX(3px); }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.10);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .87rem; color: rgba(255,255,255,.5);
}

/* ── Scroll reveal ────────────────────────────────────────────────────────────
   Scoped to `.js`, which the inline script in <head> sets before first paint.
   Without that scope `opacity: 0` is the default, so a JS error — or a blocked
   script, or a crawler that does not run one — leaves the entire page blank
   with all the content present but invisible. That is precisely how the old
   Flutter build failed, and it is not a failure mode worth reintroducing for
   the sake of a fade. No JS, no animation, all the content.               */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

/* ── Prose (legal / about pages) ──────────────────────────────────────────── */
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 40px 0 12px; }
.prose h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 1rem; }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li { margin: 6px 0; }
.prose a { color: var(--violet-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.page-hero {
  background: radial-gradient(90% 130% at 20% 0%, #2e1065, #1e1b4b 60%, #0b1120);
  color: #fff; padding: clamp(52px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
}
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 16px 0 12px; }

/* ── Account page ─────────────────────────────────────────────────────────── */
.acct { max-width: 620px; }
.acct-row { display: flex; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.acct-row:last-child { border-bottom: 0; }
.acct-row dt { flex: none; width: 170px; color: var(--ink-mute); font-weight: 600; font-size: .93rem; margin: 0; }
.acct-row dd { margin: 0; font-weight: 600; }
.state { padding: 40px 0; color: var(--ink-soft); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 16px;
  border: 3px solid var(--violet-100); border-top-color: var(--violet-600);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Motion preferences ───────────────────────────────────────────────────────
   Everything decorative stops. The audience includes people who get motion
   sick, and a page that ignores the OS setting is not "highly animated", it is
   just rude. Reveals resolve to their final state rather than staying hidden.  */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
