/* =========================================================
   My Car Companion — Shared Design System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:           #1B2B50;
  --surface:      #243460;
  --surface-2:    #1a2744;
  --accent:       #6BBCDE;
  --accent-hover: #8DCDE8;
  --text:         #FFFFFF;
  --text-muted:   #A8BAD4;
  --border:       #2E3F6E;
  --success:      #34C98A;
  --radius-card:  12px;
  --radius-btn:   8px;
  --shadow:       0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.4);
  --container:    1200px;
  --transition:   0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---- Container ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107,188,222,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(107,188,222,0.1);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27,43,80,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 9px;
}

.nav-logo-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---- Footer ---- */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

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

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Section headers ---- */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.section-center {
  text-align: center;
}
.section-center .section-subtitle {
  margin: 0 auto;
}

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(107,188,222,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ---- Utilities ---- */
.text-accent { color: var(--accent); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.py-80 { padding: 80px 0; }
.py-48 { padding: 48px 0; }

/* ---- Proof bar ---- */
.proof-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.proof-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.proof-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.proof-divider { color: var(--border); }
.proof-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.proof-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn:not(.btn-sm) { display: none; }
  .nav-hamburger { display: flex; }
  /* Hide secondary "Sign In" CTA on mobile — sign-in is accessible via the tab on /app */
  .nav-actions .btn-secondary { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .py-80 { padding: 56px 0; }

  /* Mobile nav open state */
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(27,43,80,0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    z-index: 98;
    gap: 16px;
  }
  .nav.open .nav-links a { font-size: 1rem; color: var(--text); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn { padding: 12px 20px; font-size: 0.95rem; }
}
