/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f6f2ea;
  --bg-strong: #efe4d1;
  --surface:   rgba(255, 252, 247, 0.88);
  --surface-strong: #fffaf2;
  --fg:        #1d1b18;
  --muted:     #665f56;
  --accent:    #114b5f;
  --accent-2:  #bb6c2f;
  --accent-bg: #e3eef1;
  --border:    #ddd0bc;
  --code-bg:   #f1ece3;
  --shadow:    0 18px 40px rgba(17, 33, 39, 0.08);
  --max-w:     720px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  background-image:
    radial-gradient(circle at top left, rgba(187, 108, 47, 0.10), transparent 34%),
    radial-gradient(circle at top right, rgba(17, 75, 95, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 18%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

/* ── Layout ──────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ── Header / Nav ────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  background: rgba(246, 242, 234, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-img {
  height: 1.6rem;
  width: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

nav a:hover, nav a.active {
  color: var(--fg);
  background: rgba(255, 250, 242, 0.85);
  border-color: var(--border);
}

/* ── Hero (landing page) ─────────────────────────────── */
.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 75, 95, 0.16);
  background: rgba(255, 250, 242, 0.78);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero .cta {
  display: inline-flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1.2rem;
  margin-top: 1.35rem;
  font-size: 0.9rem;
}

.hero-links a {
  color: var(--muted);
  text-decoration: none;
}

.hero-links a:hover { color: var(--accent); }

.btn {
  display: inline-block;
  padding: 0.72rem 1.45rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(17, 75, 95, 0.18);
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 250, 242, 0.84);
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
}

/* ── Sections (landing page) ─────────────────────────── */
section { padding: 3rem 0; }

section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

section p, section li {
  color: var(--muted);
  margin-bottom: 0.6rem;
}

section ul { list-style: none; padding: 0; }
section ul li::before {
  content: "—";
  margin-right: 0.5rem;
  color: var(--border);
}

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.pillar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.pillar p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.pillar a { font-weight: 600; }

.pipeline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pipeline .step {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 500;
}

.pipeline .arrow { color: var(--border); }

.status-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.status-box p { margin-bottom: 0.3rem; }

.page-header {
  margin-bottom: 2.2rem;
}

.page-header h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  letter-spacing: -0.03em;
}

.page-lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 62ch;
}

.page-lead + .page-lead { margin-top: 0.9rem; }

.section-group {
  margin-top: 2.6rem;
}

.section-group h2 {
  margin-bottom: 0.35rem;
}

.section-caption {
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.section-note {
  color: var(--muted);
  margin-top: 2rem;
  font-style: italic;
}

/* ── Blog listing ────────────────────────────────────── */
.blog-list { padding: 3rem 0; }

.blog-list h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.post-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.2rem 0;
  margin-bottom: 1rem;
  padding: 1.2rem 1.1rem;
  transition: transform 0.15s, border-color 0.15s;
}

.post-item:last-child { margin-bottom: 0; }

.post-item:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 75, 95, 0.28);
}

.post-item a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  font-size: 1.05rem;
}

.post-item a:hover { color: var(--accent); }

.post-item .meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.post-item .excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.3rem;
}

/* ── Blog post ───────────────────────────────────────── */
article { padding: 3rem 0 4rem; }

article header {
  border: none;
  padding: 0 0 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

article header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

article header .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

article header .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.6;
}

article h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.2rem 0 0.8rem;
  letter-spacing: -0.01em;
}

article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.8rem 0 0.6rem;
}

article p {
  margin-bottom: 1rem;
}

article ul, article ol {
  margin: 0 0 1rem 1.5rem;
}

article li { margin-bottom: 0.35rem; }

article blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.6rem 1rem;
  color: var(--muted);
  background: var(--accent-bg);
  border-radius: 0 6px 6px 0;
}

article code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

article pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  line-height: 1.5;
}

article pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
}

/* ── Tables ───────────────────────────────────────────── */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.92rem;
}

article table th,
article table td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

article table th {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

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

article table td:first-child { font-weight: 500; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.post-nav a {
  color: var(--accent);
  text-decoration: none;
}
.post-nav a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  header .container {
    align-items: flex-start;
    flex-direction: column;
  }
  nav {
    width: 100%;
    justify-content: flex-start;
  }
  .hero {
    padding-top: 4.2rem;
  }
  .hero h1 { font-size: 2rem; }
  .pillars { grid-template-columns: 1fr; }
  .pipeline { font-size: 0.82rem; }
  .btn {
    width: 100%;
    text-align: center;
  }
  .hero .cta {
    display: flex;
    width: 100%;
  }
  .page-header h1,
  .blog-list h1,
  article header h1 { font-size: 1.75rem; }
  article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}
