/* © Mayanktaker Computers & Web Development | https://mayanktaker.com */
/* styles.css — WhatsApp-themed marketing site for Stasaver. */
/* Color tokens mirror lib/app/app_colors.dart exactly. */

/* ======================== DESIGN TOKENS ======================== */
:root {
  /* --- WhatsApp Brand Palette (exact hex from app_colors.dart) --- */
  --wa-appbar:      #075E54;
  --wa-primary:     #128C7E;
  --wa-green:       #25D366;
  --wa-blue:        #34B7F1;
  --wa-dark:        #111B21;
  --wa-dark-alt:    #0B141A;
  --wa-muted:       #667781;
  --wa-outline:     #E9EDEF;
  --wa-light-bg:    #F5F6F8;
  --wa-chat-bg:     #DCF8C6;
  --wa-alert-bg:    #1E293B;

  /* --- Typography --- */
  --ff-primary: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:   1.125rem;  /* 18px */
  --fs-lg:   1.25rem;   /* 20px */
  --fs-xl:   1.5rem;    /* 24px */
  --fs-2xl:  2rem;      /* 32px */
  --fs-3xl:  2.5rem;    /* 40px */
  --fs-4xl:  3rem;      /* 48px */

  /* --- Spacing scale --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* --- Layout --- */
  --max-w: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:  0 12px 40px rgba(0,0,0,0.15);

  /* --- Transitions --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================== RESET ======================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--ff-primary);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--wa-dark);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--wa-primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--wa-green); }
ul, ol { list-style: none; }

/* ======================== UTILITIES ======================== */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-5); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-green { color: var(--wa-green); }
.text-primary { color: var(--wa-primary); }
.text-muted { color: var(--wa-muted); }
.section { padding: var(--sp-16) 0; }
.section--alt { background: var(--wa-light-bg); }

/* Reveal-on-scroll animation (toggled by main.js). */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================== HEADER / NAV ======================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wa-appbar);
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-md);
}

.header__brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.header__nav { display: flex; align-items: center; gap: var(--sp-6); }

.header__nav a {
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--wa-green);
}

/* Language toggle pill. */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9999px;
  padding: var(--sp-1) var(--sp-3);
  cursor: pointer;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.2s var(--ease);
}

.lang-toggle:hover { background: rgba(255,255,255,0.25); }

/* Language options highlighting inside the toggle pill. */
.lang-toggle .lang-option {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s var(--ease);
}
.lang-toggle .lang-divider {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
}
html[lang="en"] .lang-toggle .lang-option--en {
  color: var(--wa-green);
  font-weight: 700;
}
html[lang="hi"] .lang-toggle .lang-option--hi {
  color: var(--wa-green);
  font-weight: 700;
}

/* Mobile hamburger. */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ======================== HERO ======================== */
.hero {
  background: linear-gradient(135deg, var(--wa-appbar) 0%, var(--wa-primary) 60%, var(--wa-green) 100%);
  color: #fff;
  padding: var(--sp-16) 0 var(--sp-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative circles behind hero. */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}
.hero::before {
  width: 400px; height: 400px;
  background: var(--wa-green);
  top: -120px; right: -100px;
}
.hero::after {
  width: 300px; height: 300px;
  background: var(--wa-blue);
  bottom: -80px; left: -80px;
}

.hero__icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  margin: 0 auto var(--sp-6);
  border: 4px solid rgba(255,255,255,0.3);
}

.hero__title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.hero__subtitle {
  font-size: var(--fs-lg);
  font-weight: 400;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto var(--sp-8);
  line-height: 1.5;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--wa-green);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 700;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  text-decoration: none;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  color: #fff;
}

.hero__cta img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* ======================== TRUST STRIP ======================== */
.trust {
  display: flex;
  justify-content: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  padding: var(--sp-6) 0;
  background: var(--wa-light-bg);
  border-bottom: 1px solid var(--wa-outline);
}

.trust__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--wa-muted);
}

.trust__icon {
  width: 20px;
  height: 20px;
  color: var(--wa-green);
}

/* ======================== FEATURES GRID ======================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
}

.feature-card {
  background: #fff;
  border: 1px solid var(--wa-outline);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
  background: var(--wa-chat-bg);
  color: var(--wa-primary);
}

.feature-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--wa-dark);
}

.feature-card__desc {
  font-size: var(--fs-sm);
  color: var(--wa-muted);
  line-height: 1.5;
}

/* ======================== HOW IT WORKS ======================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-8);
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa-primary);
  color: #fff;
  font-size: var(--fs-xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 4px 12px rgba(18,140,126,0.3);
}

.step__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.step__desc {
  font-size: var(--fs-sm);
  color: var(--wa-muted);
  max-width: 280px;
  margin: 0 auto;
}

/* ======================== SCREENSHOTS ======================== */
.screenshots__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
}

