@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;
  --on-primary: #ffffff;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --semantic-success: #1f8a65;
  --semantic-error: #cf2d56;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--body);
  font-size: 16px;
  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; }

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

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

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

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

.nav-brand 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(--muted);
  transition: color 0.15s;
}

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

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

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

.nav-mobile {
  display: none;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 24px;
}

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

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

.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

/* HERO */
.hero {
  padding: 80px 0;
  border-bottom: 1px solid var(--hairline);
}

.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;
  border-radius: 9999px;
  padding: 4px 10px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 64px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -2px;
  max-width: 760px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--body);
  line-height: 1.5;
  max-width: 540px;
  margin-bottom: 40px;
}

.hero-img-wrap {
  margin-top: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}

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

/* SECTION */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--hairline-soft); }

.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-body {
  font-size: 16px;
  color: var(--body);
  line-height: 1.5;
  max-width: 640px;
  margin-bottom: 48px;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--hairline-strong); }

.card-img {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--hairline-soft);
}

.card-img img {
  width: 100%;
  height: 180px;
  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;
  border-radius: 9999px;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  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); }

/* ARTICLES GRID - 2 cols */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.article-card:hover { border-color: var(--hairline-strong); }

.article-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.article-card-body {
  padding: 24px;
}

.article-card-body .card-tag { display: inline-block; }

.article-card-body h3 {
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.11px;
  line-height: 1.3;
  margin-bottom: 10px;
}

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

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

/* ARTICLE PAGE */
.article-hero {
  padding: 56px 0 0;
  border-bottom: 1px solid var(--hairline);
}

.article-hero-inner {
  max-width: 800px;
}

.article-hero h1 {
  font-size: 48px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 16px;
}

.article-hero-lead {
  font-size: 18px;
  color: var(--body);
  line-height: 1.55;
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 40px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--hairline-soft);
  margin-top: 24px;
}

.article-hero-cover {
  margin-top: 40px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

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

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}

.article-body h2 {
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.4px;
  margin: 48px 0 16px;
  line-height: 1.25;
}

.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.65;
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  margin: 0 0 20px 20px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}

.article-body li { margin-bottom: 6px; }

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-box {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

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

.info-box p {
  font-size: 15px;
  color: var(--body);
  line-height: 1.55;
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 12px;
  border: 1px solid var(--hairline);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-card);
}

th {
  background: var(--canvas-soft);
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--body);
  border-bottom: 1px solid var(--hairline-soft);
}

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

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-toc {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.sidebar-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.sidebar-toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.sidebar-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 11px;
  color: var(--muted-soft);
  font-weight: 500;
  flex-shrink: 0;
}

.sidebar-toc a {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-toc a:hover { color: var(--ink); }

.sidebar-related {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
}

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

.sidebar-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-related li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-related li:last-child { border-bottom: none; }

.sidebar-related a {
  font-size: 14px;
  color: var(--body);
  line-height: 1.4;
}

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

/* FORM */
.contact-form {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 40px;
  max-width: 600px;
}

.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);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.15s;
  height: 44px;
}

.form-group textarea {
  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);
}

.field-error {
  font-size: 13px;
  color: var(--semantic-error);
  margin-top: 4px;
  display: none;
}

.field-error.visible { display: block; }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}

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

.form-success {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--semantic-success);
  margin-top: 16px;
  display: none;
}

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

/* PAGE HEADER */
.page-header {
  padding: 64px 0;
  border-bottom: 1px solid var(--hairline);
}

.page-header h1 {
  font-size: 48px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

/* CONTENT PAGE */
.content-page {
  padding: 64px 0 80px;
  max-width: 760px;
}

.content-page h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 14px;
}

.content-page h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
}

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

.content-page ul, .content-page ol {
  margin: 0 0 16px 20px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}

.content-page li { margin-bottom: 6px; }

/* FOOTER */
.site-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 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

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

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}

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

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

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

.footer-disclaimer {
  font-size: 12px;
  color: var(--muted-soft);
  margin-top: 16px;
  line-height: 1.5;
  max-width: 600px;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 560px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  z-index: 999;
  box-shadow: 0 4px 24px rgba(38,37,30,0.18);
}

.cookie-banner.hidden { display: none; }

.cookie-text { flex: 1; }

.cookie-text p {
  font-size: 13px;
  color: #c8c5bc;
  line-height: 1.5;
  margin-bottom: 0;
}

.cookie-text p a {
  color: var(--canvas);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.btn-cookie-accept {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cookie-reject {
  background: transparent;
  color: #c8c5bc;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

/* BREADCRUMB */
.breadcrumb {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { color: var(--muted-soft); }

/* ABOUT PAGE */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.about-feature {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px;
}

.about-feature h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.about-feature p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
}

/* LOADING SPINNER */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.spinner.visible { display: block; }

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

/* RESPONSIVE */
@media (max-width: 1024px) {
  .cards-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 h1 { font-size: 40px; letter-spacing: -1.2px; }
  .hero { padding: 56px 0; }
  .section-title { font-size: 28px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .page-header h1 { font-size: 32px; }
  .contact-form { padding: 24px; }
  .cookie-banner { flex-direction: column; gap: 12px; }
  .team-grid { grid-template-columns: 1fr; }
  .about-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero-img-wrap img { height: 240px; }
  .article-hero-cover img { height: 240px; }
}
