/* ==========================================================================
   AuditKit Design System
   Colors: Navy (#0f172a) + Emerald (#10b981)
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --navy-mid: #334155;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-light: #ecfdf5;
  --emerald-border: #d1fae5;

  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;

  --text: #475569;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-on-dark: #e2e8f0;
  --text-on-dark-muted: #94a3b8;
  --link: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', 'Consolas', monospace;

  --nav-height: 64px;
  --radius: 6px;
  --radius-lg: 8px;
  --border: 1px solid #e2e8f0;
}

/* ---------- Skip to Content ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--emerald);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 10001;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--text-heading); line-height: 1.2; }
h1 { font-size: 3.25rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }
strong { color: var(--text-heading); }
code { background: var(--slate-100); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.875em; }
pre code { background: none; padding: 0; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-content { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.container-prose { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 6rem 1.5rem; }
.section-alt { background: var(--slate-50); }
.section-dark { background: var(--navy); color: var(--text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p { color: var(--text-on-dark); }
.section-dark a { color: var(--emerald); }
.section-dark .btn { color: var(--white); }
.section-dark .btn-primary { background: var(--emerald); color: var(--white); }
.section-dark .btn-outline-light { color: var(--white); }
.section-dark .text-muted { color: var(--text-on-dark-muted); }

/* ---------- Navigation ---------- */
.site-nav {
  background: var(--navy);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 28px; }
.nav-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--slate-200);
  text-decoration: none;
}

.nav-cta {
  background: var(--emerald) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background 0.15s !important;
}

.nav-cta:hover {
  background: var(--emerald-dark) !important;
  text-decoration: none !important;
}

