/* Sphenisca Regia site. Tokens follow the brand sheet: AMOLED black, one gold accent, Space Mono /
   JetBrains Mono / Geist. Body text tops out at white 90%. */

@font-face { font-family: "Space Mono"; src: url("/fonts/space-mono-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #000000;
  --raised: #09090b;
  --graphite: #131316;
  --line: rgba(255, 255, 255, 0.1);
  --edge: rgba(255, 255, 255, 0.4);
  --shade: rgba(255, 255, 255, 0.25);
  --muted: rgba(255, 255, 255, 0.5);
  --strong: rgba(255, 255, 255, 0.8);
  --text: rgba(255, 255, 255, 0.9);
  --gold: #b49256;
  --gold-hover: #c8a66a;
  --display: "Space Mono", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--text); margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--mono); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 480px) { .wrap { padding-left: 16px; padding-right: 16px; } }
.band { border-top: 1px solid var(--line); }
.band-raised { background: var(--raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 36px; }
.section-tight { padding-top: 72px; padding-bottom: 72px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.measure { max-width: 46em; }

/* Wordmark: the gold underline marks what you're looking at. */
.wordmark { display: inline-flex; flex-direction: column; gap: 7px; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--text); text-decoration: none; }
.wordmark::after { content: ""; height: 3px; border-radius: 2px; background: var(--gold); }
.wordmark-product { display: inline-flex; align-items: flex-start; font-family: var(--display); line-height: 1; color: var(--text); text-decoration: none; }
.wordmark-product .suffix { display: inline-flex; flex-direction: column; gap: 7px; }
.wordmark-product .suffix::after { content: ""; height: 3px; border-radius: 2px; background: var(--gold); }
.wordmark-regia { font-family: var(--mono); font-size: 12px; letter-spacing: 4px; color: var(--muted); }

/* Header and nav */
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.nav-brand { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; }
.nav-brand .wordmark-product { font-size: 24px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; font-family: var(--mono); font-size: 15px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: inline-block; color: var(--strong); text-decoration: none; padding: 12px 0; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--gold); }

/* Type helpers */
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.eyebrow-gold { color: var(--gold); }
.lede { font-size: 19px; color: var(--strong); max-width: 36em; }
.h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.1; letter-spacing: -1px; }
.h1-xl { font-size: clamp(40px, 6.5vw, 84px); line-height: 1.05; letter-spacing: -2px; max-width: 13em; }
.h2 { font-size: 36px; line-height: 1.2; }
.h3 { font-size: 26px; line-height: 1.2; }
.body { color: var(--strong); }
.small { font-size: 16px; line-height: 1.55; color: var(--strong); }
.mono { font-family: var(--mono); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-family: var(--mono); font-size: 16px; padding: 13px 21px; border-radius: 8px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-hover); color: var(--ink); }
.btn-outline { color: var(--text); border-color: var(--edge); }
.btn-outline:hover { color: var(--text); border-color: var(--strong); }
.badge { display: inline-flex; align-items: center; min-height: 48px; font-family: var(--mono); font-size: 15px; color: var(--text); border: 1px solid var(--edge); border-radius: 8px; padding: 12px 18px; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 28px; }
.hero-split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 88px; padding-bottom: 72px; }
.hero-split > .stack { flex: 999 1 480px; min-width: 0; gap: 28px; }
.phones { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
.phone { flex: 0 0 auto; width: clamp(96px, 26vw, 170px); height: auto; aspect-ratio: 1 / 2; border-radius: 22px; border: 1px solid var(--shade); object-fit: cover; }
.phone-low { margin-top: 48px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--shade); color: inherit; }
.card-link { font-family: var(--mono); font-size: 15px; color: var(--gold); margin-top: auto; }
.card-feature { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding: 40px; }
.card-feature > .stack { min-width: 0; gap: 14px; }
.card-feature .phones { flex: none; }
.card-feature .phones .phone { width: clamp(110px, 13vw, 160px); border-radius: 20px; }
@media (max-width: 760px) { .card-feature { grid-template-columns: 1fr; padding: 28px; gap: 32px; } .card-feature .phones .phone { width: clamp(110px, 36vw, 160px); } }
.card-feature .wordmark-product { font-size: 40px; }
.card-feature .wordmark-product .suffix::after { height: 4px; }
.app { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.app-name { font-family: var(--mono); font-size: 16px; color: var(--text); }
.app-what { font-size: 15px; line-height: 1.5; color: var(--strong); }
.group { display: flex; flex-direction: column; gap: 18px; }
.group h2 { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.panel-apps { font-family: var(--mono); font-size: 15px; line-height: 1.7; color: var(--text); }
.panel-what { font-size: 15px; line-height: 1.55; color: var(--strong); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 32px; padding-bottom: 32px; font-family: var(--mono); margin-top: 0; margin-bottom: 0; }
.stats div { margin: 0; }
.stats dt { font-size: 32px; color: var(--text); }
.stats dt.gold { color: var(--gold); }
.stats dd { margin: 0; font-size: 14px; color: var(--muted); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.principles h3 { font-family: var(--mono); font-size: 16px; color: var(--gold); margin-bottom: 10px; }

/* Table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-family: var(--mono); font-size: 15px; }
th { text-align: left; font-weight: 400; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
td.os { color: var(--strong); }
td.want { color: var(--gold); }

/* Contribute */
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > .stack { flex: 999 1 460px; min-width: 0; gap: 24px; }
.split > .side { flex: 1 1 400px; min-width: 0; align-self: center; }
.asks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.asks li { display: flex; flex-direction: column; gap: 4px; }
.asks strong { font-family: var(--mono); font-weight: 400; font-size: 16px; color: var(--text); }
.asks span { font-size: 16px; line-height: 1.55; color: var(--strong); }
pre { margin: 0; background: var(--graphite); border: 1px solid var(--line); border-radius: 14px; padding: 24px; overflow-x: auto; font-size: 14px; line-height: 1.8; color: var(--text); }
pre .c { color: var(--muted); }

/* Watch */
.watch { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.watch > .stack { flex: 999 1 460px; min-width: 0; }
.watch > .btn { flex: 1 1 260px; justify-content: center; padding: 18px 24px; }

/* Prose pages */
.prose { max-width: 42em; display: flex; flex-direction: column; gap: 20px; color: var(--strong); }
.prose h2 { font-size: 26px; margin-top: 20px; }
.prose ul { margin: 0; padding-left: 1.2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.footer ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.footer a { color: var(--strong); display: inline-block; padding: 4px 0; }
.h1-narrow { max-width: 15em; }

/* Production network section */
.split-net { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.split-net > .stack { flex: 999 1 460px; min-width: 0; gap: 18px; }
.net { flex: 1 1 280px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.net svg { width: 100%; max-width: 320px; height: auto; }
.net-links line { stroke: var(--shade); stroke-width: 1.5; }
.net-nodes circle { fill: var(--ink); stroke: var(--gold); stroke-width: 3; }
.net-backups rect { fill: var(--muted); }
.net figcaption { text-align: center; color: var(--muted); max-width: 30em; }
.panel h3.panel-apps { margin: 0; font-weight: 400; }
.section-tight.stack { gap: 20px; }
