:root {
  --fg: #0a0a0a;
  --fg-muted: #525252;
  --fg-subtle: #8d8d8d;
  --bg: #ffffff;
  --bg-alt: #f4f4f0;
  --bg-deep: #161616;
  --accent: #1f4a30;
  --accent-hover: #2d5a3d;
  --accent-fg: #ffffff;
  --rule: #e0e0e0;
  --rule-strong: #c6c6c6;
  --code-bg: #f4f4f0;
  --max-width: 1200px;
  --max-content: 760px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f4f4f0;
    --fg-muted: #a8a8a8;
    --fg-subtle: #6f6f6f;
    --bg: #0c0c0c;
    --bg-alt: #161616;
    --bg-deep: #000000;
    --accent: #7fb892;
    --accent-hover: #98c9aa;
    --accent-fg: #0c0c0c;
    --rule: #262626;
    --rule-strong: #393939;
    --code-bg: #1a1a1a;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); }

/* ---------- Top navigation ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

@media (prefers-color-scheme: dark) {
  .topbar { background: rgba(12, 12, 12, 0.85); }
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg);
  text-decoration: none;
}

.topbar-brand .org {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
  padding-right: 14px;
  border-right: 1px solid var(--rule);
}

.topbar-brand .product {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.topbar-nav a:hover { color: var(--fg); }

@media (max-width: 640px) {
  .topbar-inner { padding: 0 20px; }
  .topbar-nav { gap: 16px; }
  .topbar-nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  letter-spacing: -0.005em;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}

.btn-outline:hover { border-color: var(--fg); }

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--rule);
  padding: 88px 0 104px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(closest-side, rgba(31, 74, 48, 0.06), transparent);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background: radial-gradient(closest-side, rgba(127, 184, 146, 0.08), transparent);
  }
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 22px;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-subtle);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.02), 0 18px 40px -20px rgba(0, 0, 0, 0.12);
}

/* ---------- Section primitives ---------- */

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--rule);
}

.section-alt { background: var(--bg-alt); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  margin-bottom: 56px;
  max-width: 720px;
}

.section-header .eyebrow { color: var(--fg-subtle); }

.section-header h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 0 0 16px;
}

.section-header .sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  margin: 0;
  max-width: 620px;
  line-height: 1.55;
}

/* ---------- Capability grid (corporate-dense) ---------- */

.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

@media (max-width: 900px) { .capabilities { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .capabilities { grid-template-columns: 1fr; } }

.capability {
  padding: 36px 30px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  transition: background 0.15s ease;
}

.section-alt .capability { background: var(--bg-alt); }
.capability:hover { background: var(--bg-alt); }
.section-alt .capability:hover { background: var(--bg); }

.capability-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 20px;
  color: var(--accent);
  display: block;
}

.capability h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.capability p {
  font-size: 0.94rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

@media (max-width: 760px) { .principles { grid-template-columns: 1fr; gap: 32px; } }

.principle h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.principle h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex-shrink: 0;
  transform: rotate(45deg);
}

.principle p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.65;
}

.principles-cta { margin-top: 40px; }

/* ---------- Dark CTA strip ---------- */

.cta-strip {
  background: var(--bg-deep);
  color: #f4f4f0;
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.cta-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-strip h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.015em;
  color: #f4f4f0;
  font-weight: 600;
}

.cta-strip p {
  margin: 8px 0 0;
  color: #a8a8a8;
  font-size: 0.98rem;
}

.cta-strip .btn-primary {
  background: #f4f4f0;
  color: var(--bg-deep);
  border-color: #f4f4f0;
}

.cta-strip .btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.cta-strip .btn-outline {
  color: #f4f4f0;
  border-color: #525252;
}

.cta-strip .btn-outline:hover { border-color: #f4f4f0; }

/* ---------- Footer ---------- */

.footer {
  background: var(--bg-alt);
  padding: 64px 0 28px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 760px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 460px) {
  .footer-cols { grid-template-columns: 1fr; }
}

.footer-brand .org {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-brand .product {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--fg-muted);
  max-width: 300px;
  margin: 0;
  line-height: 1.55;
}

.footer-col h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 18px;
}

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

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

.footer-col a {
  font-size: 0.92rem;
  color: var(--fg-muted);
  text-decoration: none;
}

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

.footer-bar {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--fg-subtle);
}

/* ---------- Document layout (privacy page) ---------- */

.crumbs {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 28px 32px 0;
  font-size: 0.85rem;
  color: var(--fg-subtle);
}

.crumbs a {
  color: var(--fg-subtle);
  text-decoration: none;
}

.crumbs a:hover { color: var(--fg); }

.crumbs .sep {
  margin: 0 8px;
  color: var(--rule-strong);
}

.document {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 24px 32px 96px;
}

.document h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.2em 0 0.5em;
  font-weight: 700;
}

.document h2 {
  font-size: 1.45rem;
  margin: 2.5em 0 0.75em;
  letter-spacing: -0.008em;
  font-weight: 600;
}

.document h3 {
  font-size: 1.1rem;
  margin: 2em 0 0.5em;
  font-weight: 600;
}

.document p, .document li { color: var(--fg); }
.document p.meta { color: var(--fg-muted); font-size: 0.92em; }

.document a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.document a:hover { text-decoration-thickness: 2px; }

.document hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

.document ul { padding-left: 1.25em; }
.document li { margin-bottom: 0.4em; }

.document code, .document pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.document code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.document table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.94em;
  border: 1px solid var(--rule);
}

.document th, .document td {
  text-align: left;
  padding: 0.75em 0.95em;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.document th {
  font-weight: 600;
  color: var(--fg-muted);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule-strong);
}

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