/* ============================================
   Clarity Auto — Enterprise Dark Theme
   Mercedes-inspired: silver, black, red accents
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-light: #111111;
  --black-card: #161616;
  --black-elevated: #1c1c1c;
  --silver: #c0c0c0;
  --silver-muted: #8a8d91;
  --silver-dim: #5a5d61;
  --white: #f0f0f0;
  --red: #e4002b;
  --red-dark: #b8001f;
  --red-glow: rgba(228, 0, 43, 0.25);
  --gradient-silver: linear-gradient(135deg, #e8e8e8 0%, #a0a4a8 50%, #c0c0c0 100%);
  --gradient-red: linear-gradient(135deg, #e4002b 0%, #ff3355 100%);
  --border: rgba(192, 192, 192, 0.08);
  --border-hover: rgba(192, 192, 192, 0.18);
  --glass: rgba(22, 22, 22, 0.7);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(228, 0, 43, 0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--gradient-silver);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.btn-primary {
  background: var(--gradient-red);
  color: var(--white);
  box-shadow: 0 4px 20px var(--red-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--red-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  border-color: var(--silver-muted);
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
}

.btn-nav {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.logo-mark {
  display: flex;
  width: 36px;
  height: 36px;
  color: var(--silver);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--red);
}

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

.nav-links a {
  color: var(--silver-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 400;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--silver);
  transition: all var(--transition);
  border-radius: 2px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(228, 0, 43, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 20%, rgba(192, 192, 192, 0.04) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(192, 192, 192, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 192, 192, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-glow--1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: rgba(228, 0, 43, 0.08);
}

.hero-glow--2 {
  width: 400px;
  height: 400px;
  bottom: 100px;
  left: -150px;
  background: rgba(192, 192, 192, 0.05);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--silver-muted);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--silver-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px 40px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--silver-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-hover);
}

/* Dashboard Preview */
.hero-visual {
  position: relative;
  z-index: 1;
  margin-top: 64px;
  max-width: 900px;
}

.dashboard-preview {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--black-elevated);
  border-bottom: 1px solid var(--border);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--silver-dim);
}

.window-controls span:first-child { background: #ff5f57; }
.window-controls span:nth-child(2) { background: #febc2e; }
.window-controls span:nth-child(3) { background: #28c840; }

.dashboard-title {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--silver-muted);
  font-weight: 500;
}

.dashboard-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-approved {
  background: rgba(40, 200, 64, 0.12);
  color: #28c840;
}

.dashboard-body {
  display: flex;
  min-height: 220px;
}

.dashboard-sidebar {
  width: 160px;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-item {
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--silver-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: default;
}

.sidebar-item.active {
  background: rgba(228, 0, 43, 0.1);
  color: var(--red);
  font-weight: 500;
}

.dashboard-main {
  flex: 1;
  padding: 20px;
}

.doc-card {
  background: var(--black-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--silver-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-score {
  color: #28c840;
}

.doc-text {
  font-size: 0.8125rem;
  color: var(--silver-dim);
  line-height: 1.6;
}

.doc-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  background: var(--black-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--silver-muted);
}

.chip-icon {
  font-size: 0.6875rem;
}

.chip-highlight {
  border-color: rgba(228, 0, 43, 0.3);
  color: var(--red);
  background: rgba(228, 0, 43, 0.08);
}

/* ---- Sections ---- */
.section {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--silver-muted);
  line-height: 1.7;
}

/* ---- Features ---- */
.features {
  background: linear-gradient(180deg, var(--black) 0%, var(--black-light) 50%, var(--black) 100%);
}

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

.feature-card {
  padding: 32px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(228, 0, 43, 0.08);
  border: 1px solid rgba(228, 0, 43, 0.15);
  border-radius: var(--radius-md);
  color: var(--red);
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--silver-muted);
  line-height: 1.65;
}

/* ---- How it Works ---- */
.how-it-works {
  background: var(--black);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 24px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.step:last-of-type {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.05em;
}

.step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.9375rem;
  color: var(--silver-muted);
  line-height: 1.65;
}

.step-icon-ring {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--silver-muted);
  background: var(--black-card);
  transition: all var(--transition);
}

.step-icon-ring svg {
  width: 24px;
  height: 24px;
}

.step:hover .step-icon-ring {
  border-color: var(--border-hover);
  color: var(--silver);
}

.step-icon-ring--accent {
  border-color: rgba(228, 0, 43, 0.3);
  color: var(--red);
  background: rgba(228, 0, 43, 0.06);
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding: 40px 48px;
  background: linear-gradient(135deg, var(--black-card) 0%, var(--black-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(228, 0, 43, 0.4), transparent);
}

.cta-banner-content h3 {
  font-size: 1.375rem;
  margin-bottom: 6px;
}

.cta-banner-content p {
  color: var(--silver-muted);
  font-size: 0.9375rem;
}

/* ---- Contact ---- */
.contact {
  background: linear-gradient(180deg, var(--black) 0%, var(--black-light) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info .section-header,
.contact-info .section-title,
.contact-info .section-desc {
  text-align: left;
  margin-left: 0;
}

.contact-info .section-tag {
  display: block;
}

.contact-details {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--silver-muted);
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
}

.contact-item-label {
  display: block;
  font-size: 0.75rem;
  color: var(--silver-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.contact-item a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.contact-item a:hover {
  color: var(--red);
}

.contact-form {
  padding: 40px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--silver-muted);
  margin-bottom: 8px;
}

.optional {
  color: var(--silver-dim);
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--black-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--silver-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(228, 0, 43, 0.4);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--silver-dim);
  margin-top: 16px;
}

/* ---- Footer ---- */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--black);
}

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

.footer-tagline {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--silver-dim);
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  align-items: start;
}

.footer-links a {
  color: var(--silver-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--silver-dim);
}

.footer-domain {
  color: var(--silver-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-domain:hover {
  color: var(--red);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  background: var(--black-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--white);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  pointer-events: none;
}

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

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: calc(var(--header-height) + 24px) 32px 32px;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links .btn-nav {
    margin-top: 16px;
    width: 100%;
    text-align: center;
    border: none;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .dashboard-body {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }

  .sidebar-item {
    white-space: nowrap;
    margin-bottom: 0;
  }

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

  .step {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .step-number {
    justify-self: center;
  }

  .step-visual {
    justify-self: center;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

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

  .section {
    padding: 80px 0;
  }
}