/* ORION Media Center - the project site's look: ORION's galaxy glass. */

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --space: #02040b;
  --page: #04050d;
  --nebula: #16285e;
  --nebula-far: #0a4a66;
  --glass: rgba(13, 16, 36, 0.62);
  --glass-high: rgba(255, 255, 255, 0.06);
  --rim: rgba(255, 255, 255, 0.14);
  --text: #f3f1ff;
  --muted: rgba(226, 223, 255, 0.72);
  --faint: rgba(226, 223, 255, 0.5);
  --primary: #a9b8ff;
  --accent: #8fe3ff;
  --gold: #ffc94a;
  --radius: 22px;
  --width: 1120px;
  --mono: "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 70% 50% at 78% 8%, rgba(22, 40, 94, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 45% at 8% 38%, rgba(10, 74, 102, 0.45), transparent 70%),
    radial-gradient(ellipse 80% 60% at 60% 92%, rgba(58, 31, 106, 0.35), transparent 70%),
    linear-gradient(180deg, #000000, var(--space) 40%, var(--page));
  background-attachment: fixed;
  font: 400 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* A faint star field over the sky. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 33% 66%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 88% 48%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 52% 32%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 18% 86%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 64% 82%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 94% 90%, rgba(255, 255, 255, 0.45), transparent);
  background-size: 640px 640px;
  opacity: 0.7;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(143, 227, 255, 0.4);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: "Montserrat", "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}
h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}
code {
  background: var(--glass-high);
  border: 1px solid var(--rim);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}
pre {
  margin: 0 0 1.2em;
  padding: 18px 20px;
  overflow-x: auto;
  background: rgba(2, 4, 11, 0.72);
  border: 1px solid var(--rim);
  border-radius: 14px;
  line-height: 1.55;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.86rem;
}
.c {
  color: var(--faint);
}
.k {
  color: var(--primary);
}
.s {
  color: var(--accent);
}
.v {
  color: var(--gold);
}

.wrap {
  width: min(var(--width), 100% - 32px);
  margin-inline: auto;
}

/* ---- the header ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: rgba(4, 5, 13, 0.62);
  border-bottom: 1px solid var(--rim);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 500 0.9rem "Montserrat", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.top nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}
.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--text);
  background: var(--glass-high);
}

/* On a phone the links are one row under the name, and the header scrolls away. */
@media (max-width: 640px) {
  .top {
    position: static;
  }
  .top .wrap {
    flex-wrap: wrap;
    gap: 2px 12px;
    padding: 10px 0 6px;
  }
  .top nav {
    margin-left: -12px;
    width: calc(100% + 12px);
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .top nav a {
    white-space: nowrap;
  }
  .hero {
    padding-top: 40px;
  }
}

/* ---- the hero ---- */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font: 500 0.8rem "Montserrat", sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 30px;
}
.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--rim);
  color: var(--text);
  background: var(--glass-high);
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #0b0b33;
}
.button:hover {
  filter: brightness(1.08);
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--rim);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(169, 184, 255, 0.08);
}
figure {
  margin: 0;
}
figcaption {
  color: var(--faint);
  font-size: 0.92rem;
  margin-top: 10px;
  text-align: center;
}

/* ---- sections ---- */

section {
  padding: 64px 0;
}
.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}
.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.card {
  background: var(--glass);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card h3 {
  margin-bottom: 0.4em;
}
.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}
.card p,
.card li {
  color: var(--muted);
}
.card ul {
  padding-left: 1.1em;
  margin: 0 0 1em;
}
.tag {
  display: inline-block;
  font: 600 0.72rem "Inter", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 5fr 7fr;
  }
  .split.flip {
    grid-template-columns: 7fr 5fr;
  }
  .split.flip > :first-child {
    order: 2;
  }
}

.views {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* ---- tables ---- */

.table {
  overflow-x: auto;
  border: 1px solid var(--rim);
  border-radius: 16px;
  background: var(--glass);
  margin-bottom: 1.2em;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
}
th {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}
tr:last-child td {
  border-bottom: 0;
}
td code {
  white-space: nowrap;
}
.swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 4px;
  border: 1px solid var(--rim);
  vertical-align: -0.1em;
  margin-right: 6px;
}

/* ---- steps ---- */

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 68px;
  background: var(--glass);
  border: 1px solid var(--rim);
  border-radius: 16px;
  color: var(--muted);
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #0b0b33;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
ol.steps strong {
  color: var(--text);
}

.note {
  border-left: 3px solid var(--accent);
  background: rgba(143, 227, 255, 0.06);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  margin: 0 0 1.2em;
}

/* The themes page's table of contents. */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.toc a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--rim);
  background: var(--glass-high);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.toc a:hover {
  color: var(--text);
}

footer {
  border-top: 1px solid var(--rim);
  padding: 32px 0 48px;
  color: var(--faint);
  font-size: 0.92rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
