:root {
  --color-bg: #f8f7f4;
  --color-surface: #ffffff;
  --color-text: #1a1f24;
  --color-text-muted: #5c6570;
  --color-accent: #2d5a5a;
  --color-accent-hover: #1e4242;
  --color-border: #e2e0da;
  --color-error: #9b2c2c;
  --color-success: #276749;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(26, 31, 36, 0.06);
  --max-width: 72rem;
  --header-height: 4.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-sm); }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--radius);
}

.main-nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-text);
  font-size: 0.9375rem;
  text-decoration: none;
}

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

.site-footer {
  background: var(--color-text);
  color: #d4d8dc;
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

.site-footer a { color: #a8c4c4; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: var(--space-sm); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-bottom {
  border-top: 1px solid #3a4249;
  padding-top: var(--space-md);
  font-size: 0.875rem;
  color: #8a939c;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
  color: #fff;
}

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

.hero {
  padding: var(--space-xl) 0;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt { background: var(--color-surface); }

.section-header {
  max-width: 40rem;
  margin-bottom: var(--space-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-body { padding: var(--space-md); }

.card-body h3 { margin-bottom: var(--space-xs); }

.text-muted { color: var(--color-text-muted); }

.lead {
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  max-width: 38rem;
}

.page-hero {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.page-hero img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: var(--space-md);
}

.prose { max-width: 42rem; }
.prose-wide { max-width: 52rem; }

.prose ul, .prose ol {
  margin: 0 0 var(--space-sm);
  padding-left: 1.5rem;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.pricing-table th,
.pricing-table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.pricing-table th {
  font-family: var(--font-serif);
  background: var(--color-surface);
}

.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.testimonial cite {
  display: block;
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.case-study {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.form-group textarea { min-height: 8rem; resize: vertical; }

.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: var(--space-xs);
}

.form-success {
  background: #e8f5e9;
  border: 1px solid var(--color-success);
  color: var(--color-success);
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

.form-failure {
  background: #fde8e8;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

.inline-error {
  background: #fde8e8;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  padding: var(--space-sm);
  border-radius: var(--radius);
  margin: var(--space-sm) 0;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-md);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 200;
  display: none;
}

.cookie-banner.visible { display: block; }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  justify-content: space-between;
}

.cookie-actions { display: flex; gap: var(--space-sm); }

.legal-content h2 { margin-top: var(--space-lg); }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--color-border);
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
}

.blog-list article {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.blog-list img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}

.meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.error-page {
  text-align: center;
  padding: var(--space-xl) var(--space-sm);
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.methodology-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.methodology-steps li {
  counter-increment: step;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  position: relative;
  padding-left: 4rem;
}

.methodology-steps li::before {
  content: counter(step);
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-split { grid-template-columns: 1fr; }
  .blog-list article { grid-template-columns: 1fr; }
}
