/* keedown.dequeue.work: Keedown's GitHub light/dark palettes, Plex Sans Condensed + Fira Code. */

@font-face { font-family: "Plex"; src: url("../fonts/IBMPlexSans_Condensed-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/IBMPlexSans_Condensed-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/IBMPlexSans_Condensed-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fira"; src: url("../fonts/FiraCodeNerdFont-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #ffffff;
  --card: #f6f8fa;
  --fg: #1f2328;
  --muted: #59636e;
  --border: #d1d9e0;
  --accent: #0969da;
  --accent-hover: #0550ae;
  --on-accent: #ffffff;
  --soft: #ddf4ff;
  --success: #1a7f37;
  --shadow: 0 1px 2px rgba(31, 35, 40, .06), 0 8px 24px rgba(31, 35, 40, .06);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --card: #151b23; --fg: #e6edf3; --muted: #9198a1; --border: #30363d;
    --accent: #58a6ff; --accent-hover: #79b8ff; --on-accent: #0d1117; --soft: rgba(56, 139, 253, .15);
    --success: #3fb950; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --card: #151b23; --fg: #e6edf3; --muted: #9198a1; --border: #30363d;
  --accent: #58a6ff; --accent-hover: #79b8ff; --on-accent: #0d1117; --soft: rgba(56, 139, 253, .15);
  --success: #3fb950; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* Images that exist once per theme */
.on-dark { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
:root[data-theme="dark"] .on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-dark { display: block; }
  :root:not([data-theme="light"]) .on-light { display: none; }
}
.brand .on-light, .brand .on-dark { border-radius: 6px; }
:root[data-theme="dark"] .brand .on-dark, .brand .on-light { display: inline-block; }
:root[data-theme="dark"] .brand .on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .on-dark { display: inline-block; }
  :root:not([data-theme="light"]) .brand .on-light { display: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0; }
kbd, code, pre { font-family: "Fira", ui-monospace, SFMono-Regular, Menlo, monospace; }
kbd { font-size: .85em; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--card); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; font-size: 18px; }
.brand:hover { color: var(--fg); }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--fg); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (max-width: 720px) { .nav { display: none; } }

.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--fg); background: var(--card); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
:root[data-theme="dark"] .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-moon { display: block; }
  :root:not([data-theme="light"]) .i-sun { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--fg);
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--card); color: var(--fg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 15px; border-radius: 8px; }

/* Hero */
.hero { padding-top: 88px; text-align: center; }
.eyebrow { color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.eyebrow .sep { opacity: .5; margin: 0 6px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); margin-top: 14px; letter-spacing: -.025em; }
.lead { max-width: 640px; margin: 20px auto 0; color: var(--muted); font-size: 19px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; gap: 8px 24px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--success); vertical-align: middle; }
.shot {
  margin: 56px auto 0; max-width: 960px;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.shot img { display: block; width: 100%; }
.shot .on-dark { display: none; }
:root[data-theme="dark"] .shot .on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot .on-dark { display: block; } }

/* Sections */
.section { padding-top: 120px; }
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(30px, 4vw, 40px); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 18px; }
@media (max-width: 640px) { .section { padding-top: 88px; } .hero { padding-top: 56px; } }

/* Feature cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.card img { display: block; width: 100%; aspect-ratio: 16 / 10; }
.card .on-dark { display: none; }
:root[data-theme="dark"] .card .on-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card .on-dark { display: block; } }
.card-body { padding: 4px 24px 24px; }
.card h3 { font-size: 20px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* Video */
.video { margin-top: 40px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.plan-lead { margin-top: 8px; color: var(--muted); font-size: 16px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 15.5px; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 6px;
  border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg);
}
.pill { font-size: 12px; font-weight: 500; color: var(--accent); background: var(--soft); padding: 2px 10px; border-radius: 999px; }

/* Download */
.download { margin-top: 32px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.tabs button {
  height: 34px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.panel { margin-top: 20px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.file {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 10px; color: var(--fg);
  transition: border-color .15s, background .15s;
}
.file:hover { border-color: var(--accent); background: var(--card); color: var(--fg); }
.file b { font-weight: 600; }
.file span { color: var(--muted); font-size: 14px; }
.key {
  margin-top: 32px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; gap: 16px 32px; align-items: center; flex-wrap: wrap; background: var(--card);
}
.key[hidden] { display: none; }
.key h3 { font-size: 17px; }
.key p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.key-row { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.key input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--muted); font: 13px "Fira", ui-monospace, monospace;
}

/* Footer */
.foot { margin-top: 120px; border-top: 1px solid var(--border); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 40px; font-size: 15px; }
