/* ============================================================
   NiveshIQ — Indian Stock Market Educational Landing Page
   Professional, SEBI-compliant, Google Ads policy-friendly
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1a56db;
  --primary-dark: #1441a0;
  --primary-light: #e8effc;
  --accent: #047857;
  --accent-light: #d1fae5;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --max-w: 1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; color: var(--text); }
button { cursor: pointer; font-family: inherit; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ---------- Skip Link (Accessibility) ---------- */
.skip-link {
  position: absolute; top: -50px; left: 0; background: var(--primary); color: #fff;
  padding: 8px 16px; z-index: 10000; font-size: 0.875rem;
}
.skip-link:focus { top: 0; }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; max-width: var(--max-w); margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.35rem;
}
.nav-logo svg { flex-shrink: 0; }
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 14px; font-size: 0.9rem; color: var(--text-secondary);
  text-decoration: none; border-radius: var(--radius); transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--primary-light); color: var(--primary);
}
.nav-cta {
  background: var(--primary) !important; color: #fff !important;
  font-weight: 600; padding: 8px 20px !important; border-radius: var(--radius) !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

/* Mobile menu */
.nav-toggle { display: none; background: none; border: none; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; color: var(--text); }

/* ---------- SEBI Compliance Banner ---------- */
.sebi-banner {
  background: #fef3c7; border-bottom: 1px solid #fde68a;
  padding: 8px 0; text-align: center; font-size: 0.8rem; color: #92400e;
}
.sebi-banner strong { color: #78350f; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a365d 100%);
  color: #fff; padding: 70px 0 60px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,86,219,.2), transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 800; }
.hero h1 em { font-style: normal; color: #60a5fa; }
.hero-subtitle {
  font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 640px;
  margin: 0 auto 32px; line-height: 1.6;
}
.hero-disclaimer {
  font-size: 0.78rem; color: rgba(255,255,255,.5); margin-top: 24px;
  max-width: 600px; margin-left: auto; margin-right: auto;
}

/* Search Box */
.search-box {
  max-width: 520px; margin: 0 auto; position: relative;
}
.search-box input {
  width: 100%; padding: 16px 150px 16px 20px; border: 2px solid rgba(255,255,255,.2);
  border-radius: 50px; background: rgba(255,255,255,.1); color: #fff;
  font-size: 1rem; outline: none; transition: border-color .3s;
}
.search-box input::placeholder { color: rgba(255,255,255,.5); }
.search-box input:focus { border-color: #60a5fa; background: rgba(255,255,255,.15); }
.search-box button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: var(--primary); color: #fff; border: none; padding: 12px 28px;
  border-radius: 50px; font-size: 0.95rem; font-weight: 600;
  transition: background .2s;
}
.search-box button:hover { background: var(--primary-dark); }

/* Hero Stats */
.hero-stats {
  display: flex; justify-content: center; gap: 40px; margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .number { font-size: 1.8rem; font-weight: 800; color: #60a5fa; display: block; }
.hero-stat .label { font-size: 0.85rem; color: rgba(255,255,255,.6); }

/* ============================================================
   MARKET OVERVIEW SECTION
   ============================================================ */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2rem; margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-alt { background: #fff; }

/* Index Cards */
.index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.index-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; transition: box-shadow .3s, transform .3s;
}
.index-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.index-card .idx-name { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.index-card .idx-value { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.index-card .idx-change { font-size: 0.9rem; font-weight: 600; }
.idx-up { color: var(--accent); }
.idx-down { color: var(--danger); }
.index-card .idx-icon { font-size: 1.6rem; margin-bottom: 10px; }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: box-shadow .3s, transform .3s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 16px;
}
.feature-icon.blue { background: var(--primary-light); color: var(--primary); }
.feature-icon.green { background: var(--accent-light); color: var(--accent); }
.feature-icon.amber { background: #fef3c7; color: #d97706; }
.feature-icon.rose { background: #ffe4e6; color: #e11d48; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ============================================================
   EDUCATIONAL CONTENT SECTION
   ============================================================ */
.edu-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.edu-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.edu-block h3 { font-size: 1.25rem; margin-bottom: 16px; color: var(--primary); }
.edu-block p { color: var(--text-secondary); margin-bottom: 14px; font-size: 0.95rem; }
.edu-block ul { padding-left: 0; }
.edu-block ul li {
  padding: 8px 0 8px 28px; position: relative; color: var(--text-secondary);
  border-bottom: 1px solid var(--border); font-size: 0.93rem;
}
.edu-block ul li:last-child { border-bottom: none; }
.edu-block ul li::before {
  content: '✓'; position: absolute; left: 0; top: 8px;
  color: var(--accent); font-weight: 700;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step {
  text-align: center; position: relative; padding: 32px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-number {
  width: 48px; height: 48px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; margin: 0 auto 16px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 10px; }
.step p { color: var(--text-secondary); font-size: 0.93rem; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; background: var(--bg-card);
}
.faq-q {
  padding: 18px 48px 18px 20px; cursor: pointer; font-weight: 600;
  font-size: 1rem; position: relative; user-select: none;
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text);
}
.faq-q::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--primary); transition: transform .3s;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  padding: 0 20px; color: var(--text-secondary); font-size: 0.93rem; line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 20px 18px; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, #1a56db, #059669);
  color: #fff; padding: 60px 0; text-align: center;
}
.cta-section h2 { font-size: 2rem; color: #fff; margin-bottom: 14px; }
.cta-section p { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 600px; margin: 0 auto 28px; }
.cta-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-size: 1rem; font-weight: 700;
  text-decoration: none; transition: all .25s; border: 2px solid transparent;
}
.btn-whatsapp {
  background: #25d366; color: #fff !important; border-color: #25d366;
}
.btn-whatsapp:hover { background: #1ebe57; border-color: #1ebe57; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,.4); }
.btn-email {
  background: transparent; color: #fff !important; border-color: rgba(255,255,255,.5);
}
.btn-email:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.cta-disclaimer {
  font-size: 0.78rem; color: rgba(255,255,255,.55); margin-top: 20px;
  max-width: 500px; margin-left: auto; margin-right: auto;
}

/* ============================================================
   RISK DISCLAIMER SECTION
   ============================================================ */
.risk-banner {
  background: #fef2f2; border-top: 3px solid var(--danger); padding: 24px 0;
}
.risk-banner .container {
  display: flex; align-items: flex-start; gap: 16px;
}
.risk-icon {
  flex-shrink: 0; width: 40px; height: 40px; background: #fee2e2;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--danger);
}
.risk-text h4 { color: var(--danger); margin-bottom: 6px; font-size: 1rem; }
.risk-text p { color: #7f1d1d; font-size: 0.85rem; line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f172a; color: rgba(255,255,255,.7); padding: 48px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .footer-logo {
  font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px;
}
.footer-brand .footer-logo span { color: #60a5fa; }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,.55); }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col a {
  display: block; padding: 4px 0; color: rgba(255,255,255,.55);
  text-decoration: none; font-size: 0.88rem; transition: color .2s;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  padding: 20px 0; text-align: center; font-size: 0.8rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom p { margin-bottom: 4px; }
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   AI ANALYSIS MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.7); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-lg); padding: 36px 28px;
  max-width: 420px; width: 90%; text-align: center; position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 1.5rem; color: var(--text-muted); cursor: pointer;
}
.modal-box h3 { margin-bottom: 10px; font-size: 1.2rem; }
.modal-box p { color: var(--text-secondary); font-size: 0.93rem; margin-bottom: 20px; }

/* Progress bars in modal */
.progress-item { margin-bottom: 14px; text-align: left; }
.progress-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.progress-bar { background: #e5e7eb; border-radius: 8px; height: 10px; overflow: hidden; }
.progress-fill { background: var(--primary); height: 100%; border-radius: 8px; width: 0; transition: width .1s; }

/* Result state */
.modal-result { display: none; }
.modal-result h3 { color: var(--accent); }
.modal-result .result-info {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 16px; margin: 16px 0; text-align: left; font-size: 0.9rem;
  color: var(--text-secondary); line-height: 1.6;
}
.btn-wa-modal {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff !important; border: none; padding: 14px 32px;
  border-radius: 50px; font-size: 1rem; font-weight: 700; text-decoration: none;
  transition: background .2s;
}
.btn-wa-modal:hover { background: #1ebe57; }
.modal-disclaimer { font-size: 0.75rem; color: var(--text-muted); margin-top: 14px; }

/* ============================================================
   COOKIE CONSENT BAR
   ============================================================ */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: #1e293b; color: rgba(255,255,255,.85); padding: 16px 0;
  display: none; box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}
.cookie-bar.show { display: block; }
.cookie-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
}
.cookie-bar p { font-size: 0.85rem; flex: 1; }
.cookie-bar p a { color: #93c5fd; }
.cookie-bar button {
  background: var(--primary); color: #fff; border: none; padding: 10px 24px;
  border-radius: var(--radius); font-size: 0.88rem; font-weight: 600;
  white-space: nowrap;
}
.cookie-bar button:hover { background: var(--primary-dark); }

/* ============================================================
   TRUST INDICATORS
   ============================================================ */
.trust-row {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  padding: 30px 0; border-top: 1px solid var(--border);
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text-muted);
}
.trust-item svg { flex-shrink: 0; color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .edu-content { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
@media screen and (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: #fff; padding: 16px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: block; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .search-box input { padding-right: 16px; padding-bottom: 60px; }
  .search-box button { position: relative; right: auto; top: auto; transform: none; width: 100%; margin-top: -8px; }
  .search-box { display: flex; flex-direction: column; gap: 10px; }
  .hero-stats { gap: 24px; }
  .section { padding: 40px 0; }
  .section-header h2 { font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .index-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .risk-banner .container { flex-direction: column; text-align: center; align-items: center; }
}
@media screen and (max-width: 480px) {
  .index-grid { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .btn-cta { width: 100%; max-width: 300px; justify-content: center; }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.text-center { text-align: center; }

/* ---------- Policy Pages ---------- */
.policy-page { padding: 40px 0 60px; }
.policy-page h1 { font-size: 2rem; margin-bottom: 8px; }
.policy-page .update-date { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.policy-page h2 { font-size: 1.3rem; margin: 28px 0 12px; color: var(--primary); }
.policy-page h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.policy-page p, .policy-page li { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 12px; }
.policy-page ul, .policy-page ol { padding-left: 24px; }
.policy-page ul { list-style: disc; }
.policy-page ol { list-style: decimal; }
.policy-page li { margin-bottom: 6px; }
.policy-page address { font-style: normal; background: var(--primary-light); padding: 16px 20px; border-radius: var(--radius); margin: 16px 0; }
