/* Shared styles for the MIDI-NOX website. Colours are the app's dark theme
   (the web app's src/index.css and the macOS icon). */

:root {
  --bg: #0f1316;
  --bg-2: #14181c;
  --panel: #1b2127;
  --panel-2: #222a31;
  --line: #2a343e;
  --text: #e6edf0;
  --muted: #95a3ad;
  --accent: #5ad1c5;
  --accent-strong: #7de0d6;
  --accent-ink: #0b1a18;
  --note: #00cc88;
  --cc: #44aadd;
  --pc: #aa88ee;
  --bend: #ddaa44;
  --sysex: #00d4a8;
  --panic: #ee4455;
  --radius: 10px;
  --topbar-h: 62px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .9em; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3em; }
kbd {
  display: inline-block; padding: 0 .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  background: var(--panel); color: var(--accent-strong); font-family: var(--mono); font-size: .86em; line-height: 1.5; white-space: nowrap;
}
.path { color: var(--accent-strong); font-style: normal; font-weight: 600; }
.wordmark { font-family: var(--display); font-weight: 900; font-style: italic; letter-spacing: -.02em; color: var(--accent); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(15, 19, 22, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 22px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand b { white-space: nowrap; font-family: var(--display); font-weight: 900; font-style: italic; font-size: 17px; color: var(--accent); letter-spacing: -.01em; }
.brand span { display: block; color: var(--muted); font-size: 12px; font-family: var(--sans); font-style: normal; font-weight: 400; margin-top: -1px; letter-spacing: 0; }
.topnav { display: flex; gap: 4px; }
.topnav a { font-size: 14px; font-weight: 600; color: var(--text); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.topnav a:hover { text-decoration: none; color: var(--accent-strong); background: var(--panel); }
.topnav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

/* ---------- typography ---------- */
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 40px; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { color: var(--accent); font-size: 24px; margin: 0 0 14px; }
h2 .num { color: var(--muted); font-family: var(--mono); font-size: 16px; margin-right: 12px; font-weight: 600; }
h3 { color: #fff; font-size: 18px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; margin: 0 0 14px; }
li { margin: 4px 0; }
strong { color: #fff; }
.lead { font-size: 19px; max-width: 62ch; color: #cfd9de; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; background: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: rgba(90, 209, 197, .1); }
.btn.off { background: var(--panel); color: var(--muted); border-color: var(--line); cursor: default; }

/* ---------- hero ---------- */
.hero {
  padding: 72px 24px 40px;
  background:
    radial-gradient(900px 380px at 80% -60px, rgba(90, 209, 197, .16), transparent 62%),
    radial-gradient(700px 300px at 0 0, rgba(68, 170, 221, .08), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-family: var(--display); font-weight: 900; font-style: italic; font-size: clamp(48px, 8vw, 92px); color: var(--accent); letter-spacing: -.035em; margin: 0 0 6px; line-height: 1; }
.hero h1 small { display: block; font-family: var(--sans); font-style: normal; font-weight: 700; font-size: clamp(20px, 2.6vw, 28px); color: #fff; letter-spacing: -.01em; margin-top: 14px; }
.hero .lead { margin: 20px 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.meta span { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--bg-2); }
.hero-icon img { width: 100%; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }

.shot { max-width: 1240px; margin: 36px auto 0; padding: 0 24px; }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }

/* ---------- home sections ---------- */
main.home { max-width: 1240px; margin: 0 auto; padding: 56px 24px 24px; }
main.home section { margin-bottom: 64px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin: 0 0 8px; color: var(--c, var(--accent)); font-size: 17px; }
.card p { margin: 0; color: #c9d4d9; font-size: 15px; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 10px; border: 1px solid var(--line); }
.gallery figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- article pages ---------- */
main.page { max-width: 820px; margin: 0 auto; padding: 48px 24px 32px; }
main.page h2 { margin-top: 40px; }
.dates { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.summary { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin: 18px 0 28px; }
.summary b { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); margin-bottom: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* guide */
.guide { max-width: 1240px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 230px 1fr; gap: 48px; }
.toc { position: sticky; top: calc(var(--topbar-h) + 24px); align-self: start; font-size: 14px; }
.toc b { display: block; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text); }
.toc a:hover { background: var(--panel); text-decoration: none; color: var(--accent); }
.guide article section { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.guide article section:last-child { border-bottom: 0; }
.guide figure { margin: 18px 0 22px; }
.guide figure img { border-radius: 10px; border: 1px solid var(--line); }
.guide figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
dl.keys dt { white-space: nowrap; }
dl.keys dd { margin: 0; }

/* support */
.contact-card { display: flex; gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin: 24px 0 36px; }
.contact-card img { width: 88px; height: 88px; flex: none; }
.contact-card .name { font-weight: 700; font-size: 19px; color: #fff; }
.contact-card .role { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.contact-card .email { display: block; font-family: var(--mono); font-size: 15px; margin-bottom: 12px; }
dl.faq dt { font-weight: 700; color: #fff; margin-top: 20px; }
dl.faq dd { margin: 6px 0 0; color: #cfd9de; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 1240px; margin: 40px auto 0; padding: 26px 24px 40px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .spacer { margin-left: auto; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-icon { display: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .guide { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 24px; }
  .toc b { width: 100%; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; gap: 10px; }
  .brand span, .topnav .long { display: none; }
  .topnav a { padding: 7px 8px; font-size: 13px; }
  .cards, .gallery, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .contact-card { flex-direction: column; text-align: center; }
  .site-footer .spacer { margin-left: 0; width: 100%; }
}
