/* ringzero site. Palette: assets/branding/README.md */
:root {
  --red: #C6140A;
  --red-light: #E8473C;
  --red-deep: #5C231C;
  --gold: #C9A45C;
  --gray: #6B6B6B;
  --muted: #A8A6A2; /* off-white dimmed for body copy: gray #6B6B6B fails contrast on black */
  --graphite: #1E1F22;
  --black: #050505;
  --text: #ECEAE6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-light); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .9em; color: var(--gold); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: 0; }
h2::before { content: ""; display: block; width: 40px; height: 4px; background: var(--red); margin-bottom: .6em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
main > section { padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 860px) { main > section { padding-top: 64px; padding-bottom: 64px; } }
main > section[id] { scroll-margin-top: 56px; }
main > section + section { border-top: 1px solid var(--graphite); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--black); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* nav */
.top { position: sticky; top: 0; z-index: 5; background: rgba(5, 5, 5, .92); border-bottom: 1px solid var(--graphite); }
.nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; text-decoration: none; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; font-size: .95rem; }
.nav ul a { color: var(--text); text-decoration: none; }
.nav ul a:hover { color: var(--red-light); }

/* hero */
.hero { position: relative; overflow: hidden; padding: 0; min-height: min(78vh, 720px); display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,.35) 0%, rgba(5,5,5,.55) 55%, var(--black) 100%); }
.hero-inner { position: relative; z-index: 1; text-align: center; padding-top: 72px; padding-bottom: 72px; }
.logo { width: 128px; margin: 0 auto 16px; filter: drop-shadow(0 0 24px rgba(198, 20, 10, .45)); }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); letter-spacing: -.02em; margin-bottom: .2em; }
.tagline { font-size: clamp(1.15rem, 3.2vw, 1.6rem); font-weight: 600; }
.lede { max-width: 640px; margin: 0 auto 1.6em; color: var(--text); text-shadow: 0 1px 8px var(--black); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-block; padding: 12px 22px; border: 1px solid var(--gray); border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; background: rgba(30, 31, 34, .8); transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--red-light); color: var(--text); }
.btn.primary { background: var(--red); border-color: var(--red); }
.btn.primary:hover { background: var(--red-light); border-color: var(--red-light); }

/* image + text */
.split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
figure { margin: 0; }
.split figure img, .card img { border-radius: 8px; border: 1px solid var(--graphite); }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  #built.split { grid-template-columns: 1fr 1.1fr; }
}

/* features */
.cards { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--graphite); border-radius: 10px; padding: 16px 16px 4px; }
.card img { margin-bottom: 14px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card p, .facts p { color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 8px 32px; }
@media (min-width: 700px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .facts { grid-template-columns: 1fr 1fr 1fr; } }
.facts li { border-left: 3px solid var(--red-deep); padding-left: 14px; }
.facts h3 { color: var(--text); }

/* terminal */
.term { margin: 0 0 1.4em; }
.term pre { margin: 0; background: #0d0d0e; border: 1px solid var(--graphite); border-top: 3px solid var(--red-deep); border-radius: 8px; padding: 16px 18px; overflow-x: auto; white-space: pre-wrap; font: 14px/1.6 var(--mono); }
.term.cmds pre { white-space: pre; }
.term code { color: var(--text); font-size: inherit; }
.term .p { color: var(--red-light); font-weight: 700; }
.term .t { color: var(--gold); }
.term .r { color: var(--red-light); }
.term .d { color: #8f8d8a; }
.term figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* table */
.table { overflow-x: auto; margin-bottom: 1em; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--graphite); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .9rem; }
td.n, th.n { text-align: right; }
@media (min-width: 601px) { td.n { white-space: nowrap; } }
tbody tr:first-child { background: rgba(198, 20, 10, .08); }
.note { color: var(--muted); }
@media (max-width: 600px) {
  thead { position: absolute; left: -9999px; }
  table, tbody, tr, td { display: block; }
  tr { border-bottom: 1px solid var(--graphite); padding: 8px 0; }
  td { border-bottom: 0; padding: 4px 12px 4px 10em; text-align: left !important; position: relative; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); position: absolute; left: 12px; width: 9em; color: var(--muted); font-size: .9rem; }
}

.links, .plain { padding-left: 1.2em; }
.links li, .plain li { margin-bottom: .6em; }
.plain li::marker, .links li::marker { color: var(--red); }

.callout { border: 1px solid var(--red-deep); background: rgba(92, 35, 28, .25); border-radius: 8px; padding: 18px 20px 4px; margin-top: 28px; }

.foot { border-top: 1px solid var(--graphite); padding: 32px 0; font-size: .95rem; }
.foot img { display: inline-block; vertical-align: middle; margin-right: 6px; }
.dim { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
