/* ServerSloth static site — same visual language as the app (design.md §9.1, §9.9), no JavaScript.
   Solid colours only (no gradients). One typeface (Inter, self-hosted) on a fixed type scale. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var-latin.woff2') format('woff2-variations'), url('/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* colour — solid only */
  --ink: #0f172a; --ink-2: #475569; --ink-3: #64748b; --line: #e8ebf0; --line-2: #f1f3f6;
  --bg: #ffffff; --bg-soft: #f7f8fa; --card: #fff;
  --accent: #4f46e5; --accent-soft: #eef2ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);

  /* type — one family, a fixed scale (≈1.25 ratio), three weights */
  --font-sans: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --text-xs: 0.75rem;     /* 12 — labels, eyebrows */
  --text-sm: 0.875rem;    /* 14 — secondary text, nav */
  --text-base: 1rem;      /* 16 — body */
  --text-md: 1.125rem;    /* 18 — lead, card titles */
  --text-lg: 1.25rem;     /* 20 — h3 */
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);         /* 24→32 — h2 */
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 2.75rem);       /* 32→44 — page h1 */
  --text-display: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); /* 40→68 — home hero */
  --lh-tight: 1.06; --lh-snug: 1.25; --lh-body: 1.6;
  --track-tight: -0.035em; --track-snug: -0.02em; --track-label: 0.08em;
  --w-regular: 400; --w-medium: 500; --w-semibold: 600; --w-bold: 700;

  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-size: 100%;
  color: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color-scheme: light;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-space) + 16px); }
body { margin: 0; overflow-x: clip; background: var(--bg); font-size: var(--text-base); font-weight: var(--w-regular); line-height: var(--lh-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-soft); border: 1px solid var(--line-2); padding: 1px 5px; border-radius: 5px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; z-index: 100; }
.muted { color: var(--ink-3); }

/* headings */
h1, h2, h3 { font-weight: var(--w-semibold); color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--text-2xl); line-height: var(--lh-tight); letter-spacing: var(--track-tight); margin: 0 0 16px; }
h2 { font-size: var(--text-xl); line-height: var(--lh-snug); letter-spacing: var(--track-snug); margin: 0 0 20px; }
h3 { font-size: var(--text-md); line-height: var(--lh-snug); letter-spacing: -0.01em; margin: 0 0 6px; }
p { text-wrap: pretty; }
.lead { font-size: var(--text-md); line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin: 0; }
.eyebrow { font-size: var(--text-xs); font-weight: var(--w-semibold); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.note { font-size: var(--text-sm); color: var(--ink-3); }

/* header / footer */
/* floating glass navbar: a sticky pill; content scrolls underneath it (--nav-space = top gap + height) */
:root { --nav-top: 12px; --nav-h: 58px; --nav-space: calc(var(--nav-top) + var(--nav-h)); }
.site-header { position: sticky; top: var(--nav-top); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(1120px, calc(100% - 32px)); height: var(--nav-h); margin: var(--nav-top) auto calc(-1 * var(--nav-space)); padding: 0 10px 0 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 8px 32px -12px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: rgba(255, 255, 255, 0.94); } }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: var(--w-semibold); font-size: var(--text-base); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: var(--w-medium); }
.site-header nav a:hover { color: var(--ink); }
.brand img { display: block; flex: none; }
.brand span { line-height: 1; }

