@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --canvas: #f5f1ec;
  --surface-1: #ffffff;
  --surface-2: #ede9e2;
  --hairline: #d3cec6;
  --hairline-soft: #e2ddd6;
  --ink: #111111;
  --ink-muted: #626260;
  --ink-subtle: #7b7b78;
  --ink-tertiary: #9c9fa5;
  --accent: #ff5600;
  --inverse-canvas: #000000;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-xxl: 24px;
  --max-w: 1280px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* NAV */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 56px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 32px;
  z-index: 99;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.nav-mobile a:last-child { border-bottom: none; }

.nav-mobile a:hover { color: var(--ink); }

/* HERO */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 20px;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -1.8px;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-lead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* SECTION */
.section { padding: 80px 0; }
.section-alt { background: var(--surface-2); }

.section-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin-bottom: 16px;
}

.section-lead {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 48px;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.15s;
}

.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background: var(--surface-2);
}

.card-img-wide {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  background: var(--surface-2);
  padding: 12px;
}

.card-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 10px;
}

.card-title a:hover { color: var(--ink-muted); }

.card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.card-meta {
  font-size: 12px;
  color: var(--ink-tertiary);
}

/* FEATURE CARDS */
.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ARTICLE PAGE */
.article-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 64px;
}

.article-meta {
  font-size: 14px;
  color: var(--ink-subtle);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta .tag {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.article-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 760px;
}

.article-hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 680px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
  padding-bottom: 96px;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 48px 0 16px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin: 32px 0 12px;
}

.article-body p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 6px;
}

.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover { color: var(--ink-muted); }

.article-image {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 32px 0;
}

.article-image img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  padding: 16px;
  background: var(--surface-2);
}

.article-image figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-subtle);
  border-top: 1px solid var(--hairline);
}

.info-box {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
}

.info-box h4 {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}

.info-box p, .info-box li {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.info-box ul { padding-left: 18px; list-style: disc; }
.info-box li { margin-bottom: 4px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.data-table th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: 72px;
}

.sidebar-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-card h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-card ul { list-style: none; }

.sidebar-card li {
  margin-bottom: 8px;
}

.sidebar-card li a {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
  display: block;
}

.sidebar-card li a:hover { color: var(--ink); }

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
  font-size: 14px;
  color: var(--ink-muted);
  display: block;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color 0.15s, border-color 0.15s;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--ink);
  border-left-color: var(--ink);
}

/* ABOUT/STATIC PAGES */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 64px;
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: 16px;
}

.page-hero-lead {
  font-size: 18px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 600px;
}

.prose h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 48px 0 14px;
}

.prose h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 32px 0 10px;
}

.prose p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 18px;
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 6px;
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--ink-muted); }

.two-col-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
  padding-bottom: 96px;
}

/* CONTACT FORM */
.contact-form {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-form h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s;
  min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink-muted);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 40px;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-status.success { color: #2d7a4f; display: block; }
.form-status.loading { color: var(--ink-muted); display: block; }
.form-status.error { color: #c0392b; display: block; }

/* STATS STRIP */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}

.stat-item {
  background: var(--surface-1);
  padding: 28px 24px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--ink-muted);
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-subtle);
  padding: 16px 0;
}

.breadcrumb a { color: var(--ink-subtle); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--hairline); }

/* FOOTER */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline-soft);
  margin-bottom: 32px;
}

.footer-brand .brand-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.footer-brand .brand-name span { color: var(--accent); }

.footer-brand p {
  font-size: 13px;
  color: var(--ink-subtle);
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-size: 13px;
  color: var(--ink-subtle);
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--ink-tertiary);
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--ink-tertiary);
  margin-top: 16px;
  line-height: 1.6;
}

/* COOKIE BANNER */
#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 520px;
  background: var(--inverse-canvas);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  z-index: 1000;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: none;
}

#cookie-banner p {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin-bottom: 16px;
}

#cookie-banner a { color: rgba(255,255,255,0.9); text-decoration: underline; }

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 36px;
}

.btn-cookie-reject {
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  min-height: 36px;
}

.btn-cookie-accept:hover { opacity: 0.9; }
.btn-cookie-reject:hover { border-color: rgba(255,255,255,0.4); color: #ffffff; }

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--hairline-soft);
  margin: 48px 0;
}

/* RELATED ARTICLES */
.related-articles {
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
}

.related-articles .section-title {
  margin-bottom: 32px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-sidebar { position: static; }
  .two-col-layout { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .hero h1 { letter-spacing: -1px; }
  .stats-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .article-hero { padding: 40px 0 32px; margin-bottom: 40px; }
  .section { padding: 56px 0; }
  #cookie-banner { bottom: 16px; left: 16px; right: 16px; }
}

@media (max-width: 480px) {
  .hero h1 { letter-spacing: -0.5px; }
  .page-hero { padding: 40px 0 32px; margin-bottom: 40px; }
}
