/* ===== SmartPin Nepal Landing Page Styles ===== */

/* CSS Custom Properties */
:root {
  --color-bg: #ffffff;
  --color-surface: #f7f6f2;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-accent: #16a34a;
  --color-accent-dark: #15803d;
  --color-accent-light: #dcfce7;
  --color-border: #e5e7eb;
  --color-hero-gradient-start: #f0fdf4;
  --color-hero-gradient-end: #ffffff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --max-width: 1200px;
  --section-padding: 5rem 1.5rem;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --transition: 0.3s ease;
}

/* Dark mode */
[data-theme="dark"] {
  --color-bg: #0f1015;
  --color-surface: #171921;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #22c55e;
  --color-accent-dark: #16a34a;
  --color-accent-light: #052e16;
  --color-border: #2a2e45;
  --color-hero-gradient-start: #0a1a0f;
  --color-hero-gradient-end: #0f1015;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-dark);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  color: var(--color-text-muted);
  max-width: 65ch;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  margin: 0.75rem auto 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

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

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

[data-theme="dark"] .nav {
  background: rgba(15, 16, 21, 0.92);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

/* Hero */
.hero {
  padding: 8rem 1.5rem 5rem;
  background: linear-gradient(180deg, var(--color-hero-gradient-start) 0%, var(--color-hero-gradient-end) 100%);
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero p {
  font-size: 1.15rem;
  margin: 0 auto 2rem;
  max-width: 600px;
}

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

/* How It Works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Sample PIN */
.sample-pin-section {
  background: var(--color-surface);
}

.pin-display {
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.pin-code {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.pin-labels {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pin-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0.6rem;
  background: var(--color-surface);
  border-radius: 4px;
  font-weight: 500;
}

.pin-label-separator {
  color: var(--color-border);
  display: flex;
  align-items: center;
}

/* Use Cases */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.use-case-card {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.use-case-card .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--color-accent);
}

.use-case-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.use-case-card p {
  font-size: 0.85rem;
  margin: 0 auto;
}

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

.feature-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-card .icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  margin: 0;
}

/* For Riders */
.riders-section {
  background: var(--color-surface);
}

.rider-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.rider-step {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.rider-step .icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  margin: 0 auto 1rem;
}

.rider-step h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.rider-step p {
  font-size: 0.85rem;
  margin: 0 auto;
}

/* Comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.comparison-col {
  padding: 2rem;
  border-radius: var(--radius);
}

.comparison-col.before {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.comparison-col.after {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.comparison-col h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-col ul {
  list-style: none;
  padding: 0;
}

.comparison-col ul li {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.comparison-col ul li::before {
  content: '';
  flex-shrink: 0;
}

.comparison-col.before ul li::before {
  content: '✗';
  color: #ef4444;
  font-weight: 700;
}

.comparison-col.after ul li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
  text-align: center;
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 2rem;
  max-width: 500px;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-section .btn-primary:hover {
  background: #f0fdf4;
  color: var(--color-accent-dark);
}

/* Footer */
.footer {
  background: var(--color-text);
  color: #fff;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links ul li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-links ul li a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.lang-switcher {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.lang-switcher a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1,
.hero p,
.hero-cta {
  animation: fadeInUp 0.6s ease forwards;
}

.hero p { animation-delay: 0.1s; }
.hero-cta { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .comparison {
    grid-template-columns: 1fr;
  }

  .pin-labels {
    gap: 0.5rem;
  }

  .pin-label-separator {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .use-cases-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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


/* Dark mode overrides */
[data-theme="dark"] .comparison-col.before {
  background: #1c1012;
  border-color: #4b1c1c;
}

[data-theme="dark"] .comparison-col.after {
  background: #0a1f0f;
  border-color: #14532d;
}

[data-theme="dark"] .comparison-col.before ul li::before {
  color: #f87171;
}

[data-theme="dark"] .cta-section {
  background: linear-gradient(135deg, #052e16 0%, #064e3b 100%);
}

[data-theme="dark"] .pin-display {
  background: var(--color-surface);
  border-color: var(--color-accent);
}

[data-theme="dark"] .footer {
  background: #0a0b0f;
}

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Mobile theme toggle — always visible */
.mobile-theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  padding: 0;
}

.mobile-theme-toggle:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.mobile-theme-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .mobile-theme-toggle {
    display: flex;
  }
}


/* Install badges */
.install-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.install-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.install-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.install-badge svg {
  flex-shrink: 0;
}
