/* Noctra OS site. Conventions follow the Ubuntu flavour sites: header nav, wallpaper hero,
   release facts bar, feature rows, download page with requirements, get-involved page, legal footer.
   Tokens come from configs/theme/palette.json; near-black neutrals with a slight warm tint, orange is the only accent.
   Human feel: soft corners, sentence case, one friendly typeface, photos left mostly in colour, gentle motion. */
:root {
  --bg: #0b0a09;
  --panel: #100f0d;
  --raised: #1a1816;
  --select: #23201d;
  --line: #2a2723;
  --fg: #f0ece6;
  --muted: #a39d95;
  --amber: #ff6a13;
  --amber-hot: #ff8a3d;
  --display: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.7 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.9em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 5rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--muted); max-width: 50ch; line-height: 1.55; }
.eyebrow { font: 600 0.9375rem/1 var(--body); color: var(--amber-hot); display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.eyebrow .dot { width: 9px; height: 9px; background: var(--amber); border-radius: 50%; flex: none; }
.muted { color: var(--muted); }
.soon { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 4px 10px; border: 1px solid #6b2c0a; border-radius: 999px; color: var(--amber-hot); font: 600 0.75rem/1 var(--body); white-space: nowrap; }

/* ---------- header ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font: 500 0.9375rem/1 var(--body); }
.nav ul a { display: block; text-decoration: none; color: var(--muted); padding: 10px 16px; border-radius: 999px; transition: background 0.2s, color 0.2s; }
.nav ul a:hover { color: var(--fg); background: var(--raised); }
.nav ul a[aria-current="page"] { color: var(--fg); background: var(--select); }
@media (max-width: 640px) {
  .nav .wrap { padding-block: 10px 0; }
  .nav nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav ul { gap: 0; }
  .nav ul a { padding: 12px 12px; white-space: nowrap; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; font: 600 1rem/1 var(--display); text-decoration: none; cursor: pointer; border: 0; border-radius: 999px; transition: background 0.2s, transform 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--amber); color: #140700; }
.btn.primary:hover { background: var(--amber-hot); }
.btn.ghost { background: rgba(42, 39, 35, 0.85); color: var(--fg); box-shadow: inset 0 0 0 1px #3a3631; }
.btn.ghost:hover { background: #34302b; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- hero (home) ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero > img, .banner > img { filter: saturate(0.55) sepia(0.12) brightness(0.85); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 10, 9, 0.92) 0%, rgba(11, 10, 9, 0.62) 45%, rgba(11, 10, 9, 0.1) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 25%); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 28px; padding-block: clamp(72px, 12vw, 152px) clamp(64px, 9vw, 120px); }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede { color: #cfc9c1; }
@media (max-width: 640px) { .hero::after { background: linear-gradient(0deg, rgba(11, 10, 9, 0.55), rgba(11, 10, 9, 0.9)); } }

/* ---------- page banner (inner pages) ---------- */
.banner { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 75%; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 10, 9, 0.94) 0%, rgba(11, 10, 9, 0.66) 55%, rgba(11, 10, 9, 0.2) 100%); }
.banner .wrap { position: relative; z-index: 1; display: grid; gap: 18px; padding-block: clamp(48px, 7vw, 88px); }
.banner h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }

/* ---------- facts bar ---------- */
.facts { border-bottom: 1px solid var(--line); background: var(--panel); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts .wrap > div { padding: 22px 24px 22px 0; font: 400 0.9375rem/1.4 var(--body); color: var(--muted); }
.facts .wrap > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts b { display: block; color: var(--fg); font: 600 1.125rem/1.3 var(--display); margin-top: 4px; }
@media (max-width: 760px) {
  .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts .wrap > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts .wrap > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */
section { padding-block: clamp(64px, 9vw, 112px); }
section + section { border-top: 1px solid var(--line); }
.head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { max-width: 22ch; }

.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
.hl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; align-content: start; transition: transform 0.25s, border-color 0.25s; }
.hl:hover { transform: translateY(-3px); border-color: #4a3526; }
.hl img { width: 40px; height: 40px; margin-bottom: 8px; padding: 8px; background: var(--raised); border-radius: 12px; box-sizing: content-box; }
.hl p { color: var(--muted); }
@media (max-width: 760px) { .highlights { grid-template-columns: minmax(0, 1fr); } }

.band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.band .stack { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 900px) { .band { grid-template-columns: minmax(0, 1fr); } }

.term-line { display: flex; align-items: stretch; background: #070605; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.term-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 16px 18px; font-size: 0.875rem; color: #eaeaea; scrollbar-width: thin; }
.term-line code::before { content: "$ "; color: var(--amber); }
.term-line button { flex: none; background: var(--raised); color: var(--fg); border: 0; border-left: 1px solid var(--line); padding: 0 20px; font: 600 0.875rem/1 var(--body); cursor: pointer; }
.term-line button:hover { background: var(--select); color: var(--amber-hot); }
.alt { color: var(--muted); font-size: 0.9375rem; }
.alt a, .prose a { color: var(--fg); text-decoration-color: var(--amber); text-underline-offset: 4px; }

/* ---------- feature rows ---------- */
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.row .intro { display: grid; gap: 12px; align-content: start; }
.row .intro p { color: var(--muted); }
.row ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.row li::before { content: ""; width: 7px; height: 7px; margin-top: 0.7em; border-radius: 50%; background: var(--amber); }
.row li span { color: var(--muted); }
.row li strong { color: var(--fg); font-weight: 600; }
@media (max-width: 800px) { .row { grid-template-columns: minmax(0, 1fr); } }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.tile { display: grid; justify-items: center; gap: 10px; padding: 20px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font: 500 0.875rem/1.2 var(--body); text-align: center; transition: transform 0.2s, border-color 0.2s; }
.tile:hover { transform: translateY(-2px); border-color: #4a3526; }
.tile img { width: 32px; height: 32px; }
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- download ---------- */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 600 0.875rem/1 var(--body); color: var(--muted); background: var(--panel); }
td code { color: var(--amber-hot); }
.status { font: 600 0.8125rem/1 var(--body); padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.status.ok { color: var(--amber-hot); border-color: #6b2c0a; }

.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.method { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); background: var(--panel); display: grid; gap: 16px; align-content: start; min-width: 0; }
.method .tag { font: 600 0.9375rem/1 var(--body); color: var(--amber-hot); }
.method p { color: var(--muted); }
@media (max-width: 800px) { .methods { grid-template-columns: minmax(0, 1fr); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); font: 600 0.9375rem/1 var(--display); color: var(--amber-hot); }
.steps strong { display: block; font: 600 1.15rem/1.3 var(--display); }
.steps span { color: var(--muted); }

.reqs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reqs div { padding: 22px; border-right: 1px solid var(--line); font: 400 0.9375rem/1.5 var(--body); color: var(--muted); }
.reqs div:last-child { border-right: 0; }
.reqs b { display: block; color: var(--fg); font: 600 1.125rem/1.3 var(--display); }
@media (max-width: 800px) {
  .reqs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reqs div:nth-child(2) { border-right: 0; }
  .reqs div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- get involved ---------- */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.way { padding: clamp(24px, 3vw, 36px); display: grid; gap: 10px; align-content: start; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.15s; }
.way:nth-child(2n) { border-right: 0; }
.way:nth-last-child(-n+2) { border-bottom: 0; }
.way:hover { background: var(--raised); }
.way:focus-visible, .term-line button:focus-visible { outline-offset: -3px; }
.way p { color: var(--muted); }
.way .go { font: 600 0.9375rem/1 var(--body); color: var(--amber-hot); margin-top: 6px; }
@media (max-width: 800px) {
  .ways { grid-template-columns: minmax(0, 1fr); }
  .way, .way:nth-child(2n) { border-right: 0; }
  .way:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}
.prose { display: grid; gap: 16px; max-width: 64ch; color: var(--muted); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); background: var(--panel); padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.875rem; }
footer .cols { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 32px; }
footer h3 { font: 600 0.9375rem/1 var(--body); color: var(--fg); margin-bottom: 16px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--amber-hot); }
footer .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 0.8125rem; max-width: 90ch; }
footer .about { display: grid; gap: 14px; max-width: 36ch; }
@media (max-width: 800px) { footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } footer .about { grid-column: 1 / -1; max-width: none; } }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .wrap > *, .banner .wrap > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero .wrap > :nth-child(2), .banner .wrap > :nth-child(2) { animation-delay: 0.08s; }
.hero .wrap > :nth-child(3), .banner .wrap > :nth-child(3) { animation-delay: 0.16s; }
.hero .wrap > :nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .hero .wrap > *, .banner .wrap > *, .btn:hover, .hl:hover, .tile:hover { animation: none; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