/* footer — solid brand navy, aligned to the content column */
.site-footer { margin-top: 112px; background: var(--ink); color: #cbd5e1; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 56px 0 48px; border-bottom: 1px solid #1e293b; }
.footer-title { margin: 0 0 8px; font-size: var(--text-xl); font-weight: var(--w-semibold); letter-spacing: var(--track-snug); line-height: var(--lh-snug); color: #fff; }
.footer-sub { margin: 0; color: #94a3b8; max-width: 52ch; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #e2e8f0; border-color: #e2e8f0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0; }
.footer-brand .brand { color: #fff; font-size: var(--text-md); }
.footer-brand p { margin: 16px 0 0; color: #94a3b8; font-size: var(--text-sm); max-width: 30ch; }
.footer-grid h2 { font-size: var(--text-xs); font-weight: var(--w-semibold); letter-spacing: var(--track-label); text-transform: uppercase; color: #94a3b8; margin: 4px 0 14px; }
.footer-grid > div:not(.footer-brand) a { display: block; width: fit-content; color: #e2e8f0; text-decoration: none; font-size: var(--text-sm); margin: 0 0 10px; }
.footer-grid > div:not(.footer-brand) a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 40px; flex-wrap: wrap; padding: 22px 0 32px; border-top: 1px solid #1e293b; font-size: var(--text-xs); color: #94a3b8; }
.footer-bottom p { margin: 0; max-width: 72ch; }
.footer-bottom a, .footer-brand p a { color: #e2e8f0; text-decoration: underline; text-decoration-color: #475569; text-underline-offset: 3px; }
.footer-bottom a:hover, .footer-brand p a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer a:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 3px; border-radius: 4px; }

/* buttons — solid fills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: inherit; font-weight: var(--w-medium); font-size: var(--text-base); letter-spacing: -0.005em; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn:hover { background: var(--bg-soft); border-color: #d9dee6; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn-primary:hover { background: #1e293b; border-color: #1e293b; }
.btn-sm { height: 36px; padding: 0 14px; font-size: var(--text-sm); border-radius: 9px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.cta.center { justify-content: center; }

/* layout */
main { max-width: 1120px; margin: 0 auto; padding: var(--nav-space) clamp(16px, 4vw, 48px) 0; }
.section { margin: 72px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head a { font-size: var(--text-sm); font-weight: var(--w-medium); text-decoration: none; }
.page-head { padding: 48px 0 24px; }
.page-head.center { text-align: center; padding-top: 80px; }
.page-head .lead { margin-top: 8px; }

/* cards & grids */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card, .feature { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; color: var(--ink); text-decoration: none; display: block; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: #d5dae3; box-shadow: var(--shadow); }
.card p, .feature p { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }
.card.tpl { padding: 0; overflow: hidden; }
.card.tpl img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.card.tpl h3, .card.tpl p { padding: 0 18px; }
.card.tpl h3 { margin-top: 10px; }
.card.tpl p { padding-bottom: 18px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: var(--w-semibold); letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: #4338ca; margin: 14px 18px 0; }
.prose .tag, .page-head .tag { margin: 0 0 12px; }
.tag.small { background: #f0fdf4; color: #15803d; } .tag.startup { background: #eff6ff; color: #1d4ed8; } .tag.scale-up { background: #fff7ed; color: #c2410c; } .tag.global { background: #faf5ff; color: #7e22ce; }
.tag.sev-1 { background: #fffbeb; color: #b45309; } .tag.sev-2 { background: #fff7ed; color: #c2410c; } .tag.sev-3, .tag.sev-4 { background: #fff1f2; color: #be123c; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.pills a { display: inline-block; padding: 7px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--text-sm); font-weight: var(--w-medium); }
.pills a:hover { border-color: #c7d2fe; }
.list-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.list-cards a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: var(--w-medium); }
.list-cards a:hover { border-color: #d5dae3; }
.list-cards a span { font-size: var(--text-sm); font-weight: var(--w-regular); color: var(--ink-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: var(--w-medium); font-size: var(--text-base); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--ink-3); font-weight: var(--w-regular); font-size: var(--text-lg); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--ink-2); margin: 10px 0 0; max-width: 70ch; }
.final-cta { text-align: center; padding: 64px 24px; border-radius: 20px; background: var(--bg-soft); border: 1px solid var(--line-2); margin: 72px 0 0; }
.final-cta h2 { margin-bottom: 8px; }
.final-cta p { color: var(--ink-2); margin: 0 0 24px; }

/* home — minimal: hero, three steps, templates, questions, one closing CTA */
.home-hero { text-align: center; padding: clamp(56px, 9vw, 104px) 0 48px; }
.home-hero h1 { font-size: var(--text-display); font-weight: var(--w-semibold); letter-spacing: -0.04em; line-height: 1.02; max-width: 14ch; margin: 0 auto 24px; }
.home-hero h1 span { color: var(--ink-3); }
.home-hero .lead { margin: 0 auto; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }
.home-hero .cta { justify-content: center; }
.home-shot { display: block; margin: 0 auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.home-band { margin: 0 calc(50% - 50vw); padding: 0 clamp(16px, 4vw, 48px) 72px; border-bottom: 1px solid var(--line);
  background-color: var(--bg-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%23d5dae3'/%3E%3C/svg%3E"); }
.home-band > * { max-width: 1024px; margin-left: auto; margin-right: auto; }

/* home — floating background (decorative, solid colours, D-34) */
.home-band { position: relative; overflow: hidden; isolation: isolate; margin-top: calc(-1 * var(--nav-space)); padding-top: var(--nav-space); }
.home-band > .backdrop { position: absolute; inset: 0; max-width: none; margin: 0; z-index: -1; pointer-events: none; }
.bd-blobs { position: absolute; inset: -6%; width: 112%; height: 112%; animation: bd-float 30s ease-in-out infinite alternate; }
.bd-a { fill: #6366F1; opacity: .07; }
.bd-b { fill: #10B981; opacity: .07; }
.bd-c { fill: #0EA5E9; opacity: .06; }
.bd-rings { position: absolute; width: min(70vw, 760px); right: -14%; top: -18%; opacity: .16; animation: bd-drift 40s ease-in-out infinite alternate; }
@keyframes bd-float { from { transform: translate3d(-1.5%, -1%, 0) rotate(-2deg); } to { transform: translate3d(1.5%, 1.5%, 0) rotate(2deg); } }
@keyframes bd-drift { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-6%, 8%, 0) rotate(24deg); } }
@media (max-width: 700px) { .bd-rings { width: 120vw; right: -50%; top: -6%; } }
@media (prefers-reduced-motion: reduce) { .bd-blobs, .bd-rings { animation: none; } }

/* home — animated request/response round trip (inline SVG, no JS; D-33) */
.flow { margin: 8px auto 0; padding: clamp(16px, 3vw, 28px) clamp(12px, 3vw, 32px) 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.flow-svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow-v { display: none; max-width: 340px; margin: 0 auto; }
.flow-node { fill: #fff; stroke: var(--line); stroke-width: 1.2; }
.flow-busy { fill: none; stroke: #a5b4fc; stroke-width: 2; }
.flow-name { font-size: 15px; font-weight: var(--w-semibold); fill: var(--ink); letter-spacing: -0.01em; }
.flow-sub { font-size: 12.5px; fill: var(--ink-3); font-feature-settings: 'tnum'; }
.flow-ms { font-size: 12px; font-family: var(--font-mono); fill: var(--ink-3); }
.lane-q, .lane-s { stroke-width: 1.75; stroke-linecap: round; }
.lane-q { stroke: #c7cdf7; } .lane-s { stroke: #b4e9d3; }
.pkt-static { display: none; }
.flow figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: var(--text-sm); color: var(--ink-2); }
.flow-legend { display: inline-flex; align-items: center; gap: 7px; font-weight: var(--w-medium); }
.flow-legend i { width: 8px; height: 8px; border-radius: 50%; }
.flow-legend i.q { background: #6366f1; } .flow-legend i.s { background: #10b981; }
.flow-math { color: var(--ink-3); font-feature-settings: 'tnum'; }
.flow-math b { color: var(--ink); font-weight: var(--w-semibold); }
@media (max-width: 700px) { .flow-h { display: none; } .flow-v { display: block; } }
@media (prefers-reduced-motion: reduce) { .pkt, .flow-busy { display: none; } .pkt-static { display: inline; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { border-top: 1px solid var(--ink); padding-top: 20px; }
.steps .num { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-3); margin-bottom: 14px; }
.steps h3 { font-size: var(--text-lg); margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: var(--text-base); margin: 0; }
.explore { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 0; margin: 28px 0 0; list-style: none; font-size: var(--text-sm); }
.explore a { color: var(--ink-2); text-decoration: none; font-weight: var(--w-medium); }
.explore a:hover { color: var(--ink); }

/* article */
.prose { max-width: 720px; margin: 0 auto; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.7; color: #1e293b; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .shot { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); margin: 8px 0 12px; }
.formula { font-family: var(--font-mono); font-size: 15px; background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prose th { text-align: left; font-size: 11.5px; font-weight: var(--w-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose td code { white-space: normal; }
.comps { list-style: none; padding: 0; }
.comps li { display: flex; align-items: center; gap: 8px; }
.comps img, .nologo { width: 20px; height: 20px; flex: none; }
.callout { margin: 36px 0; padding: 20px 22px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; }
.callout p { margin: 0 0 14px; }
.toc { background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 18px; margin: 24px 0; }
.toc h2 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--ink-3); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { text-decoration: none; }
.crumbs { padding-top: 20px; font-size: var(--text-sm); color: var(--ink-3); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }

@media (max-width: 900px) {
  .grid3, .list-cards, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .steps { gap: 28px; }
  .site-header nav a:not(.btn) { display: none; }
  .site-header { width: calc(100% - 24px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, a.card { transition: none; } }

/* nav buttons keep their own colours (the nav link rule is more specific than .btn-primary) */
.site-header nav a.btn-primary, .site-header nav a.btn-primary:hover { color: #fff; }