.nav-links a.nav-active {
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

/* ---------- Page Header ---------- */
.page-header {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.page-header .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.page-header-dark {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.page-header-dark h1 { color: var(--white); }
.page-header-dark .subtitle { color: var(--slate-300); font-size: 1.25rem; max-width: 640px; margin: 0 auto; line-height: 1.7; }

/* ---------- Hero (Homepage / Pro) ---------- */
.hero {
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero h1 { font-size: 3.5rem; max-width: 800px; margin: 0 auto 1.5rem; }
.hero .subtitle { font-size: 1.35rem; color: var(--text-muted); max-width: 640px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-logo { height: 80px; margin: 0 auto 2rem; }

.hero-dark {
  background: var(--navy);
  color: var(--white);
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero-dark h1 { color: var(--white); font-size: 3.5rem; max-width: 800px; margin: 0 auto 1.5rem; }
.hero-dark .subtitle { color: var(--slate-300); font-size: 1.35rem; max-width: 640px; margin: 0 auto 2rem; line-height: 1.7; }

.accent { color: var(--emerald); }

/* ---------- Alert Bar ---------- */
.alert-bar {
  background: var(--navy-light);
  color: var(--slate-300);
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.alert-bar a { color: var(--emerald); font-weight: 600; }
.alert-bar a:hover { text-decoration: underline; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-outline { border: 1px solid var(--slate-300); color: var(--text-muted); }
.badge-dark { background: rgba(255,255,255,0.08); color: var(--slate-300); border: 1px solid rgba(255,255,255,0.1); }
.badge-emerald { background: var(--emerald-light); color: var(--emerald-dark); }
.badge-pro { background: var(--emerald); color: var(--white); font-size: 0.7rem; padding: 0.2rem 0.6rem; vertical-align: middle; margin-left: 0.5rem; }
.badge-new { background: var(--emerald); color: var(--white); font-size: 0.7rem; padding: 0.2rem 0.6rem; vertical-align: middle; margin-left: 0.5rem; }
.badge-experimental { background: var(--warning); color: var(--white); font-size: 0.7rem; padding: 0.2rem 0.6rem; vertical-align: middle; margin-left: 0.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
  cursor: pointer;
  border: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: var(--emerald); color: var(--white); }
.btn-primary:hover { background: var(--emerald-dark); }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-light); }
.btn-outline { border: 2px solid var(--slate-200); color: var(--text-heading); background: transparent; }
.btn-outline:hover { border-color: var(--navy); }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.2); color: var(--white); background: transparent; }
.btn-outline-light:hover { border-color: rgba(255,255,255,0.5); }

.container-prose .btn { margin-bottom: 1.5rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-group-center { justify-content: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.card h3 { margin-bottom: 0.75rem; }
.card-highlight { border-color: var(--emerald); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* ---------- Stats ---------- */
.stat { text-align: center; }
.stat-number { font-size: 3rem; font-weight: 700; color: var(--text-heading); line-height: 1.1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.95rem; color: var(--text-muted); }
.section-dark .stat-number { color: var(--emerald); }
.section-dark .stat-label { color: var(--text-on-dark-muted); }

/* ---------- Code Blocks ---------- */
pre, .code-block {
  background: #0d1117;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}

.code-block .comment { color: #6a9955; }
.code-block .prompt { color: #10b981; }
.code-block .command { color: #dcdcaa; }
.code-block .pass { color: #10b981; }
.code-block .fail { color: #f48771; }
.code-block .label { color: #ce9178; }
.code-block .framework { color: #9cdcfe; }
.code-block .url { color: #569cd6; }
.code-block .fix { color: #569cd6; }

.code-inline {
  background: #0d1117;
  color: var(--slate-200);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: block;
  margin-top: 1rem;
}

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th { background: var(--navy); color: var(--white); padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.9rem; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--slate-200); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }

/* ---------- Callouts ---------- */
.callout {
  border-left: 3px solid var(--emerald);
  background: var(--emerald-light);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.callout h3, .callout h4 { color: #064e3b; }
.callout p { color: var(--text); margin-bottom: 0; }

.callout-warning {
  border-left-color: var(--warning);
  background: #fffbeb;
}

.callout-warning h3, .callout-warning h4 { color: #92400e; }

/* ---------- FAQ ---------- */
.faq-section { margin-bottom: 3rem; }
.faq-section-title {
  font-size: 1.5rem;
  color: var(--text-heading);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--emerald);
  margin-bottom: 0;
}
.faq-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--slate-200);
}

.faq-item:last-child { border-bottom: none; }
.faq-item h3 { color: var(--text-heading); font-size: 1.2rem; margin-bottom: 0.75rem; display: flex; align-items: baseline; gap: 0.75rem; }
.faq-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--emerald);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.faq-item p { color: var(--text); margin-bottom: 0; }
.faq-item p + p { margin-top: 0.75rem; }

/* ---------- Feature List ---------- */
.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--slate-100); color: var(--text); display: flex; align-items: baseline; gap: 0.75rem; }
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "\2713"; color: var(--emerald); font-weight: 700; flex-shrink: 0; }

/* ---------- Comparison ---------- */
.comparison-card { background: var(--white); border: var(--border); border-radius: var(--radius-lg); padding: 2.5rem; }
.comparison-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.comparison-card .price { font-size: 2.5rem; font-weight: 700; margin: 1rem 0; }
.comparison-card.traditional .price { color: var(--slate-400); }
.comparison-card.auditkit .price { color: var(--emerald); }
.comparison-card.auditkit { border-color: var(--emerald); }
.comparison-card ul { list-style: none; padding: 0; }
.comparison-card li { padding: 0.75rem 0; border-bottom: 1px solid var(--slate-100); }
.comparison-card li:last-child { border-bottom: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--text-on-dark-muted);
  padding: 4rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  color: var(--white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 0.6rem; }
.footer-section a { color: var(--text-on-dark-muted); font-size: 0.9rem; text-decoration: none; transition: color 0.15s; }
.footer-section a:hover { color: var(--emerald); text-decoration: none; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.footer-bottom p + p { margin-top: 0.5rem; }

/* ---------- Lightbox (Pro page) ---------- */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: var(--radius-lg); }
.lightbox-caption { color: var(--white); font-size: 1.1rem; margin-top: 1rem; text-align: center; }

.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  color: var(--white); font-size: 2rem; cursor: pointer;
  background: none; border: none; z-index: 10001;
}

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none; color: var(--white);
  font-size: 2rem; padding: 0.75rem 1rem; cursor: pointer;
  border-radius: var(--radius); z-index: 10001;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-emerald { color: var(--emerald-dark); }
.section-dark .text-emerald { color: var(--emerald); }
.text-white { color: var(--white); }
.text-on-dark-muted { color: var(--text-on-dark-muted); }
.text-sm { font-size: 0.9rem; }
.text-lg { font-size: 1.125rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-4 { margin-top: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-prose { max-width: 720px; }
.max-w-content { max-width: 1080px; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* ---------- Dark Section Cards ---------- */
.section-dark .card {
  background: var(--navy-light);
  border-color: rgba(255,255,255,0.1);
}

.section-dark .card h3 { color: var(--white); }
.section-dark .card p { color: var(--slate-300); }

/* ---------- Arc Card (dark inline card on light page) ---------- */
.arc-card {
  background: var(--navy);
  color: var(--text-on-dark);
}

.arc-card h3 { color: var(--white); margin-bottom: 0; }
.arc-card p { color: var(--slate-300); margin-bottom: 1.5rem; }

.arc-feature {
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: var(--radius);
}

.arc-feature p { color: var(--slate-400); margin-top: 0.25rem; }

/* ---------- Not-Fit List ---------- */
.not-fit-list { list-style: none; padding: 0; }
.not-fit-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--slate-100); }
.not-fit-list li:last-child { border-bottom: none; }

/* ---------- Card Flex (align code-inline at bottom) ---------- */
.card-flex {
  display: flex;
  flex-direction: column;
}

.card-flex .code-inline {
  margin-top: auto;
}

/* ---------- Carousel ---------- */
.carousel-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.carousel-track {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.carousel-slides {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  text-align: center;
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  display: block;
}

.carousel-caption {
  padding: 1rem;
  text-align: center;
}

.carousel-caption strong { color: var(--white); font-size: 1rem; }
.carousel-caption p { color: var(--slate-400); font-size: 0.9rem; margin: 0.25rem 0 0; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.15);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--navy-light);
  border-color: rgba(255,255,255,0.3);
}

.carousel-btn-prev { left: -22px; }
.carousel-btn-next { right: -22px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate-300);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.carousel-dot.active {
  background: var(--emerald);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }
  .hero h1, .hero-dark h1 { font-size: 2.5rem; }
  .section { padding: 3.5rem 1.25rem; }
  .hero, .hero-dark { padding: 4rem 1.25rem; }
  .page-header, .page-header-dark { padding: 3rem 1.25rem 2.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-group { flex-direction: column; align-items: stretch; }
  .stat-number { font-size: 2.25rem; }

  /* Mobile hamburger menu */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; font-size: 0.95rem; }
  .nav-links .nav-cta { margin-top: 0.5rem; text-align: center; }

  /* Carousel buttons inside track on mobile */
  .carousel-btn-prev { left: 0.5rem; }
  .carousel-btn-next { right: 0.5rem; }
  .carousel-btn { background: rgba(15,23,42,0.8); width: 36px; height: 36px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
