:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --primary: #f54e00;
  --primary-active: #d04200;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --on-primary: #ffffff;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --semantic-success: #1f8a65;
  --semantic-error: #cf2d56;
  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 8px;
  --rounded-lg: 12px;
  --rounded-xl: 16px;
  --rounded-pill: 9999px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--body);
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }

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

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

/* NAV */
.site-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--primary); }
.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  transition: color 0.15s;
}
.nav-menu a:hover { color: var(--primary); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 8px 0;
  min-width: 220px;
  list-style: none;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--body);
}
.dropdown-menu li a:hover { background: var(--canvas-soft); color: var(--ink); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s;
}

/* HERO */
.hero {
  padding: 80px 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
}
.hero-label {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--rounded-pill);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 56px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -1.5px;
  max-width: 700px;
  margin-bottom: 20px;
}
.hero p {
  font-size: 16px;
  color: var(--body);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.hero-image {
  margin-top: 48px;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.hero-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* SECTIONS */
.section { padding: 80px 0; }
.section-label {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--rounded-pill);
  margin-bottom: 16px;
}
.section-title {
  font-size: 36px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.72px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 16px;
  color: var(--body);
  max-width: 540px;
  line-height: 1.5;
  margin-bottom: 48px;
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--hairline-strong); }
.card-image {
  border-radius: var(--rounded-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-tag {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--rounded-pill);
  margin-bottom: 10px;
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  margin-bottom: 16px;
}
.card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}
.card-link:hover { color: var(--primary-active); }

/* ARTICLE LAYOUT */
.article-header { padding: 64px 0 40px; }
.article-header .breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.article-header .breadcrumb a { color: var(--muted); }
.article-header .breadcrumb a:hover { color: var(--primary); }
.article-header h1 {
  font-size: 42px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 760px;
}
.article-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.article-hero-img {
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  margin-bottom: 48px;
}
.article-hero-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.article-body {
  max-width: 760px;
}
.article-body h2 {
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.325px;
  margin: 48px 0 16px;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 12px;
}
.article-body p {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 20px;
}
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.article-body li {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 6px;
}
.article-body a { color: var(--primary); }
.article-body a:hover { color: var(--primary-active); }
.article-body .callout {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--primary);
  border-radius: var(--rounded-md);
  padding: 20px 24px;
  margin: 32px 0;
}
.article-body .callout p { margin: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 14px;
}
.article-body table th {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
}
.article-body table td {
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  color: var(--body);
  background: var(--surface-card);
}
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-xs);
  padding: 2px 6px;
  color: var(--ink);
}

/* FORM */
.contact-section { padding: 80px 0; background: var(--canvas-soft); border-top: 1px solid var(--hairline); }
.contact-form {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 40px;
  max-width: 560px;
}
.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-card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  height: 44px;
  transition: border-color 0.15s;
}
.form-group textarea { height: auto; min-height: 120px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form-group input.error,
.form-group textarea.error { border-color: var(--semantic-error); }
.form-error-msg {
  font-size: 13px;
  color: var(--semantic-error);
  margin-top: 4px;
  display: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--rounded-md);
  padding: 10px 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--primary-active); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 10px 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
  display: inline-flex;
  align-items: center;
}
.btn-secondary:hover { border-color: var(--ink); }
.form-success {
  display: none;
  background: #e8f5f0;
  border: 1px solid var(--semantic-success);
  border-radius: var(--rounded-md);
  padding: 16px 20px;
  color: var(--semantic-success);
  font-size: 15px;
  margin-top: 20px;
}

/* FOOTER */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 24px 48px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-brand { flex: 0 0 260px; }
.footer-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
}
.footer-links { display: flex; gap: 48px; flex: 1; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--body);
}
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.footer-bottom p + p { margin-top: 6px; }

/* COOKIE BANNER */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 520px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(38,37,30,0.08);
}
.cookie-banner p { font-size: 14px; color: var(--body); margin-bottom: 16px; line-height: 1.5; }
.cookie-banner a { color: var(--primary); }
.cookie-actions { display: flex; gap: 12px; }

/* PAGE HERO */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline-soft);
}
.page-hero h1 {
  font-size: 42px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.72px;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 620px;
}
.page-hero p {
  font-size: 16px;
  color: var(--body);
  max-width: 520px;
  line-height: 1.6;
}

/* RELATED ARTICLES */
.related-section {
  padding: 64px 0;
  border-top: 1px solid var(--hairline-soft);
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-image {
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.about-image img { width: 100%; height: 360px; object-fit: cover; }
.about-text h2 {
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.325px;
  margin-bottom: 16px;
}
.about-text p {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 16px;
}
.refs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.refs-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 14px;
  color: var(--body);
}
.refs-list li:last-child { border-bottom: none; }
.refs-list a { color: var(--primary); }

/* PRIVACY / TERMS */
.legal-body {
  max-width: 720px;
  padding: 48px 0 80px;
}
.legal-body h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 12px;
}
.legal-body p, .legal-body li {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-body ul { padding-left: 24px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
    z-index: 100;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li { width: 100%; border-bottom: 1px solid var(--hairline-soft); }
  .nav-menu > li > a { display: block; padding: 12px 0; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 8px 16px; display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .hero-image img { height: 240px; }
  .card-grid, .card-grid-2, .about-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  .footer-container { flex-direction: column; gap: 32px; }
  .footer-links { flex-direction: column; gap: 24px; }
  .contact-form { padding: 24px; }
  .article-header h1 { font-size: 28px; }
  .article-hero-img img { height: 220px; }
}
@media (max-width: 640px) {
  .hero { padding: 48px 0; }
  .section { padding: 48px 0; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}
