/* Deadpath docs — light enterprise theme. Works without JavaScript. */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --brand: #2447f9;
  --brand-ink: #1a36c9;
  --brand-soft: #e8edff;
  --violet: #7c3aed;
  --ok: #059669;
  --ok-soft: #d1fae5;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --dead: #e11d48;
  --dead-soft: #ffe4e6;
  --note: #64748b;
  --note-soft: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px -24px rgba(36, 71, 249, .25);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; }
pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.55;
  box-shadow: var(--shadow);
}
pre code { background: none; border: 0; padding: 0; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: .3em .9em;
  margin-bottom: 14px;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
section.tight { padding: 40px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 248, 251, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 28px; height: 28px; }
nav.primary { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
nav.primary a { color: var(--ink-2); font-weight: 600; font-size: .92rem; padding: 6px 10px; border-radius: 8px; }
nav.primary a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
nav.primary a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
nav.primary .gh { border: 1px solid var(--line); background: var(--surface); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; padding: 12px 20px; border-radius: 10px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(36, 71, 249, .7); }
.btn.primary:hover { background: var(--brand-ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-2); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 140%; z-index: -1;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(36, 71, 249, .16), transparent 60%),
    radial-gradient(50% 40% at 85% 10%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(40% 40% at 70% 80%, rgba(5, 150, 105, .10), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.25rem; }
.hero-art { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; }
.hero-art svg { width: 100%; height: auto; display: block; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.trust span::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 6px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.stat span { color: var(--muted); font-size: .92rem; }

/* cards */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d6ddff; }
.card h3 { margin-top: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.card .icon svg { width: 24px; height: 24px; }
.card.pain .icon { background: var(--dead-soft); color: var(--dead); }
.card.fix .icon { background: var(--ok-soft); color: var(--ok); }
.card.mem .icon { background: #ede9fe; color: var(--violet); }
.card .more { display: inline-block; margin-top: 12px; font-weight: 700; }
.card .more::after { content: " →"; }

/* pipeline infographic */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; counter-reset: step; }
.pipeline.cols-5 { grid-template-columns: repeat(5, 1fr); }
.pipeline .node { position: relative; padding: 0 14px; }
.pipeline .node .bubble {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px;
  background: var(--surface); border: 2px solid var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 0 0 8px var(--brand-soft);
}
.pipeline .node::before {
  content: ""; position: absolute; top: 27px; left: calc(50% + 40px); right: calc(-50% + 40px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 14px);
  background-size: 14px 2px;
  animation: dash 1.2s linear infinite;
}
.pipeline .node:last-child::before { display: none; }
.pipeline .node h3 { text-align: center; font-size: 1.05rem; }
.pipeline .node p { text-align: center; color: var(--ink-2); font-size: .95rem; margin: 0; }
.pipeline .node .tag { display: block; text-align: center; margin-top: 8px; }

/* tags & badges */
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15em .6em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-family: var(--mono); }
.tag.block { background: var(--dead-soft); color: var(--dead); border-color: #fecdd3; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.tag.note { background: var(--note-soft); color: var(--note); border-color: var(--line-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.tag.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: #c7d2fe; }

/* two-column feature */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature.flip > :first-child { order: 2; }
.feature .art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.feature .art svg { width: 100%; height: auto; display: block; }
.feature ul { padding-left: 20px; color: var(--ink-2); }
.feature li { margin-bottom: 6px; }

/* confidence gauge */
.gauge { position: relative; }
.gauge .needle { transform-origin: 160px 150px; animation: needle 1.6s cubic-bezier(.2, .8, .2, 1) forwards; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: .9rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

/* bar chart */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 170px 1fr 70px; align-items: center; gap: 12px; font-size: .95rem; }
.bar .track { height: 18px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--violet)); width: var(--w); animation: grow 1.4s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.bar .fill.ok { background: linear-gradient(90deg, var(--ok), #34d399); }
.bar b { font-variant-numeric: tabular-nums; text-align: right; }

/* language grid */
.langs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.lang strong { font-size: .98rem; }
.lang small { display: block; color: var(--muted); font-size: .78rem; }

/* tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--ink-2); font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* callouts */
.callout { border-left: 4px solid var(--brand); background: var(--surface); border-radius: 10px; padding: 14px 18px; box-shadow: var(--shadow); margin: 20px 0; }
.callout.ok { border-color: var(--ok); }
.callout.warn { border-color: var(--warn); }
.callout p:last-child { margin: 0; }

/* steps list */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.steps .n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.steps h4 { margin: 2px 0 4px; font-size: 1rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* prose page */
.page { padding: 56px 0 24px; }
.page .lead { margin-bottom: 8px; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose ul { color: var(--ink-2); }

/* CTA */
.cta { background: linear-gradient(135deg, #0f172a, #1e2a5a 60%, #2447f9); color: #fff; border-radius: 24px; padding: 48px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; box-shadow: var(--shadow-lg); }
.cta h2 { color: #fff; }
.cta p { color: #cbd5e1; }
.cta pre { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); box-shadow: none; }
.cta .btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .92rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .house { display: flex; gap: 8px; flex-wrap: wrap; }

/* reveal animations (enhanced when JS is present; always visible without) */
.reveal { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
.reveal.d4 { animation-delay: .32s; }
.js .reveal { animation: none; opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; }
.js .reveal.in { opacity: 1; transform: none; }

/* SVG animation hooks */
.pulse { animation: pulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pulse.slow { animation-duration: 3.4s; }
.draw { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.8s ease-out forwards; }
.draw.d1 { animation-delay: .3s; }
.draw.d2 { animation-delay: .6s; }
.draw.d3 { animation-delay: .9s; }
.flow { stroke-dasharray: 6 8; animation: flow 1.4s linear infinite; }
.blink { animation: blink 2.6s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
@keyframes dash { to { background-position: 14px 0; } }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes needle { from { transform: rotate(-90deg); } to { transform: rotate(75.6deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .hero-grid, .feature, .cta { grid-template-columns: 1fr; }
  .feature.flip > :first-child { order: 0; }
  .stats, .grid.cols-4, .langs { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pipeline .node:nth-child(2)::before { display: none; }
}
@media (max-width: 600px) {
  .stats, .grid.cols-2, .grid.cols-4, .langs, .pipeline { grid-template-columns: 1fr; }
  .pipeline .node::before { display: none; }
  .bar { grid-template-columns: 1fr; gap: 6px; }
  .bar b { text-align: left; }
  section { padding: 48px 0; }
  .cta { padding: 28px; }
  nav.primary a { padding: 6px 8px; font-size: .85rem; }
}
