@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --ink: #26251e;
  --body: #5a5852;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --on-primary: #ffffff;
  --primary: #f54e00;
  --primary-active: #d04200;
  --t-thinking: #dfa88f;
  --t-grep: #9fc9a2;
  --t-read: #9fbbe0;
  --t-edit: #c0a8dd;
  --t-done: #c08532;
  --success: #1f8a65;
  --error: #cf2d56;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;
  --sans: "Inter", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 400;
  margin: 0 0 16px;
}

h1 { font-size: 72px; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 36px; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 26px; line-height: 1.25; letter-spacing: -0.0125em; }
h4 { color: var(--ink); font-size: 18px; font-weight: 600; margin: 0 0 8px; letter-spacing: 0; }

p { margin: 0 0 16px; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--canvas);
  padding: 10px 16px;
  border-radius: var(--r-md);
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.lead { font-size: 18px; color: var(--body); max-width: 62ch; }

.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }

.top-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: var(--r-sm);
  background: var(--primary);
  display: inline-block;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}
.nav-menu a:hover { color: var(--primary); text-decoration: none; }
.nav-contact {
  border: 1px solid var(--hairline-strong);
  background: var(--surface-card);
  padding: 8px 14px;
  border-radius: var(--r-md);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 18px;
  height: 40px;
}
.btn-primary:hover { background: var(--primary-active); }
.btn-secondary {
  background: var(--surface-card);
  color: var(--ink);
  border-color: var(--hairline-strong);
  padding: 10px 18px;
  height: 40px;
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ink {
  background: var(--ink);
  color: var(--canvas);
  padding: 12px 20px;
  height: 44px;
}
.btn-ink:hover { background: #1b1a14; }
.btn-text {
  color: var(--ink);
  padding: 10px 4px;
  height: 40px;
  background: none;
}
.btn-text:hover { text-decoration: underline; }

.hero { padding: 80px 0 64px; }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-figure {
  margin-top: 48px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-card);
}
.hero-figure img { width: 100%; height: 420px; object-fit: cover; display: block; }
.figure-cap {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 16px;
  border-top: 1px solid var(--hairline-soft);
}
.figure-cap a { color: var(--muted); text-decoration: underline; }

.badge-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface-strong);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
}
.article-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.article-card img { width: 100%; height: 188px; object-fit: cover; display: block; }
.article-card .card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { font-size: 22px; }
.article-card .card-cta { margin-top: auto; color: var(--ink); font-weight: 500; font-size: 14px; }
.article-card .card-cta:hover { color: var(--primary); }

.section-head { max-width: 64ch; margin-bottom: 40px; }

.benefit { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px; }
.benefit .num { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.zone-table { width: 100%; border-collapse: collapse; background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.zone-table th, .zone-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--hairline-soft); font-size: 15px; }
.zone-table th { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--canvas-soft); }
.zone-table tr:last-child td { border-bottom: 0; }
.zone-table td:first-child { color: var(--ink); font-weight: 500; }

.callout {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--t-done);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin: 24px 0;
}
.callout h4 { margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 14px; height: 14px;
  border-radius: var(--r-xs);
  border: 2px solid var(--success);
  background: linear-gradient(135deg, transparent 45%, var(--success) 45%);
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--canvas);
  font-family: var(--mono);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li h4 { margin-bottom: 6px; }

.article-wrap { max-width: 760px; margin: 0 auto; }
.article-header { padding: 64px 0 0; }
.article-meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.article-hero { margin: 32px 0; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.article-hero img { width: 100%; height: 360px; object-fit: cover; display: block; }
.article-body { font-size: 16px; }
.article-body h2 { font-size: 26px; margin-top: 40px; }
.article-body h3 { font-size: 20px; margin-top: 28px; }
.article-body ul { padding-left: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--ink); text-decoration: underline; }
.article-body a:hover { color: var(--primary); }

.references { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.references h2 { font-size: 22px; }
.references ol { padding-left: 20px; font-size: 14px; color: var(--body); }
.references li { margin-bottom: 8px; }

.related { margin-top: 48px; }

.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

.form-band { background: var(--canvas-soft); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-form { background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.field input { height: 44px; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field .error-msg { display: none; color: var(--error); font-size: 13px; margin-top: 6px; }
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.field.invalid .error-msg { display: block; }
.form-status {
  display: none;
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-status.show { display: block; }
.form-status.success { background: rgba(31,138,101,0.1); color: var(--success); border: 1px solid rgba(31,138,101,0.3); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: var(--r-pill);
  display: inline-block;
  margin-right: 8px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer { background: var(--canvas); border-top: 1px solid var(--hairline); padding: 64px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 32px; }
.brand-footer { margin-bottom: 12px; }
.footer-note { font-size: 14px; color: var(--body); max-width: 34ch; }
.footer-head { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.footer-link { display: block; font-size: 14px; color: var(--body); margin-bottom: 10px; }
.footer-link:hover { color: var(--ink); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.footer-bottom p { font-size: 13px; color: var(--muted); max-width: 80ch; }
.footer-copy { margin-top: 8px; }

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface-card);
  border-top: 1px solid var(--hairline-strong);
  z-index: 60;
}
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 24px; }
.cookie-text { font-size: 14px; color: var(--body); margin: 0; max-width: 70ch; }
.cookie-text a { color: var(--ink); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }

@media (max-width: 1024px) {
  h1 { font-size: 56px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 24px 16px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); }
  .nav-contact { border: 1px solid var(--hairline-strong); text-align: center; margin-top: 8px; }
}

@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  .section { padding: 56px 0; }
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .form-grid { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .hero-figure img { height: 260px; }
  .article-hero img { height: 240px; }
}
