/* ==========================================================================
   weirdly named music apps — theme
   Wireframe-level styling that keeps the current look: dark, orange brand,
   round icons, per-app accent colour.

   --brand  : site colour (set in _config.yml → brand_color)
   --accent : per app (front matter `accent:`), falls back to --brand
   ========================================================================== */

/* Nunito, as on the original site */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg: #202020;
  --bg-raised: #2a2a2a;
  --bg-bar: #141414;
  --line: #3a3a3a;
  --text: #e6e6e6;
  --muted: #a0a0a0;
  --inprogress: #5a5a5a;      /* "coming soon" label — make lighter/darker here */
  --nav-link: #9d9d9d;        /* top-bar links (Bootstrap navbar-inverse, as original) */
  --nav-link-hover: #fff;
  --radius: 10px;
  --wrap: 1080px;
  --font: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* No elastic "rubber-band" bounce at the top/bottom of the page, so the
     sticky top bar stays put instead of being dragged down. (Chrome, Firefox,
     Safari 16+.) Delete this line to get the bounce back. */
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar { background: var(--bg-bar); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: block; position: relative; color: var(--brand); font-size: 22px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-layer { display: flex; align-items: center; gap: 10px; }
/* tint changes: a copy tinted with the new colour fades in over the old one (see nav.html) */
.brand-layer.is-next { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.brand-layer.is-next.show { opacity: 1; }
.brand-icon { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.topnav { display: flex; font-size: 16px; line-height: 20px; }
.topnav a { color: var(--nav-link); padding: 15px; }
.topnav a:hover, .topnav a:focus { color: var(--nav-link-hover); text-decoration: none; }
.topnav a:last-child { padding-right: 0; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 6px;
  border: 1.5px solid var(--accent); color: var(--accent);
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.btn-solid { background: var(--accent); color: #111; }
/* Dark accents (e.g. #0b693b) would make links and buttons unreadable on the dark page, and
   light accents make white text unreadable: where the browser supports relative colours,
   lift dark accents for text and pick black/white text for solid buttons automatically. */
@supports (color: oklch(from red l c h)) {
  a, .btn { --accent-text: oklch(from var(--accent) max(l, 0.72) c h); }
  .btn:not(.btn-solid) { color: var(--accent-text); border-color: var(--accent-text); }
  .prose a:not(.btn) { color: var(--accent-text); }
  .btn-solid { color: oklch(from var(--accent) clamp(0, (0.62 - l) * 1000, 1) 0 0); }
}
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 85%, white); }

/* ---------- highlights carousel ----------
   Centered, not full-width: the 16:9 preview is as large as fits (max 1080px). Each app is a slide
   (picture + caption row); tabs under it show progress and auto-advance (7s, see carousel.js).
   Live apps get a play button on the picture that opens the player in an overlay. */
.hl { --hl-max: clamp(560px, calc((100dvh - 56px - 330px) * 16 / 9), 1080px);   /* short windows: smaller picture, so the app grid peeks in below */
  max-width: var(--hl-max); margin: 32px auto 0; padding: 0 16px; }
.hl-stage { position: relative; container-type: inline-size; }
.hl-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
  gap: 24px;                      /* so a neighbouring slide never shows as a sliver at the edge */
}
.hl-track::-webkit-scrollbar { display: none; }
.hl-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.hl-shot { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #111318; }
.hl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.hl-badge {
  position: absolute; left: 14px; top: 14px; padding: 4px 10px; border-radius: 5px;
  background: var(--accent); color: #111; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hl-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px;
  background: rgba(0,0,0,.28); color: #fff; font-size: 20px; font-weight: 700; transition: background .15s;
}
.hl-play:hover, .hl-play:focus-visible { background: rgba(0,0,0,.5); text-decoration: none; }
.hl-play-icon { display: grid; place-items: center; width: 72px; height: 72px; padding-left: 5px; border-radius: 50%; background: var(--accent); color: #111; font-size: 26px; }
.hl-cap { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.hl-icon { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.hl-text { flex: 1 1 260px; min-width: 0; }
.hl-text h2 { margin: 0; font-size: 30px; line-height: 1.1; color: #fff; }
.hl-text p { margin: 2px 0 0; color: var(--muted); font-size: 17px; }
.hl-cap .btns { margin: 0; }

/* arrows + pause sit on the picture (half of its height = 28.125cqw of the stage width) */
.hl-arrow, .hl-pause {
  position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(0,0,0,.5); display: grid; place-items: center;
}
.hl-arrow { top: 28.125cqw; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; }
.hl-arrow.prev { left: 12px; } .hl-arrow.next { right: 12px; }
.hl-pause { top: calc(56.25cqw - 54px); right: 12px; width: 40px; height: 40px; border-radius: 8px; }
.hl-arrow:hover, .hl-pause:hover { background: rgba(0,0,0,.75); }
.hl-pause svg { fill: #fff; }
.hl-pause .i-play { display: none; }
.hl-pause[aria-pressed="true"] .i-pause { display: none; }
.hl-pause[aria-pressed="true"] .i-play { display: block; }
.hl.is-single .hl-arrow, .hl.is-single .hl-pause, .hl.is-single .hl-tabs { display: none; }

/* progress tabs */
.hl-tabs { list-style: none; margin: 20px 0 0; padding: 0 0 4px; display: flex; gap: 10px; position: relative; overflow-x: auto; scrollbar-width: none; }
.hl-tabs::-webkit-scrollbar { display: none; }
/* many apps: each tab keeps a readable width and the strip scrolls (the active tab is centred by carousel.js) */
.hl-tabs li { flex: 1 0 140px; min-width: 0; }
.hl-tab { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: #9a9a9a; }
.hl-tab[aria-current="true"] { color: #fff; }
.hl-bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hl-bar i { display: block; height: 100%; width: 0; background: var(--brand); }
.hl-tab[aria-current="true"] .hl-bar i { animation: hl-fill var(--hl-time, 7s) linear forwards; }
@keyframes hl-fill { from { width: 0; } to { width: 100%; } }
.hl[data-hold] .hl-bar i { animation-play-state: paused; }
.hl[data-stopped] .hl-tab[aria-current="true"] .hl-bar i { animation: none; width: 100%; }
.hl-tab-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.hl-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); flex: none; }
.hl-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-tab-live { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.hl-tab:hover .hl-tab-name { color: #fff; }
.hl-more { display: block; width: max-content; margin: 18px auto 0; padding: 8px 18px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.hl-more:hover { color: #fff; border-color: var(--muted); text-decoration: none; }

/* live player overlay: a centred window on large landscape screens, the whole screen on phones / portrait */
.live-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.72); }
.live-modal[hidden] { display: none; }
.live-modal-win {
  --bar: 36px;                                   /* the player's top bar, see live.html */
  --w: min(1200px, calc(100vw - 48px), calc((100dvh - 48px - var(--bar)) * 16 / 9));
  width: var(--w); height: calc(var(--w) * 9 / 16 + var(--bar));
  border-radius: 12px; overflow: hidden; background: #111318; border: 1px solid var(--line);
}
.live-modal-win iframe { display: block; width: 100%; height: 100%; border: 0; }
html.modal-open { overflow: hidden; }
@media (max-width: 700px), (max-aspect-ratio: 1 / 1) {
  .live-modal-win { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
}

/* ---------- home grid ---------- */
.intro { margin-top: 40px; text-align: center; }
.category { margin: 64px 0; }
.category-title { text-align: center; font-size: 32px; margin: 0 0 40px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 24px; }
.card { text-align: center; }
.card .card-link { color: var(--text); display: block; }
.card a:hover { text-decoration: none; }
.card-icon { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto; transition: transform .15s; }
.card a:hover .card-icon { transform: scale(1.05); box-shadow: 0 0 0 3px var(--accent); }
.card h3 { margin: 14px 0 2px; font-size: 26px; font-weight: 600; }
.card a:hover h3 { color: var(--accent); }
.card p { margin: 0; color: var(--muted); }

/* in-progress app: icon + tagline, no name, no link */
.card.is-inprogress .card-link { cursor: default; }
.card.is-inprogress h3 { color: var(--inprogress); font-style: italic; font-weight: 400; letter-spacing: .02em; }

/* ---------- app page ---------- */
.app { max-width: 820px; padding-top: 48px; padding-bottom: 48px; }
.app-head { display: flex; align-items: center; gap: 20px; }
.app-icon { width: 80px; height: 80px; border-radius: 18px; object-fit: cover; flex: none; }
.app-head h1 { margin: 0; font-size: 36px; line-height: 1.1; color: #fff; }
.app-tagline { margin: 2px 0 0; color: var(--muted); font-size: 18px; }
.app-shot { margin: 32px 0 24px; }
.app-shot img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* live web demo (`web_preview:`): screenshot + play link, swapped for an iframe on click */
.app-shot.is-embeddable { position: relative; container-type: inline-size; }
.embed-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px;
  border-radius: var(--radius); background: rgba(0,0,0,.35); color: #fff;
  font-size: 20px; font-weight: 700; transition: background .15s;
}
.embed-play:hover, .embed-play:focus-visible { background: rgba(0,0,0,.55); text-decoration: none; }
.embed-play-icon {
  display: grid; place-items: center; width: 64px; height: 64px; padding-left: 5px;
  border-radius: 50%; background: var(--accent); color: #111; font-size: 24px;
}
/* The player (live.html) is a 36px bar (status, new tab, ✕) with a 16:9 canvas below it.
   Change --embed-bar if you change the bar's height in live.html. */
.app-shot iframe {
  --embed-bar: 36px;
  display: block; width: 100%; height: calc(56.25cqw + var(--embed-bar));
  border: 1px solid var(--line); border-radius: var(--radius); background: #111318;
}
.app-meta { margin: 0; display: grid; gap: 8px; padding: 16px 20px; background: var(--bg-raised); border-radius: var(--radius); }
.app-meta div { display: flex; gap: 12px; flex-wrap: wrap; }
.app-meta dt { color: var(--muted); min-width: 90px; }
.app-meta dd { margin: 0; }
.to-top { margin: 36px 0 0; text-align: center; }
.to-top a { display: inline-block; padding: 8px 18px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.to-top a:hover { color: #fff; border-color: var(--muted); text-decoration: none; }
.app-foot { margin-top: 40px; color: var(--muted); font-size: 14px; }

/* ---------- long text (markdown output) ---------- */
.prose { color: #cfcfcf; }
.prose h2 { color: var(--text); font-size: 22px; margin: 36px 0 8px; text-transform: lowercase; }
.prose h3 { color: var(--text); font-size: 18px; margin: 24px 0 6px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { background: var(--bg-raised); padding: 1px 6px; border-radius: 4px; font-size: .92em; color: var(--text); }
.prose img { border-radius: var(--radius); margin: 16px 0; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.page { max-width: 720px; padding-top: 48px; padding-bottom: 48px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-bar); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }
.footer p { margin: 0; }
.footer a { color: var(--text); }

/* ---------- wireframe placeholder (missing images) ---------- */
img.is-placeholder { background: #2c2c2c; object-fit: fill; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .hl { margin-top: 16px; }
  .hl-arrow { display: none; }
  .hl-text h2 { font-size: 24px; }
  .hl-text p { font-size: 15px; }
  .hl-icon { width: 52px; height: 52px; }
  .hl-cap .btns { width: 100%; }
  .hl-cap .btns .btn { flex: 1; text-align: center; padding-left: 8px; padding-right: 8px; }
  .hl-play-icon { width: 56px; height: 56px; font-size: 22px; }
  .hl-play span:last-child { display: none; }
  .hl-tabs { gap: 8px; }
  .hl-tabs li { flex: 0 0 22px; }
  .hl-tabs li:has(.hl-tab[aria-current="true"]) { flex-basis: 56px; }
  .hl-tab-label { display: none; }
  .hl-pause { top: calc(56.25cqw - 46px); width: 34px; height: 34px; }
  .topbar-inner { padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 19px; }
  .app-head h1 { font-size: 30px; }
  .app-icon { width: 64px; height: 64px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .card-icon { width: 96px; height: 96px; }
  .card h3 { font-size: 19px; }
  .card p { font-size: 14px; }
  .category-title { font-size: 26px; }
}
