/* NiVi Drive Assist — official site */
:root {
  --bg-deep: #0a120c;
  --bg-card: rgba(232, 245, 233, 0.06);
  --green-light: #e8f5e9;
  --green-mid: #43a047;
  --green-dark: #1b5e20;
  --green-glow: rgba(67, 160, 71, 0.45);
  --text: #f1f8f2;
  --text-muted: #a8c4ab;
  --border: rgba(232, 245, 233, 0.12);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hi: "Noto Sans Devanagari", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--green-glow), transparent),
    radial-gradient(circle at 90% 80%, rgba(27, 94, 32, 0.25), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--green-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 18, 12, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: 0 0 24px var(--green-glow);
}

.nav-links {
  display: none;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--green-light);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 180px;
}

.user-chip.visible {
  display: flex;
}

.user-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--green-mid);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: #fff;
  box-shadow: 0 4px 20px var(--green-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px var(--green-glow);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--green-light);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  text-decoration: none;
  color: var(--green-light);
}

.btn-google {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--green-light);
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-family: var(--font-hi);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 800;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--green-light), var(--green-mid));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-lead em {
  color: var(--green-light);
  font-style: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.pulse-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 3rem auto 0;
}

.pulse-ring::before,
.pulse-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green-mid);
  animation: pulse 2.5s ease-out infinite;
}

.pulse-ring::after {
  animation-delay: 1.2s;
}

.pulse-core {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--green-dark);
  box-shadow: 0 0 40px var(--green-glow);
  display: grid;
  place-items: center;
  font-size: 2rem;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  font-family: var(--font-hi);
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 560px;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(67, 160, 71, 0.4);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-family: var(--font-hi);
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Steps */
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.step-num::before {
  content: counter(step);
  display: flex;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--green-light);
  font-weight: 700;
  font-size: 1.2rem;
}

.step h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  font-family: var(--font-hi);
}

.step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

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

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  font-family: var(--font-hi);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA */
.cta-band {
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.5), rgba(10, 18, 12, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-band h2 {
  font-family: var(--font-hi);
  margin: 0 0 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

/* App portal */
.app-page {
  min-height: 100vh;
  padding: 2rem 0 4rem;
}

.app-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.release-card {
  max-width: 520px;
  margin: 0 auto 1rem;
}

.release-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(67, 160, 71, 0.2);
  color: var(--green-light);
  font-size: 0.75rem;
  font-weight: 600;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.9rem;
}

.alert-info {
  background: rgba(67, 160, 71, 0.12);
  border: 1px solid rgba(67, 160, 71, 0.35);
}

.alert-warn {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--green-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
