@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

: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-color: 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: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--soft { background-color: var(--canvas-soft); }

/* Typography */
.display-mega {
  font-size: 72px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -2.16px;
  color: var(--ink);
}
.display-lg {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
}
.display-md {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
}
.display-sm {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.11px;
  color: var(--ink);
}
.title-md {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.title-sm {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.body-md {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
}
.body-sm {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
}
.caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}
.caption-uppercase {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}
code, .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* Navigation */
.top-nav {
  background-color: var(--canvas);
  height: 64px;
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.top-nav__logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.top-nav__logo span { color: var(--primary); }
.top-nav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.top-nav__menu a {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.15s;
}
.top-nav__menu a:hover { color: var(--ink); }
.top-nav__menu a.active { color: var(--ink); }
.top-nav__actions { display: flex; align-items: center; gap: 12px; }
.top-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.top-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: all 0.2s;
}
.top-nav__mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 16px 24px 20px;
  gap: 16px;
}
.top-nav__mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.top-nav__mobile-menu.open { display: flex; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-primary:hover { background-color: var(--primary-active); color: var(--on-primary); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  border: 1px solid var(--hairline-strong);
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  height: 44px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-download:hover { opacity: 0.85; color: var(--canvas); }

/* Badge / Pill */
.badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  border-radius: var(--rounded-pill);
  padding: 4px 10px;
}

/* Cards */
.card {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}
.card--lg { padding: 32px; }

/* Hero */
.hero { padding: 96px 0 80px; }
.hero__label { margin-bottom: 20px; }
.hero__title { margin-bottom: 20px; }
.hero__sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero__image-wrap {
  margin-top: 64px;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.hero__image-wrap img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

/* Section headers */
.section-header { margin-bottom: 48px; }
.section-header__label { margin-bottom: 12px; }
.section-header__title { margin-bottom: 12px; }
.section-header__sub { font-size: 16px; color: var(--body); max-width: 480px; }

/* Article cards grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.article-card {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.article-card:hover { border-color: var(--hairline-strong); }
.article-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.article-card__body { padding: 20px 24px 24px; }
.article-card__tag { margin-bottom: 10px; }
.article-card__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 10px;
}
.article-card__excerpt {
  font-size: 14px;
  color: var(--body);
  line-height: 1.55;
  margin-bottom: 16px;
}
.article-card__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}
.article-card__link:hover { color: var(--primary-active); }

/* Article page */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.article-content h1 {
  font-size: 42px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.article-meta__date {
  font-size: 13px;
  color: var(--muted);
}
.article-hero-img {
  width: 100%;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--hairline);
  margin-bottom: 40px;
  height: 400px;
  object-fit: cover;
}
.article-body h2 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: 40px 0 16px;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 12px;
}
.article-body p { color: var(--body); line-height: 1.65; margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
  color: var(--body);
  line-height: 1.65;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body a:hover { color: var(--primary-active); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body .img-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 32px;
}
.article-body .info-box {
  background-color: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  margin: 24px 0;
}
.article-body .info-box p { margin-bottom: 0; }
.article-body figure { margin: 32px 0; }
.article-body figure img {
  width: 100%;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--hairline);
  max-height: 400px;
  object-fit: cover;
}
.article-body figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.article-body table th {
  background-color: var(--canvas-soft);
  color: var(--ink);
  font-weight: 600;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  text-align: left;
}
.article-body table td {
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  color: var(--body);
}
.article-body table tr:nth-child(even) td {
  background-color: var(--canvas-soft);
}

/* Sidebar */
.sidebar-card {
  background-color: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.sidebar-card__links { display: flex; flex-direction: column; gap: 10px; }
.sidebar-card__links a {
  font-size: 14px;
  color: var(--body);
  line-height: 1.4;
  padding-left: 12px;
  border-left: 2px solid var(--hairline);
  transition: border-color 0.15s, color 0.15s;
}
.sidebar-card__links a:hover { border-left-color: var(--primary); color: var(--ink); }
.sidebar-toc a { padding-left: 0; border-left: none; }
.sidebar-toc a:hover { color: var(--primary); }
.sidebar-toc li { padding: 6px 0; border-bottom: 1px solid var(--hairline-soft); }
.sidebar-toc li:last-child { border-bottom: none; }
.sidebar-toc a { font-size: 13px; color: var(--muted); }
.sidebar-toc a:hover { color: var(--primary); }

/* Contact form */
.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-color: var(--surface-card);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 12px 16px;
  height: 44px;
  outline: none;
  transition: border-color 0.15s;
}
.form-group textarea { height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--ink);
}
.form-group input.error, .form-group textarea.error {
  border-color: var(--semantic-error);
}
.form-error {
  font-size: 13px;
  color: var(--semantic-error);
  margin-top: 4px;
  display: none;
}
.form-success {
  background-color: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  font-size: 15px;
  color: var(--semantic-success);
  display: none;
}
.form-loading { opacity: 0.6; pointer-events: none; }

/* CTA band */
.cta-band {
  background-color: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 96px 0;
  text-align: center;
}
.cta-band__title { margin-bottom: 24px; }
.cta-band__sub { font-size: 16px; color: var(--body); margin-bottom: 36px; }

/* Footer */
.footer {
  background-color: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.footer__brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.footer__brand-name span { color: var(--primary); }
.footer__brand-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 220px;
}
.footer__col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  transition: color 0.15s;
}
.footer__links a:hover { color: var(--ink); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.footer__copy { font-size: 13px; color: var(--muted); }
.footer__legal { display: flex; gap: 20px; }
.footer__legal a { font-size: 13px; color: var(--muted); }
.footer__legal a:hover { color: var(--ink); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--surface-card);
  border-top: 1px solid var(--hairline-strong);
  padding: 20px 24px;
  z-index: 999;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner__text { font-size: 14px; color: var(--body); flex: 1; min-width: 200px; }
.cookie-banner__text a { color: var(--primary); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Page header */
.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0;
}
.page-header__label { margin-bottom: 12px; }
.page-header__title { margin-bottom: 12px; }
.page-header__sub { font-size: 16px; color: var(--body); max-width: 560px; }

/* Divider */
.divider { height: 1px; background-color: var(--hairline); margin: 0; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb__sep { color: var(--muted-soft); }

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Privacy / Terms */
.legal-content h2 {
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin: 36px 0 14px;
  letter-spacing: -0.11px;
}
.legal-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 10px;
}
.legal-content p { color: var(--body); line-height: 1.65; margin-bottom: 14px; }
.legal-content ul { margin: 0 0 14px 22px; color: var(--body); }
.legal-content ul li { margin-bottom: 4px; list-style: disc; }
.legal-content a { color: var(--primary); text-decoration: underline; }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1024px) {
  .display-mega { font-size: 56px; letter-spacing: -1.5px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .top-nav__menu { display: none; }
  .top-nav__actions { display: none; }
  .top-nav__hamburger { display: flex; }
  .display-mega { font-size: 36px; letter-spacing: -0.8px; }
  .display-lg { font-size: 28px; }
  .hero { padding: 56px 0 48px; }
  .hero__image-wrap img { height: 240px; }
  .section { padding: 56px 0; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 64px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .display-mega { font-size: 32px; }
}
