/* IP9 Cardputer apps - the palette of the device UI (IP9Kit ip9::theme). */
:root {
  color-scheme: dark;
  --bg: #0a0a0e;
  --surface: #1c1c24;
  --surface-high: #30303c;
  --text: #ececf0;
  --muted: #8c8c9b;
  --accent: #e2244a;
  --ok: #3cc86e;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

a { color: inherit; }

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

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--surface-high);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}

.brand-mark {
  background: var(--accent);
  border-radius: 6px;
  padding: 1px 7px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

nav { display: flex; gap: 18px; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 64px 0 24px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  max-width: 18em;
}

.lead {
  max-width: 44em;
  color: var(--muted);
  font-size: 18px;
}

h2 {
  margin: 56px 0 20px;
  font-size: 26px;
}

h3 { margin: 0; font-size: 20px; }

/* App cards */
.apps { display: grid; gap: 20px; }

.app {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 4px solid var(--app);
}

.app-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 52 / 44;
  border-radius: 18px;
  background: var(--app);
}

.app-tile svg { width: 58%; height: auto; }

.app-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.version {
  font: 13px var(--mono);
  color: var(--muted);
  background: var(--surface-high);
  border-radius: 999px;
  padding: 1px 9px;
}

.tagline { margin: 6px 0 10px; font-size: 17px; }

.features {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--muted);
}

.features li { margin: 2px 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--surface-high);
  border-radius: 10px;
  background: var(--surface-high);
  color: var(--text);
  font: 600 15px var(--font);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.15); }

.btn.primary { background: var(--app, var(--accent)); border-color: transparent; }

.btn.ghost { background: transparent; }

.link { color: var(--muted); font-size: 15px; }

.link:hover { color: var(--text); }

.unsupported { color: var(--muted); font-size: 14px; }

.install-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

details { margin-top: 12px; color: var(--muted); font-size: 14px; }

summary { cursor: pointer; }

.files {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}

.files td {
  padding: 4px 8px 4px 0;
  vertical-align: top;
}

.files code { word-break: break-all; }

/* Install steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step {
  padding: 22px;
  background: var(--surface);
  border-radius: var(--radius);
}

.step h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }

.step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 15px;
}

.hint, .note { color: var(--muted); font-size: 14px; }

.note { margin-top: 16px; }

kbd {
  font: 600 13px var(--mono);
  background: var(--surface-high);
  border-radius: 4px;
  padding: 1px 6px;
}

code { font-family: var(--mono); font-size: 14px; }

pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--surface-high);
  border-radius: 10px;
}

/* Developers */
.dev {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
}

.dev p { color: var(--muted); }

/* Footer */
.foot {
  margin-top: 72px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--surface-high);
  color: var(--muted);
  font-size: 14px;
}

.foot p { margin: 4px 0; }

@media (max-width: 820px) {
  .steps, .dev { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .app-tile { width: 120px; }
  nav { gap: 12px; }
  .brand-name { display: none; }
  .hero { padding-top: 40px; }
}
