/* sadr.cygnusstrategy.com
   Layout: the swan's waterline. Above the water, calm stone: what you see, one pull request.
   Below, ink: the dark factory at work. Cygnus language: stone, paper, ink, hairline rules,
   square corners. Hand-built from the approved design (not generated by scripts/apps.py). */

:root {
  --stone: #e9e7e2;
  --paper: #f6f5f2;
  --ink: #15191f;
  --slate: #5a6472;
  --rule: rgba(21, 25, 31, 0.14);
  --verdigris: #1f6f5c;
  --verdigris-deep: #175446;
  --verdigris-night: #4fa58a;
  --night-text: #d9d6cf;
  --night-muted: #9aa3ae;
  --night-rule: rgba(233, 231, 226, 0.14);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
}
a { color: var(--verdigris-deep); }
a:hover { color: var(--ink); }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 3px; }
.night a:focus-visible, .night [tabindex]:focus-visible { outline-color: var(--verdigris-night); }
h1, h2, h3 { text-wrap: balance; }
[id] { scroll-margin-top: 16px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 2px;
  font-family: var(--display); font-weight: 600; font-size: 15px; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--paper); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.pad { padding-block: clamp(72px, 9vw, 120px); }
.band { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.night { background: var(--ink); color: var(--night-text); }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; }
.two { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.runs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.plain { list-style: none; margin: 0; padding: 0; }

.code {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  white-space: pre; overflow-x: auto; margin: 0;
}
.code.wrap-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.label {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); margin: 0 0 16px;
}
.night .label { color: var(--night-muted); }
.h2 {
  font-family: var(--display); font-variation-settings: "wdth" 112; font-weight: 700;
  font-size: clamp(32px, 3.6vw, 48px); line-height: 1.04; letter-spacing: -0.025em; margin: 0;
}
.lede { font-size: 19px; max-width: 34em; color: var(--slate); margin: 0; }
.muted { color: var(--slate); }
.note { color: var(--slate); font-size: 16px; }
.inline-code { font-family: var(--mono); font-size: 15px; }

