@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

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

: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;
  --success: #1f8a65;
  --error: #cf2d56;
  --section: 80px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: 'JetBrains Mono', monospace; }

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

/* TOP NAV */
.top-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.nav-brand span { color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

/* HERO */
.hero {
  padding: var(--section) 0 64px;
  border-bottom: 1px solid var(--hairline);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.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(--radius-pill);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero p {
  font-size: 18px;
  color: var(--body);
  line-height: 1.6;
  max-width: 520px;
}
.hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  aspect-ratio: 4/3;
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* SECTIONS */
.section { padding: var(--section) 0; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.section-title {
  font-size: 36px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.72px;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--body);
  max-width: 560px;
  line-height: 1.6;
}
.section-header { margin-bottom: 48px; }
.section-divider { border: none; border-top: 1px solid var(--hairline); }
.section-alt { background: var(--canvas-soft); }

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

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--hairline-soft);
}
.card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-title {
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.11px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--primary); }
.card-body { font-size: 14px; color: var(--body); line-height: 1.6; }
.card-date { font-size: 13px; color: var(--muted); margin-top: 16px; }
.card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

/* ARTICLE LIST */
.article-list { display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--hairline); }
.article-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}
.article-row-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.article-row-title { font-size: 22px; font-weight: 400; letter-spacing: -0.11px; color: var(--ink); }
.article-row-title a { color: var(--ink); }
.article-row-title a:hover { color: var(--primary); }
.article-row-excerpt { font-size: 14px; color: var(--body); margin-top: 8px; line-height: 1.6; }
.article-row-img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--hairline-soft); flex-shrink: 0; }

/* INFO BLOCKS */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-block {
  padding: 24px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
.info-block-num {
  font-size: 36px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: -0.72px;
  margin-bottom: 8px;
}
.info-block-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.info-block-body { font-size: 14px; color: var(--body); line-height: 1.6; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-strong);
  font-size: 11px;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  color: var(--body);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--canvas-soft); }
.table-wrap { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }

/* CODE BLOCK */
.code-block {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink);
  overflow-x: auto;
  line-height: 1.5;
}

/* FORM */
.contact-form-wrap { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
  height: 44px;
  transition: border-color 0.15s;
}
.form-textarea { height: auto; min-height: 100px; resize: vertical; }
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form-input.error, .form-textarea.error { border-color: var(--error); }
.form-error { font-size: 13px; color: var(--error); margin-top: 4px; display: none; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-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 { background: var(--muted-soft); cursor: not-allowed; }
.form-success {
  display: none;
  background: #e6f4f0;
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--success);
  font-size: 14px;
  margin-top: 16px;
}

/* FOOTER */
.footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.footer-brand span { color: var(--primary); }
.footer-tagline { font-size: 14px; color: var(--body); line-height: 1.6; max-width: 280px; }
.footer-col-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--body); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-disclaimer { font-size: 12px; color: var(--muted-soft); max-width: 600px; text-align: right; line-height: 1.5; }

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 640px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 999;
  box-shadow: none;
  border: none;
}
.cookie-banner.hidden { display: none; }
.cookie-text { font-size: 14px; line-height: 1.5; color: var(--canvas-soft); flex: 1; }
.cookie-text a { color: var(--canvas); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-cookie-accept {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-cookie-reject {
  background: transparent;
  color: var(--canvas-soft);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* BREADCRUMB */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ARTICLE PAGE */
.article-hero { padding: 48px 0 40px; border-bottom: 1px solid var(--hairline); }
.article-hero-label { margin-bottom: 12px; }
.article-hero h1 {
  font-size: 42px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1.15;
  max-width: 720px;
  margin-bottom: 16px;
}
.article-meta { font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.article-body {
  max-width: 720px;
  padding: 48px 0;
}
.article-body h2 {
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.325px;
  line-height: 1.25;
  margin: 40px 0 16px;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--body-strong);
  margin: 28px 0 12px;
}
.article-body p {
  font-size: 16px;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 16px;
}
.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.article-body li { font-size: 16px; color: var(--body); line-height: 1.6; }
.article-body a { color: var(--primary); }
.article-body a:hover { text-decoration: underline; }
.article-body img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  border: 1px solid var(--hairline);
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}
.article-body .note-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--body);
  line-height: 1.6;
}
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 64px; align-items: start; }
.article-sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink); margin-bottom: 14px; }
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a { font-size: 14px; color: var(--body); line-height: 1.4; }
.sidebar-links a:hover { color: var(--primary); }

/* PAGE HEADER */
.page-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--hairline);
}
.page-header h1 {
  font-size: 42px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.page-header p { font-size: 16px; color: var(--body); max-width: 560px; }
.page-body { max-width: 720px; padding: 48px 0; }
.page-body h2 { font-size: 22px; font-weight: 400; color: var(--ink); margin: 32px 0 12px; letter-spacing: -0.11px; }
.page-body p { font-size: 16px; color: var(--body); line-height: 1.7; margin-bottom: 14px; }
.page-body ul { margin: 0 0 14px 24px; }
.page-body li { font-size: 16px; color: var(--body); line-height: 1.6; margin-bottom: 4px; }
.page-body a { color: var(--primary); }
.last-updated { font-size: 13px; color: var(--muted); margin-top: 40px; }

/* BADGE */
.badge {
  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(--radius-pill);
}

/* LOADING SPINNER */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--on-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero h1 { font-size: 40px; }
  .section-title { font-size: 30px; }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .hero-img { order: -1; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--canvas); border-bottom: 1px solid var(--hairline); padding: 16px 24px; flex-direction: column; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .footer-disclaimer { text-align: left; }
  .article-row { grid-template-columns: 1fr; }
  .article-row-img { display: none; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0; }
  .section { padding: 48px 0; }
  .article-hero h1 { font-size: 28px; }
  .page-header h1 { font-size: 28px; }
}
