@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 {
  scroll-behavior: smooth;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary);
}

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

/* Typography */
h1, h2, h3, h4 {
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

h1 { font-size: 72px; letter-spacing: -2.16px; line-height: 1.1; }
h2 { font-size: 36px; letter-spacing: -0.72px; }
h3 { font-size: 26px; letter-spacing: -0.325px; line-height: 1.25; }
h4 { font-size: 22px; letter-spacing: -0.11px; line-height: 1.3; }

p { color: var(--body); line-height: 1.5; }

.caption-upper {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
}

.body-sm { font-size: 14px; color: var(--body); }
.muted { color: var(--muted); }
.ink { color: var(--ink); }

code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
}

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

.section {
  padding: 80px 0;
}

/* Navigation */
.site-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-wordmark {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.nav-wordmark span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  line-height: 1.4;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: all 0.2s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 24px 24px;
  z-index: 99;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu ul a {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-soft);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary:hover {
  background: var(--primary-active);
  color: var(--on-primary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  border: 1px solid var(--hairline-strong);
  cursor: pointer;
  transition: border-color 0.15s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--ink);
}

/* Badge / pill */
.badge {
  display: inline-flex;
  align-items: center;
  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);
}

/* Hero */
.hero {
  padding: 80px 0 64px;
  background: var(--canvas);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--ink);
}

.hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

.hero-image {
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.hero-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* Cards */
.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--rounded-md);
  margin-bottom: 16px;
}

.card-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-excerpt {
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.card-link:hover {
  color: var(--primary-active);
}

/* Grid layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Section header */
.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  color: var(--ink);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 18px;
  color: var(--body);
  max-width: 600px;
}

/* Info boxes */
.info-band {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 32px;
  margin: 32px 0;
}

.info-band h3 {
  color: var(--ink);
  margin-bottom: 16px;
}

/* Feature list */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-md);
}

.feature-list .feat-icon {
  width: 32px;
  height: 32px;
  background: var(--surface-strong);
  border-radius: var(--rounded-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.feature-list .feat-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.feature-list .feat-text span {
  font-size: 14px;
  color: var(--body);
}

/* Article page */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: flex-start;
}

.article-content h1 {
  font-size: 42px;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--ink);
}

.article-content h2 {
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--ink);
}

.article-content h3 {
  font-size: 20px;
  letter-spacing: -0.2px;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-content p {
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin: 16px 0 20px 24px;
  color: var(--body);
  line-height: 1.7;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  color: var(--primary);
  border-bottom: 1px solid rgba(245, 78, 0, 0.3);
}

.article-content a:hover {
  color: var(--primary-active);
}

.article-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--surface-card);
  border-radius: 0 var(--rounded-md) var(--rounded-md) 0;
  color: var(--body-strong);
  font-size: 17px;
  line-height: 1.6;
}

.article-hero-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--rounded-lg);
  margin-bottom: 32px;
  border: 1px solid var(--hairline);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.article-meta .badge {
  font-size: 11px;
}

.article-meta time, .article-meta .read-time {
  font-size: 13px;
  color: var(--muted);
}

/* Sidebar */
.sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links a {
  font-size: 14px;
  color: var(--body);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.sidebar-links a:hover { color: var(--primary); }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
}

.data-table th {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--body);
}

.data-table tr:last-child td { border-bottom: none; }

/* Form */
.form-section {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 12px 16px;
  height: 44px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease;
  outline: none;
}

.form-group textarea {
  height: auto;
  min-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);
  display: none;
}

.form-error.show { display: block; }

.form-success {
  display: none;
  padding: 16px 20px;
  background: rgba(31, 138, 101, 0.08);
  border: 1px solid rgba(31, 138, 101, 0.3);
  border-radius: var(--rounded-md);
  color: var(--semantic-success);
  font-size: 15px;
  font-weight: 500;
  margin-top: 20px;
}

.form-success.show { display: block; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  height: 48px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 8px;
}

.btn-submit:hover { background: var(--primary-active); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dividers */
.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 48px 0;
}

/* Page header */
.page-header {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 60px;
}

.page-header .badge {
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 52px;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  max-width: 600px;
  color: var(--body);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--hairline-strong); }
.breadcrumb .current { color: var(--ink); }

/* Footer */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  max-width: 240px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 14px;
  color: var(--body);
}

.footer-col ul a:hover { color: var(--ink); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-bottom-links a {
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom-links a:hover { color: var(--ink); }

/* Disclaimer */
.disclaimer-box {
  background: var(--surface-strong);
  border-radius: var(--rounded-md);
  padding: 16px 20px;
  margin: 32px 0;
}

.disclaimer-box p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Cookie banner */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 48px);
  max-width: 680px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  box-shadow: 0 4px 24px rgba(38,37,30,0.15);
}

.cookie-banner.show { display: flex; }

.cookie-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: 14px;
  color: #ccc9bc;
  line-height: 1.5;
  min-width: 200px;
}

.cookie-text a {
  color: var(--canvas);
  border-bottom: 1px solid rgba(247,247,244,0.4);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--rounded-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  height: 36px;
  transition: background 0.15s ease;
}

.btn-cookie-accept:hover { background: var(--primary-active); }

.btn-cookie-reject {
  background: transparent;
  color: #ccc9bc;
  border: 1px solid rgba(247,247,244,0.25);
  padding: 8px 16px;
  border-radius: var(--rounded-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  height: 36px;
  transition: border-color 0.15s ease;
}

.btn-cookie-reject:hover { border-color: rgba(247,247,244,0.5); color: var(--canvas); }

/* Prose page (privacy, terms) */
.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 24px;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 28px;
  margin-bottom: 10px;
}

.prose p {
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  margin: 12px 0 16px 24px;
  color: var(--body);
  line-height: 1.7;
}

.prose li { margin-bottom: 6px; }

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.about-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}

.stat-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
  text-align: center;
}

.stat-box .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-box .stat-value {
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.5px;
}

/* Loading spinner for form */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.spinner.show { display: inline-block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
  h1 { font-size: 56px; letter-spacing: -1.5px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-layout { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { order: -1; }
  .hero-image img { height: 280px; }
}

@media (max-width: 768px) {
  h1 { font-size: 36px; letter-spacing: -0.9px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }

  .section { padding: 60px 0; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-header h1 { font-size: 36px; }

  .cookie-banner { bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%; border-radius: var(--rounded-lg) var(--rounded-lg) 0 0; transform: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .article-content h1 { font-size: 30px; letter-spacing: -0.5px; }
  .form-section { padding: 24px; }
}
