/* Osprey Peek site: the landing page and the docs share these tokens and this frame.
   Light by default; dark follows the reader's system. */

@font-face { font-family: "Federant"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/federant-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("fonts/figtree-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("fonts/figtree-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: italic; font-weight: 300 900; font-display: swap; src: url("fonts/figtree-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;
  --paper: #eef4ef;        /* ground */
  --paper-2: #e3ede6;      /* quiet bands, sidebars */
  --sheet: #f7faf7;        /* raised reading surface */
  --ink: #13302f;          /* text */
  --ink-2: #3b5550;        /* secondary text, 7.6:1 on paper */
  --ink-3: #50685f;        /* meta, 5.6:1 on paper */
  --teal: #1f6f6a;         /* links, live */
  --jade: #7fb8a4;
  --jade-pale: #cfe3da;
  --cobalt: #2f5f8f;
  --gold: #a87c26;         /* rules and ornament line */
  --gold-glass: #c9a046;   /* gold as glass */
  --lead: #13302f;         /* the black of the leading */
  --btn: #13302f;
  --btn-ink: #eef4ef;
  --btn-hover: #1f6f6a;
  --code-bg: #e3ede6;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Federant", Georgia, serif;
  --text: "Figtree", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1a1a; --paper-2: #112222; --sheet: #132626;
    --ink: #e3eee8; --ink-2: #b4c8c0; --ink-3: #91a8a0;
    --teal: #7fcdbf; --jade: #5fa38f; --jade-pale: #1e3a37; --cobalt: #4f82b8;
    --gold: #d0a54e; --gold-glass: #d9ae52; --lead: #050b0b;
    --btn: #d9ae52; --btn-ink: #0d1a1a; --btn-hover: #e9c472; --code-bg: #112222;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1a1a; --paper-2: #112222; --sheet: #132626;
  --ink: #e3eee8; --ink-2: #b4c8c0; --ink-3: #91a8a0;
  --teal: #7fcdbf; --jade: #5fa38f; --jade-pale: #1e3a37; --cobalt: #4f82b8;
  --gold: #d0a54e; --gold-glass: #d9ae52; --lead: #050b0b;
  --btn: #d9ae52; --btn-ink: #0d1a1a; --btn-hover: #e9c472; --code-bg: #112222;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--text); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { body { -webkit-font-smoothing: antialiased; } }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--teal); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--jade-pale); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--code-bg); padding: .08em .35em; border-radius: 3px; }
kbd { border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; background: var(--sheet); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 8px 14px; z-index: 10; }
.skip:focus { top: 12px; }

/* --- shared pieces ------------------------------------------------------------------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 400 23px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.wordmark img { width: 30px; height: 30px; border-radius: 7px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--btn); color: var(--btn-ink); font: 600 16px/1 var(--text); padding: 15px 22px; border-radius: 3px; text-decoration: none; border: 0; transition: background-color .15s ease-out; }
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.rule { border: 0; height: 7px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); margin: 0; }
.opener { width: 132px; height: 22px; color: var(--gold); margin-bottom: 14px; }
.wave-band { display: block; width: 100%; height: 46px; color: var(--gold); opacity: .75; }

/* --- landing: the panel -------------------------------------------------------------- */
.page { position: relative; max-width: 1440px; margin: 0 auto; }
.panel { position: relative; padding: 0 168px; }
.topband { display: none; }
.border { position: absolute; top: 18px; bottom: 18px; width: 118px; color: var(--teal); border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: 4px; background: var(--sheet); overflow: hidden; }
.border.l { left: 22px; } .border.r { right: 22px; }
.border svg { width: 100%; height: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.topbar nav { display: flex; gap: 30px; font-weight: 500; font-size: 15px; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--teal); text-decoration: underline; }

.hero { display: grid; grid-template-columns: 1fr 560px 1fr; grid-template-rows: auto auto; column-gap: 34px; align-items: start; padding-bottom: 18px; }
.hero-copy { grid-column: 1; grid-row: 1 / 3; padding-top: 70px; }
.hero h1 { font: 400 50px/1.04 var(--display); margin: 0; letter-spacing: 0; }
.hero h1 span { display: block; }
.hero h1 .opener { margin: 14px 0 12px; }
.hero .lede { color: var(--ink-2); margin: 20px 0 0; font-size: 16.5px; }
.hero-act { grid-column: 3; grid-row: 1 / 3; padding-top: 74px; position: relative; z-index: 2; }
.hero-act .btn { width: 100%; }
.archnote { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); }
.beats { margin: 30px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-2); }
.beats li { padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.beats li:last-child { color: var(--ink); font-weight: 600; }
.beats b { font-weight: 600; color: var(--ink); }

.stage { grid-column: 2; grid-row: 1 / 3; position: relative; height: 750px; }
.arch { position: absolute; left: 0; right: 0; top: 10px; }
.arch img { width: 100%; }
/* The light: one band passes across the glass, clipped to the window's own shape. */
.arch .light { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  -webkit-mask: url("brand/hero-window.webp") center / 100% 100% no-repeat; mask: url("brand/hero-window.webp") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 248, 220, .85) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 120% 0; opacity: 0; }
.window { position: absolute; left: 0; right: 0; top: 360px; border: 1px solid var(--lead); outline: 2px solid var(--gold); outline-offset: 6px; background: var(--lead); box-shadow: 0 28px 50px -24px rgba(19,48,47,.55); }
.window video, .window img { width: 100%; height: auto; aspect-ratio: 1280 / 860; }
.foot { grid-column: 1 / 4; display: flex; justify-content: space-between; gap: 24px; font-size: 13.5px; color: var(--ink-3); border-top: 3px double var(--gold); padding-top: 10px; margin: 6px 0 0; }

/* --- landing: sections --------------------------------------------------------------- */
.section { padding: 110px 0 0; }
.section h2 { font: 400 40px/1.08 var(--display); margin: 0; max-width: 20ch; text-wrap: balance; }
.section .intro { color: var(--ink-2); max-width: 60ch; margin: 16px 0 0; }
.plate { margin: 40px 0 0; position: relative; }
.plate .frame { border: 1px solid var(--lead); outline: 1px solid var(--gold); outline-offset: 6px; }
.plate img { width: 100%; height: auto; }
.plate figcaption { margin-top: 18px; font-size: 13.5px; color: var(--ink-3); font-style: italic; }
.ribbon { position: absolute; display: inline-flex; align-items: center; gap: 8px; font: 400 16px/1 var(--display); color: var(--ink); background: var(--sheet); padding: 8px 26px; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%); filter: drop-shadow(0 1px 0 var(--gold)); }
.ribbon b { font: 600 12px var(--text); color: var(--teal); }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 44px; margin: 44px 0 0; padding: 0; list-style: none; }
.notes li { border-top: 1px solid var(--gold); padding-top: 14px; color: var(--ink-2); font-size: 15.5px; }
.notes li strong { display: block; color: var(--ink); font-weight: 600; font-size: 16.5px; margin-bottom: 4px; }
.split2 { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.split2.rev { grid-template-columns: 7fr 5fr; }
.split2.rev .plate { order: -1; }
.keys { margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-2); }
.keys li { padding: 7px 0 7px 84px; text-indent: -84px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.keys li > kbd:first-child { display: inline-block; min-width: 70px; margin-right: 14px; text-align: center; text-indent: 0; }

.interlude { margin: 110px 0 0; padding: 0; background: var(--paper-2); border-block: 3px double var(--gold); text-align: center; }
.interlude .wave-band { margin: 0 0 28px; }
.interlude .wave-band.flip { margin: 30px 0 0; transform: scaleY(-1); }
.interlude p { font: 400 30px/1.25 var(--display); margin: 0 auto; max-width: 30ch; }
.interlude small { display: block; margin: 14px auto 0; max-width: 62ch; font: 400 15.5px/1.6 var(--text); color: var(--ink-2); }

.cred pre { margin: 24px 0 0; background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 18px 20px; border-radius: 3px; overflow-x: auto; font-size: 13px; line-height: 1.55; }

.close { margin: 0; display: grid; grid-template-columns: 460px 1fr; gap: 56px; align-items: center; padding: 40px 0 56px; }
.close .art { width: 100%; }
.close h2 { font: 400 46px/1.05 var(--display); margin: 0; }
.close p { color: var(--ink-2); max-width: 52ch; }
.close .row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.site-foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 0 40px; border-top: 1px solid var(--gold); font-size: 13.5px; color: var(--ink-3); }
.site-foot a { color: var(--ink-2); }

