/* Carpanatomy – Main stylesheet */
:root {
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4a4a;
  --color-accent: #2c5f4f;
  --color-accent-light: #3d7a67;
  --color-border: #e0ddd8;
  --color-hero-overlay: rgba(26, 26, 26, 0.45);
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --max-width: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--space-sm);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.25rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: var(--space-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  margin-top: 0;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-xs); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.95);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img {
  height: 2.5rem;
  width: auto;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-lg);
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
}
.main-nav a:hover {
  color: var(--color-accent);
}
.nav-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a1a1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") center/1.5rem no-repeat;
  cursor: pointer;
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm);
  }
  .main-nav ul.open { display: flex; }
  .main-nav a { display: block; padding: var(--space-sm); }
}

/* Hero */
.hero {
  position: relative;
  min-height: 28rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md);
  max-width: 40rem;
}
.hero-content h1 {
  color: #fff;
  margin-bottom: var(--space-sm);
}
.hero-lead {
  color: rgba(255,255,255,0.95);
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 0.375rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-light);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* Content sections */
.content-section {
  padding: var(--space-xl) 0;
}
.content-section .lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-lg);
}
.feature-grid article {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: #fff;
}
.feature-grid h3 a { color: var(--color-text); }
.feature-grid h3 a:hover { color: var(--color-accent); }
.article-block {
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Page banner (subpages) */
.page-banner {
  position: relative;
  min-height: 16rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.page-banner .banner-bg {
  position: absolute;
  inset: 0;
}
.page-banner .banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-banner .banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
}
.page-banner .banner-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.page-banner h1 { color: #fff; margin-bottom: var(--space-xs); }
.page-banner .breadcrumb { margin: 0; }
.page-banner .breadcrumb a { color: rgba(255,255,255,0.9); }
.page-banner .breadcrumb span { color: rgba(255,255,255,0.7); }

/* FAQ */
.faq-list { margin: 0; }
.faq-list > div {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}
.faq-list dt {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.faq-list dd {
  margin: 0;
  color: var(--color-text-muted);
}

/* CTA section */
.cta {
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--color-border);
}

/* Footer */
.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  background: #fff;
}
.footer-nav ul {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-nav a { color: var(--color-text-muted); }
.footer-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
