/* ==========================================================================
   Netra Official Product Website & Legal Portal Stylesheet
   Author: Navarambha Labs
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* Light Mode (Default) */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(226, 232, 240, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-border: rgba(226, 232, 240, 0.6);
  --code-bg: #e2e8f0;
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --surface: #111827;
  --surface-alt: #1f2937;
  --card-bg: rgba(17, 24, 39, 0.8);
  --card-border: rgba(55, 65, 81, 0.6);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --nav-bg: rgba(11, 15, 25, 0.85);
  --nav-border: rgba(31, 41, 55, 0.8);
  --code-bg: #1f2937;
  --primary-light: rgba(37, 99, 235, 0.2);
  --success-light: rgba(16, 185, 129, 0.2);
  --danger-light: rgba(239, 68, 68, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--surface-alt);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 9999px;
  width: fit-content;
  border: 1px solid var(--primary-glow);
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.metric-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Phone Mockup Frame */
.hero-mockup {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-frame {
  width: 290px;
  background: #1e293b;
  border: 8px solid #334155;
  border-radius: 42px;
  box-shadow: var(--shadow-xl), 0 25px 50px -12px rgba(37, 99, 235, 0.25);
  overflow: hidden;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: auto;
  border-radius: 34px;
}

/* --------------------------------------------------------------------------
   Section Common
   -------------------------------------------------------------------------- */
section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Features Grid
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-blue { background: var(--primary-light); color: var(--primary); }
.icon-green { background: var(--success-light); color: var(--success); }
.icon-red { background: var(--danger-light); color: var(--danger); }
.icon-purple { background: rgba(99, 102, 241, 0.18); color: #6366f1; }
.icon-orange { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.icon-cyan { background: rgba(6, 182, 212, 0.18); color: #06b6d4; }

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-tag {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Architecture Pipeline Visual
   -------------------------------------------------------------------------- */
.arch-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.pipeline-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.pipeline-step {
  flex: 1;
  min-width: 170px;
  background: var(--surface-alt);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.pipeline-step .step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.pipeline-step h4 {
  font-size: 1.05rem;
  margin: 0.4rem 0;
}

.pipeline-step p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pipeline-arrow {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   Screenshots Gallery
   -------------------------------------------------------------------------- */
.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.gallery-tab {
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  background: var(--surface-alt);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-tab.active,
.gallery-tab:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: start;
}

.screenshot-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.screenshot-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.screenshot-card img {
  border-radius: 16px;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--card-border);
}

.screenshot-card figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.screenshot-card .caption-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Modal Lightbox
   -------------------------------------------------------------------------- */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Google Play Compliance & Transparency Table
   -------------------------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.92rem;
}

th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

.badge-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
}

.badge-required { background: var(--primary-light); color: var(--primary); }
.badge-optional { background: var(--surface-alt); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   FAQ Section (Accordion)
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.25s ease;
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   About & Contact Us
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.3rem;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Privacy Policy Page Specifics
   -------------------------------------------------------------------------- */
.legal-header {
  padding: 130px 0 40px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--card-border);
}

.legal-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-body {
  padding: 50px 0 80px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 100px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.legal-toc h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.legal-toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legal-toc a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.legal-toc a:hover {
  color: var(--primary);
}

.legal-content h2 {
  font-size: 1.65rem;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
}

.legal-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal-content ul, .legal-content ol {
  margin: 0.5rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.callout-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--card-border);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
  .contact-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open {
    display: flex;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .pipeline-diagram {
    flex-direction: column;
  }
  .pipeline-arrow {
    transform: rotate(90deg);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