/* --- the one authored moment: light passes once across the glass ---------------------- */
@media (prefers-reduced-motion: no-preference) {
  .arch .light { animation: sweep 3.4s cubic-bezier(.22, 1, .36, 1) .5s both; }
  @keyframes sweep { 0% { opacity: 0; background-position: 120% 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; background-position: -20% 0; } }
}

/* --- narrow ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .panel { padding: 0 76px; }
  .border { width: 42px; top: 12px; bottom: 12px; }
  .border.l { left: 14px; } .border.r { right: 14px; }
  .border svg { width: 118px; height: 300%; max-width: none; transform: scale(.356); transform-origin: 0 0; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-copy { grid-column: 1; grid-row: 1; padding-top: 24px; }
  .hero-act { grid-column: 1; grid-row: 2; padding-top: 22px; }
  .stage { grid-column: 2; grid-row: 1 / 3; height: auto; padding-top: 30px; }
  .hero h1 { font-size: 44px; }
  .beats { margin-top: 18px; }
  .arch { position: relative; left: auto; right: auto; top: auto; max-width: 680px; margin: 0 auto; }
  .window { position: relative; top: auto; margin: -6% auto 0; max-width: 620px; }
  .foot { grid-column: 1 / 3; grid-row: 3; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .panel { padding: 0 16px; }
  .border { display: none; }
  .topband { display: block; width: 100%; height: 46px; opacity: .75; }
  .topbar nav { gap: 16px; font-size: 14px; }
  .topbar nav .wide { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy, .hero-act, .stage, .foot { grid-column: 1; grid-row: auto; }
  .hero h1 { font-size: 38px; }
  .hero-act { padding-top: 22px; order: 1; }
  .stage { order: 2; }
  .foot { order: 3; }
  .beats { margin-top: 18px; }
  .window { margin-top: -2%; }
  .window video { aspect-ratio: 700 / 520; }
  .foot { flex-direction: column; gap: 4px; }
  .section { padding-top: 76px; }
  .section h2 { font-size: 32px; }
  .notes, .split2, .split2.rev, .close { grid-template-columns: 1fr; gap: 28px; }
  .split2.rev .plate { order: 0; }
  .ribbon { display: none; }
  .interlude p { font-size: 24px; padding: 0 16px; }
  .close h2 { font-size: 36px; }
}

/* --- docs ------------------------------------------------------------------------------ */
.docs-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 28px; background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--gold-glass); }
.docs-top .wordmark { color: var(--paper); }
.docs-top .section-name { font: 400 18px var(--display); color: var(--jade); }
.docs-top nav { margin-left: auto; display: flex; gap: 24px; font-size: 14.5px; font-weight: 500; }
.docs-top nav a { color: var(--paper); text-decoration: none; }
.docs-top nav a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .docs-top { background: #071111; color: var(--ink); } :root:not([data-theme="light"]) .docs-top .wordmark, :root:not([data-theme="light"]) .docs-top nav a { color: var(--ink); } }
.docs { display: grid; grid-template-columns: 296px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; }
.docs-nav { position: sticky; top: 67px; align-self: start; height: calc(100vh - 67px); display: grid; grid-template-columns: 40px 1fr; border-right: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.docs-nav .vine { width: 40px; height: 100%; border-right: 1px solid var(--gold); background: var(--sheet); overflow: hidden; }
.docs-nav .vine svg { width: 118px; height: 300%; max-width: none; transform: scale(.34); transform-origin: 0 0; }
.docs-nav ol { list-style: none; margin: 0; padding: 26px 22px; overflow-y: auto; }
.docs-nav h4 { font: 400 17px var(--display); color: var(--teal); margin: 20px 0 6px; }
.docs-nav li:first-child h4 { margin-top: 0; }
.docs-nav a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: 15px; }
.docs-nav a:hover { color: var(--teal); }
.docs-nav a[aria-current="page"] { color: var(--teal); font-weight: 600; }
.docs-nav .sub { padding: 0 0 6px; margin: 0; }
.docs-nav .sub li { margin: 0; }
.docs-nav .sub a { padding: 3px 0 3px 14px; font-size: 14px; color: var(--ink-2); }
.doc { padding: 48px 64px 90px; min-width: 0; }
.doc > * { max-width: 70ch; }
.doc h1 { font: 400 46px/1.08 var(--display); margin: 0 0 18px; }
.doc .lead { font-size: 19px; color: var(--ink-2); margin: 0 0 8px; }
.doc h2 { font: 400 29px/1.15 var(--display); margin: 48px 0 10px; scroll-margin-top: 90px; }
.doc h3 { font: 600 18px var(--text); margin: 28px 0 6px; }
.doc p, .doc li { line-height: 1.68; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc pre { background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 16px 18px; border-radius: 3px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.doc pre code { background: none; padding: 0; }
.doc table { border-collapse: collapse; width: 100%; max-width: 100%; margin: 18px 0; font-size: 15px; }
.doc th { text-align: left; font: 600 13px var(--text); letter-spacing: .02em; color: var(--ink-2); border-bottom: 2px solid var(--gold); padding: 8px 14px 8px 0; }
.doc td { border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); padding: 9px 14px 9px 0; vertical-align: top; }
.doc .note { border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); background: var(--sheet); padding: 14px 18px; border-radius: 3px; }
.doc .note strong:first-child { color: var(--teal); }
.doc figure { margin: 26px 0; max-width: 100%; }
.doc figure .frame { border: 1px solid var(--lead); outline: 1px solid var(--gold); outline-offset: 5px; }
.doc figcaption { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); font-style: italic; }
.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--gold); }
.pager a { text-decoration: none; display: block; }
.pager small { display: block; font-size: 13px; color: var(--ink-3); }
.pager span { font: 400 21px var(--display); }
.toc { position: sticky; top: 67px; align-self: start; padding: 50px 20px 0 0; font-size: 13.5px; }
.toc b { display: block; font-weight: 600; margin-bottom: 8px; }
.toc a { display: block; padding: 3px 0; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--teal); }
@media (max-width: 1180px) { .docs { grid-template-columns: 260px minmax(0, 1fr); } .toc { display: none; } .doc { padding: 40px 40px 80px; } }
@media (max-width: 780px) {
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; height: auto; grid-template-columns: 1fr; border-right: 0; border-bottom: 1px solid var(--gold); }
  .docs-nav .vine { display: none; }
  .docs-nav ol { padding: 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .docs-nav h4, .docs-nav .sub { display: none; }
  .docs-top { padding: 0 16px; } .docs-top .section-name, .docs-top nav .wide { display: none; }
  .doc { padding: 28px 16px 64px; } .doc h1 { font-size: 36px; }
}