.btn {
  font-family: var(--display); font-weight: 600; font-size: 15px; text-decoration: none;
  border-radius: 2px; min-height: 48px; display: inline-flex; align-items: center;
}
.btn-solid { color: var(--paper); background: var(--ink); padding: 14px 22px; }
.btn-solid:hover { color: var(--paper); background: #000; }
.btn-line { color: var(--ink); padding: 13px 21px; border: 1px solid var(--ink); }
.btn-line:hover { color: var(--ink); background: var(--paper); }
.btn-paper { color: var(--ink); background: var(--paper); padding: 14px 22px; }
.btn-paper:hover { color: var(--ink); background: var(--stone); }
.btn-night { color: var(--paper); padding: 13px 21px; border: 1px solid rgba(233, 231, 226, 0.5); }
.btn-night:hover { color: var(--paper); border-color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 800; letter-spacing: 0.16em; font-size: 18px; }
.nav-links { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; font-family: var(--display); font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--slate); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links .gh {
  color: var(--paper); background: var(--ink); padding: 10px 16px; border-radius: 2px;
  font-weight: 600; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links .gh:hover { color: var(--paper); background: #000; }

/* Hero, on the waterline */
.hero-top { padding-top: clamp(40px, 6vw, 88px); }
.hero-copy { padding-bottom: clamp(48px, 6vw, 80px); }
h1 {
  font-family: var(--display); font-variation-settings: "wdth" 112; font-weight: 700;
  font-size: clamp(50px, 7vw, 100px); line-height: 0.94; letter-spacing: -0.035em; margin: 0 0 26px;
}
.standfirst { font-size: clamp(18px, 1.6vw, 21px); color: var(--slate); max-width: 30em; margin: 0 0 16px; }
.say { font-size: 16px; color: var(--slate); font-style: italic; max-width: 31em; margin: 0 0 34px; }
.swan { align-self: end; min-width: 0; }
.swan svg { display: block; width: 100%; height: auto; margin-bottom: -1px; }

/* The ink band: "In the dark" */
.water { position: relative; overflow: hidden; }
.water canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ripple { position: absolute; left: 0; top: 0; width: calc(100% + 28px); height: 12px; }
.water .inner { position: relative; }
.water .hero { padding-block: 40px 64px; }
.log-window { height: 220px; overflow: hidden; border-top: 1px solid var(--night-rule); border-bottom: 1px solid var(--night-rule); }
.log li {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px;
  padding-block: 9px; border-bottom: 1px solid rgba(233, 231, 226, 0.07);
  font-family: var(--mono); font-size: 13px;
}
.log span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .what { color: var(--night-text); }
.log .why { color: var(--night-muted); }

/* Idea to production */
.story { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 20px; }
.story li { border-top: 2px solid var(--ink); padding-block: 16px 24px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.story .when { font-family: var(--mono); font-size: 12px; color: var(--slate); margin: 0; }
.story .title { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; line-height: 1.25; margin: 0; }
.story .shows { background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 14px; margin-top: auto; }
.story .code { font-size: 12.5px; line-height: 1.55; }

/* How it works */
.flow li { border-top: 2px solid var(--ink); padding-block: 18px 8px; min-width: 0; }
.flow .n { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--verdigris-deep); margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.flow .title { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; margin: 0 0 6px; }
.flow .line { margin: 0; color: var(--slate); font-size: 16px; line-height: 1.6; }

/* Principles */
.principles { margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.principles div { padding-block: 18px; border-bottom: 1px solid var(--rule); }
.principles div:last-child { border-bottom: 0; }
.principles dt { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; margin: 0 0 4px; }
.principles dd { margin: 0; color: var(--slate); font-size: 16px; line-height: 1.6; }

/* What it does */
.does { border-top: 1px solid var(--ink); }
.does li { padding-block: 18px; border-bottom: 1px solid var(--rule); min-width: 0; }
.does .title { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 0 0 4px; }
.does .line { margin: 0; color: var(--slate); font-size: 16px; line-height: 1.6; }

/* Review: the sample pull request */
.review .h2 { color: var(--paper); margin-bottom: 22px; }
.review p.body { color: var(--night-text); margin: 0 0 18px; max-width: 30em; }
.review p.body:last-child { margin-bottom: 0; }
.pr { background: var(--paper); color: var(--ink); border-radius: 2px; min-width: 0; }
.pr-head { padding: 16px 22px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-badge { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--paper); background: var(--verdigris); padding: 4px 9px; border-radius: 2px; }
.pr-title { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0; }
.pr-body { padding: 4px 22px 18px; margin: 0; }
.pr-body div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 16px; padding-block: 12px; border-bottom: 1px solid var(--rule); }
.pr-body dt { font-size: 10.5px; padding-top: 3px; margin: 0; }
.pr-body dd { margin: 0; }
.pr-body .code { font-size: 13px; }

/* Code panels on ink */
.panel { background: var(--ink); color: var(--night-text); border-radius: 2px; min-width: 0; }
.panel-agents { padding: 22px 24px; }
.panel-agents .label { font-size: 11px; margin: 0 0 14px; }
.panel-run { padding: 18px 20px; }

/* Run your own */
.runs > div { border-top: 2px solid var(--ink); padding-top: 20px; min-width: 0; }
.runs h3 { font-family: var(--display); font-weight: 600; font-size: 21px; margin: 0 0 8px; }
.runs p { color: var(--slate); margin: 0 0 18px; font-size: 16px; }

/* Under the hood */
.hood { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.hood li { padding-block: 16px; border-bottom: 1px solid var(--rule); }
.hood li:last-child { border-bottom: 0; }
.hood .title { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.hood .line { margin: 0; color: var(--slate); font-size: 16px; }

/* Closing */
.closing { position: relative; overflow: hidden; }
.closing .sky { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--stone); }
.closing .inner { position: relative; padding-block: clamp(80px, 10vw, 128px); }
.closing .row { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.closing .copy { max-width: 40em; }
.closing h2 {
  font-family: var(--display); font-variation-settings: "wdth" 112; font-weight: 700;
  font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.03em; margin: 0 0 20px; color: var(--paper);
}
.closing p { margin: 0; }

/* Footer */
footer { color: var(--night-muted); border-top: 1px solid var(--night-rule); }
footer .wrap { padding-block: 36px; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 14px; }
footer p { margin: 0; }
footer p a { color: var(--paper); }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
footer nav a { color: var(--night-text); }
footer a:hover { color: var(--paper); }

/* Motion */
@keyframes log { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes ripple { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-14px); } }
.log { animation: log 26s linear infinite; }
.ripple { animation: ripple 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .log, .ripple { animation: none; }
}

@media (max-width: 980px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .hero, .two, .runs, .grid { grid-template-columns: minmax(0, 1fr); }
  .hide-narrow { display: none; }
  .swan { max-width: 340px; justify-self: end; width: 100%; }
}
@media (max-width: 560px) { .flow { grid-template-columns: minmax(0, 1fr); } }
.pr .label { color: var(--slate); }
