:root {
  --ink: oklch(0.18 0.02 170);
  --ink-soft: oklch(0.45 0.03 170);
  --paper: oklch(0.99 0.004 90);
  --paper-raised: oklch(0.97 0.007 90);
  --rule: oklch(0.9 0.008 90);
  --primary: oklch(0.55 0.175 160);
  --primary-foreground: oklch(0.985 0.002 230);
  --primary-soft: oklch(0.55 0.175 160 / 0.1);
  --accent-gold: oklch(0.72 0.12 75);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(0.95 0.004 90);
    --ink-soft: oklch(0.7 0.012 90);
    --paper: oklch(0.15 0.014 170);
    --paper-raised: oklch(0.19 0.016 170);
    --rule: oklch(0.3 0.016 170);
    --primary: oklch(0.65 0.19 160);
    --primary-foreground: oklch(0.1 0.015 170);
    --primary-soft: oklch(0.65 0.19 160 / 0.14);
    --accent-gold: oklch(0.78 0.13 80);
  }
}

:root[data-theme="dark"] {
  --ink: oklch(0.95 0.004 90);
  --ink-soft: oklch(0.7 0.012 90);
  --paper: oklch(0.15 0.014 170);
  --paper-raised: oklch(0.19 0.016 170);
  --rule: oklch(0.3 0.016 170);
  --primary: oklch(0.65 0.19 160);
  --primary-foreground: oklch(0.1 0.015 170);
  --primary-soft: oklch(0.65 0.19 160 / 0.14);
  --accent-gold: oklch(0.78 0.13 80);
}

:root[data-theme="light"] {
  --ink: oklch(0.18 0.02 170);
  --ink-soft: oklch(0.45 0.03 170);
  --paper: oklch(0.99 0.004 90);
  --paper-raised: oklch(0.97 0.007 90);
  --rule: oklch(0.9 0.008 90);
  --primary: oklch(0.55 0.175 160);
  --primary-foreground: oklch(0.985 0.002 230);
  --primary-soft: oklch(0.55 0.175 160 / 0.1);
  --accent-gold: oklch(0.72 0.12 75);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; }
p.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 48ch; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- header ---- */

.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 1.9rem; height: 1.9rem; flex-shrink: 0; }
.brand-small .brand-mark { width: 1.6rem; height: 1.6rem; }
.brand-word {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.site-nav a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}
.site-nav a:not(.btn):hover { color: var(--ink); }

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 88%, black); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-raised); }
.btn-large { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* ---- eyebrow / section rhythm ---- */

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.75rem;
}
.center { text-align: center; margin-left: auto; margin-right: auto; }
h2.center { max-width: 40ch; }

.section { padding: 5.5rem 0; }
.band { background: var(--paper-raised); padding: 5.5rem 0; }

/* ---- hero ---- */

.hero { padding: 4.5rem 0 5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.75rem; }

.mapping-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
}
.mapping-source {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}
.doc-icon { font-size: 1.3rem; }
.mapping-source-title { font-weight: 600; font-size: 0.92rem; }
.mapping-source-sub { font-size: 0.8rem; color: var(--ink-soft); }

.mapping-lines { height: 0; }
.mapping-lines svg {
  width: 100%;
  height: 220px;
  overflow: visible;
  margin-top: -8px;
}
.mapping-lines path {
  fill: none;
  stroke: var(--primary);
  stroke-opacity: 0.35;
  stroke-width: 1.5;
}

.mapping-targets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.mapping-targets li {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tag-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  flex-shrink: 0;
}

/* ---- problem/fix band ---- */

.band-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* ---- feature grid ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.feature-card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--paper);
}
.feature-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---- frameworks ---- */

.framework-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2.25rem 0 1.25rem;
}
.framework-badge {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.88rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
}
.framework-note { color: var(--ink-soft); font-size: 0.9rem; }

/* ---- cta band ---- */

.cta-band { padding: 5rem 0; }
.cta-band-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.cta-band-inner h2 { max-width: 26ch; }

/* ---- footer ---- */

.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0; }
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.85rem; color: var(--ink-soft); margin: 0; max-width: 42ch; text-align: center; }
.footer-contact { font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.footer-contact:hover { color: var(--primary); }

/* ---- responsive ---- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .site-nav a:not(.btn) { display: none; }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; text-align: center; }
}
