/* ── Inter font ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600&display=swap');

/* ── Custom properties ─────────────────────────────────────────────────── */
:root {
  --bg: #faf7f2;
  --bg-alt: #f2ede5;
  --bg-dark: #1a1816;
  --border: #e6dfd3;
  --text: #1a1816;
  --text-muted: #6b6359;
  --accent: #3d6b4f;
  --accent-hover: #2f5a3f;
  --ochre: #c4943d;
  --ochre-hover: #a87a2e;
  --green-bright: #4a805e;
  --red: #b8453a;
  --radius: 6px;
  --max-w: 720px;
  --max-w-wide: 880px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
}

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

html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; }

::selection { background: rgba(61,107,79,0.15); color: var(--text); }

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: 2.8rem; font-weight: 300; }
h2 { font-size: 1.35rem; font-weight: 500; margin: 4rem 0 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 0.5rem; }
p { margin-bottom: 0.85rem; }

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
header {
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
nav {
  max-width: var(--max-w-wide); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.75rem;
}
.logo {
  font-weight: 600; font-size: 0.92rem; color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--accent); }

.product-tag {
  font-size: 0.72rem; font-weight: 600; color: var(--accent);
  background: rgba(61,107,79,0.07); border: 1px solid rgba(61,107,79,0.12);
  padding: 0.15em 0.5em; border-radius: 4px;
  margin-left: 0.5rem; white-space: nowrap;
}

.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.84rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle-label span { display: block; width: 20px; height: 2px; background: var(--text-muted); border-radius: 2px; }

/* ── Layout ────────────────────────────────────────────────────────────── */
main { max-width: var(--max-w); margin: 0 auto; padding: 4rem 1.75rem 5rem; }
main.wide { max-width: var(--max-w-wide); }

/* ── Section dividers ──────────────────────────────────────────────────── */
.section-divider {
  width: 48px; height: 1px; background: var(--ochre);
  margin: 3.5rem 0 1.5rem; opacity: 0.6;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 5rem 0 3rem; text-align: center; }
.hero-eyebrow {
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1.5rem;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.hero h1 {
  font-size: 3rem; font-weight: 300; line-height: 1.2;
  letter-spacing: -0.025em; margin-bottom: 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--ochre); }
.hero p {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.65;
  font-weight: 400;
}
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 0.65rem 1.6rem;
  border-radius: var(--radius); font-weight: 500; font-size: 0.88rem;
  border: 1px solid var(--border); color: var(--text);
  transition: all 0.2s; cursor: pointer; line-height: 1.4;
}
.btn:hover { text-decoration: none; background: var(--bg-alt); border-color: var(--text-muted); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ochre { background: var(--ochre); color: #fff; border-color: var(--ochre); }
.btn-ochre:hover { background: var(--ochre-hover); border-color: var(--ochre-hover); color: #fff; }
.btn-ghost { border-color: transparent; color: var(--text-muted); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { background: transparent; border-color: transparent; color: var(--text); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--text-muted); transform: translateY(-1px); }
.card h3 { margin-top: 0; font-size: 0.95rem; font-weight: 600; }
.card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0; }
.card .label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.75rem;
}

/* ── Performance bar ───────────────────────────────────────────────────── */
.perf-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin: 1.5rem 0;
}
.perf-bar div {
  background: var(--bg-alt); padding: 1.25rem 1rem; text-align: center;
}
.perf-bar strong { display: block; font-size: 1.3rem; font-weight: 600; color: var(--green-bright); letter-spacing: -0.02em; margin-bottom: 0.15rem; }
.perf-bar span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }

/* ── Feature list ──────────────────────────────────────────────────────── */
.feature-list { list-style: none; margin: 1.5rem 0; }
.feature-list li {
  padding: 0.65rem 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 1rem; align-items: baseline; font-size: 0.9rem;
}
.feature-list li .label { font-weight: 600; min-width: 150px; color: var(--text); font-size: 0.84rem; }
.feature-list li .desc { color: var(--text-muted); font-size: 0.86rem; }

