/* Unraid Themer landing page. No framework, no web fonts: system stacks only. */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #16181b;
  --ink-soft: #565c66;
  --line: #e1e2e4;
  --accent: #3b6a8f;
  --accent-ink: #ffffff;
  --code-bg: #eef0f2;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111316;
    --surface: #181b1f;
    --ink: #e8eaed;
    --ink-soft: #9ba2ac;
    --line: #2a2e34;
    --accent: #88c0d0;
    --accent-ink: #0f1519;
    --code-bg: #1e2227;
  }
}
:root[data-theme="dark"] {
  --bg: #111316;
  --surface: #181b1f;
  --ink: #e8eaed;
  --ink-soft: #9ba2ac;
  --line: #2a2e34;
  --accent: #88c0d0;
  --accent-ink: #0f1519;
  --code-bg: #1e2227;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.88em; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

/* --------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; white-space: nowrap; }
.top__nav { display: flex; gap: 22px; }
.top__nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; }
.top__nav a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .top__nav a:not(:last-child) { display: none; }
}

/* ---------------------------------------------------------------- shared */
.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.btn {
  display: inline-flex; align-items: center;
  padding: 11px 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color 150ms ease;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note { font-size: 0.875rem; color: var(--ink-soft); margin-top: 16px; }

/* ------------------------------------------------------------------ hero */
.hero { padding-top: clamp(48px, 9vw, 104px); padding-bottom: 40px; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; max-width: 14ch; }
.lede { font-size: clamp(1.06rem, 1.8vw, 1.25rem); color: var(--ink-soft); max-width: 40em; margin-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.meta { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); margin-top: 18px; }

/* ------------------------------------------------------------ screenshots */
.shot { margin: 0; }
.shot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #2e3440;
}
.shot figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.shot--hero { margin-inline: auto; padding-bottom: 24px; }
.shot--native { max-width: 925px; margin-top: 40px; }
.shot--hero img { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -16px rgba(0, 0, 0, 0.28); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; align-items: start; }
@media (max-width: 860px) { .pair { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- sections */
.section { padding-top: clamp(64px, 9vw, 112px); }
.head { max-width: 46em; margin-bottom: 32px; }
.head h2, .section h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; margin-bottom: 16px; }
.head p { color: var(--ink-soft); }
.head strong { color: var(--ink); }

.colophon { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; border-top: 1px solid var(--line); padding-top: 32px; }
.colophon p:not(.label) { color: var(--ink-soft); }
@media (max-width: 860px) { .colophon { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- themes */
.filter { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.filter[hidden] { display: none; }
.filter button {
  font: inherit; font-size: 0.875rem;
  padding: 7px 16px;
  background: transparent; color: var(--ink-soft);
  border: 0; border-right: 1px solid var(--line);
  cursor: pointer;
}
.filter button:last-child { border-right: 0; }
.filter button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; }

.themes {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 16px;
}
@media (max-width: 480px) { .themes { grid-template-columns: 1fr 1fr; gap: 12px; } }
.theme { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 14px; }
.theme[hidden] { display: none; }
/* The preview paints with the theme's own registry colors (--t-*), set inline per card. */
.theme__preview {
  background: var(--t-bg);
  border-radius: 5px;
  padding: 12px;
  height: 92px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.18);
}
.theme__bar { display: flex; align-items: center; gap: 8px; background: var(--t-sf); border-radius: 4px; padding: 7px 8px; }
.theme__bar b { color: var(--t-tx); font-size: 0.9rem; line-height: 1; }
.theme__line { flex: 1; height: 4px; border-radius: 2px; background: var(--t-tx); opacity: 0.35; }
.theme__btn { width: 26px; height: 12px; border-radius: 3px; background: var(--t-ac); }
.theme__dots { display: flex; gap: 6px; }
.theme__dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--t-ac); }
.theme__dots span + span { background: var(--t-a2); }
.theme__strip { display: flex; height: 10px; margin-top: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.18); }
.theme__strip i { flex: 1; }
.theme__name { font-weight: 650; margin: 12px 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 0.95rem; }
.theme__tag { font-family: var(--mono); font-size: 0.68rem; font-weight: 400; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.theme__desc { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.45; }

/* ----------------------------------------------------------------- icons */
.matrix { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.matrix__row {
  display: grid;
  grid-template-columns: minmax(0, 150px) repeat(8, minmax(0, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.matrix__row:last-child { border-bottom: 0; }
.matrix__name { font-size: 0.875rem; font-weight: 600; }
.matrix__row > span[role="cell"] { display: flex; justify-content: center; color: var(--ink); }
@media (max-width: 560px) {
  .matrix__row { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 8px; padding: 10px 12px; }
  .matrix__name { grid-column: 1 / -1; }
  .matrix svg { width: 20px; height: 20px; }
}

/* ----------------------------------------------------------------- facts */
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 650; margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts > div { padding-right: 0; } }

/* --------------------------------------------------------------- install */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: step; min-width: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
  margin-bottom: 10px;
}
.steps h3, .channel h3 { font-size: 1.1rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.steps p, .channel p { color: var(--ink-soft); font-size: 0.94rem; }
.steps strong { color: var(--ink); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

pre {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.82rem;
  line-height: 1.5;
}
.copyable { position: relative; padding-right: 64px; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 600 0.72rem/1 var(--font);
  padding: 6px 9px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.copy:hover { color: var(--ink); }

.channel { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.channel p { max-width: 52em; }

.callout { margin-top: 24px; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.85rem; color: var(--ink-soft); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot__inner p { max-width: 44em; margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--ink); }

/* Settings crops keep a readable size on phones and scroll sideways inside their frame. */
.scroller { overflow-x: auto; border-radius: var(--radius); }
@media (max-width: 600px) {
  .scroller img { width: 640px; max-width: none; }
}