.screenshot {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease);
}

.screenshot:hover {
  transform: scale(1.03);
}

.screenshot img {
  width: 100%;
  height: auto;
}

/* ======================== PRIVACY CALLOUT ======================== */
.callout {
  background: linear-gradient(135deg, var(--wa-alert-bg), #0B141A);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-10);
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.callout__icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.callout__text h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

.callout__text p {
  font-size: var(--fs-sm);
  opacity: 0.85;
  line-height: 1.6;
}

/* ======================== FAQ ======================== */
.faq__list { max-width: 720px; margin: 0 auto; }

.faq__item {
  border: 1px solid var(--wa-outline);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
  overflow: hidden;
  background: #fff;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: none;
  border: none;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--wa-dark);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease);
}

.faq__q:hover { background: var(--wa-light-bg); }

.faq__arrow {
  transition: transform 0.3s var(--ease);
  font-size: var(--fs-lg);
  color: var(--wa-muted);
  flex-shrink: 0;
  margin-left: var(--sp-4);
}

.faq__item.open .faq__arrow { transform: rotate(180deg); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
  padding: 0 var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--wa-muted);
  line-height: 1.6;
}

.faq__item.open .faq__a {
  max-height: 300px;
  padding: 0 var(--sp-5) var(--sp-5);
}

/* ======================== CTA BAND ======================== */
.cta-band {
  background: var(--wa-green);
  color: #fff;
  text-align: center;
  padding: var(--sp-12) 0;
}

.cta-band h2 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin-bottom: var(--sp-4);
}

.cta-band p {
  font-size: var(--fs-md);
  opacity: 0.9;
  margin-bottom: var(--sp-6);
}

.cta-band__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: #fff;
  color: var(--wa-appbar);
  font-size: var(--fs-md);
  font-weight: 700;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta-band__btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--wa-appbar);
}

.cta-band__btn img {
  width: 20px;
  height: 20px;
}

/* ======================== FOOTER ======================== */
.footer {
  background: var(--wa-dark-alt);
  color: rgba(255,255,255,0.7);
  padding: var(--sp-10) 0 var(--sp-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

.footer__brand img { width: 40px; height: 40px; border-radius: var(--radius-sm); margin-bottom: var(--sp-3); }
.footer__brand p { font-size: var(--fs-sm); line-height: 1.5; }

.footer h4 {
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-4);
}

.footer ul li { margin-bottom: var(--sp-2); }
.footer ul a { color: rgba(255,255,255,0.6); font-size: var(--fs-sm); }
.footer ul a:hover { color: var(--wa-green); }

.footer__socials {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.footer__socials a:hover { background: var(--wa-green); color: #fff; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
}

.footer__bottom a { color: rgba(255,255,255,0.5); }
.footer__bottom a:hover { color: var(--wa-green); }

/* ======================== LEGAL PAGES ======================== */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-5);
}

.legal__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}

.legal__subtitle {
  font-size: var(--fs-sm);
  color: var(--wa-muted);
  margin-bottom: var(--sp-8);
}

.legal__section {
  margin-bottom: var(--sp-8);
}

.legal__section h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-3);
  color: var(--wa-primary);
}

.legal__section p,
.legal__section ul {
  font-size: var(--fs-base);
  color: var(--wa-muted);
  line-height: 1.7;
}

.legal__section ul {
  padding-left: var(--sp-6);
}

.legal__section ul li {
  list-style: disc;
  margin-bottom: var(--sp-2);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .header__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--wa-appbar);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-4) var(--sp-5);
    gap: var(--sp-3);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }

  .header__nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header__nav a {
    padding: var(--sp-3) 0;
    font-size: var(--fs-base);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .header__nav .lang-toggle { align-self: flex-start; border-bottom: none; }

  .hero { padding: var(--sp-10) 0 var(--sp-8); }
  .hero__title { font-size: var(--fs-2xl); }
  .hero__subtitle { font-size: var(--fs-base); }
  .hero__cta { padding: var(--sp-3) var(--sp-6); font-size: var(--fs-base); }
  .hero__icon { width: 90px; height: 90px; }

  .trust { gap: var(--sp-4); padding: var(--sp-4) 0; }
  .trust__item { font-size: var(--fs-xs); }

  .section { padding: var(--sp-10) 0; }

  .callout { flex-direction: column; text-align: center; padding: var(--sp-8) var(--sp-5); }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-xl); }
  .features__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .screenshots__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
  .hero { padding: var(--sp-20) 0 var(--sp-16); }
  .hero__title { font-size: var(--fs-4xl); }
}