/* ── Tables ────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; font-size: 0.88rem; }
thead th {
  font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); text-align: left;
  padding: 0 0 0.75rem; border-bottom: 2px solid var(--border);
}
td { padding: 0.7rem 0; vertical-align: top; border-bottom: 1px solid var(--border); }
td:first-child {
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--text); padding-right: 1.5rem;
}
td:last-child { color: var(--text-muted); }

/* ── Code ──────────────────────────────────────────────────────────────── */
pre {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  overflow-x: auto; margin: 1rem 0; font-size: 0.8rem; line-height: 1.6;
}
code { font-family: var(--font-mono); font-size: 0.88em; }
pre code { font-size: 0.9em; }
:not(pre) > code {
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.85em;
}

/* ── Inverted / dark sections ──────────────────────────────────────────── */
.invert {
  background: var(--bg-dark); color: #d4d0ca;
  padding: 4rem 1.75rem; margin: 0 -1.75rem;
}
.invert h2, .invert h3 { color: #f0ede8; }
.invert p, .invert li { color: #b0aca5; }
.invert a { color: #7aaf8a; }
.invert a:hover { color: #9cc8a8; }
.invert .text-muted { color: #8a857d; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-dark); color: #b0aca5;
  padding: 4rem 1.75rem 2rem; margin-top: 5rem;
  font-size: 0.84rem; line-height: 1.7;
}
.footer-grid {
  max-width: var(--max-w-wide); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-grid h4 {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: #f0ede8; margin-bottom: 1rem;
}
.footer-grid a { color: #8a857d; }
.footer-grid a:hover { color: #d4d0ca; text-decoration: none; }
.footer-grid p { margin-bottom: 0.5rem; }
.footer-bottom {
  max-width: var(--max-w-wide); margin: 3rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem; color: #6b655d;
}

/* ── Journal list ──────────────────────────────────────────────────────── */
.journal-list { list-style: none; margin: 2rem 0; }
.journal-list li { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.journal-list .date {
  font-size: 0.78rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem;
}
.journal-list h3 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 500; }
.journal-list h3 a { color: var(--text); }
.journal-list h3 a:hover { color: var(--accent); text-decoration: none; }
.journal-list p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* ── Article ────────────────────────────────────────────────────────────── */
article header { background: none; border: none; position: static; backdrop-filter: none; }
article header h1 { margin-bottom: 0.25rem; }
article .subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 2rem; }
article .date {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 2rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.article-body { font-size: 1rem; line-height: 1.7; }
.article-body p { margin-bottom: 1.1rem; }
.article-body h2 { font-size: 1.3rem; margin: 3rem 0 1rem; }
.article-body h3 { font-size: 1.05rem; margin: 2rem 0 0.5rem; }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.pricing-card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  display: flex; flex-direction: column;
}
.pricing-card.featured { border-color: var(--accent); background: #fff; }
.pricing-card .name { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.25rem; }
.pricing-card .price { font-size: 2.2rem; font-weight: 600; margin: 0.75rem 0; letter-spacing: -0.02em; }
.pricing-card .price span { font-size: 0.88rem; font-weight: 400; color: var(--text-muted); }
.pricing-card .desc { color: var(--text-muted); font-size: 0.84rem; margin-bottom: 1.25rem; }
.pricing-card ul { text-align: left; list-style: none; margin: 0 0 1.5rem; flex: 1; font-size: 0.84rem; }
.pricing-card ul li { padding: 0.3rem 0; color: var(--text-muted); }
.pricing-card ul li::before { content: "\2713 "; color: var(--accent); font-weight: 700; }
.pricing-card .btn { margin-top: auto; }
.pricing-card .btn-primary { width: 100%; }
.pricing-card .note { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ── Fade-in animation ─────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.6s ease-out both;
}
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }

/* ── Product page ──────────────────────────────────────────────────────── */
.product-hero { padding: 3rem 0 2rem; }
.product-hero h1 { font-size: 2.4rem; margin-bottom: 0.75rem; }
.product-hero .tagline { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }

.integration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.integration-item {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
  font-weight: 500; font-size: 0.88rem;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  html { font-size: 16px; }
  .hero { padding: 3rem 0 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .product-hero h1 { font-size: 1.8rem; }
  main { padding: 2rem 1.25rem; }
  h1 { font-size: 1.8rem; }

  .nav-toggle-label { display: flex; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem; gap: 0.5rem;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }

  .perf-bar { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .card-grid.two { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: repeat(2, 1fr); }

  table { font-size: 0.8rem; }
  td:first-child { white-space: normal; padding-right: 0.75rem; }
  .feature-list li { flex-direction: column; gap: 0.1rem; }
  .feature-list li .label { min-width: auto; }
}
