/* OnAir keyboard website. Dark is the default theme, light is the visitor's choice (head.js sets
   data-theme before the first paint). Colours follow the program's window (ui/app.css). */
:root {
  color-scheme: dark;
  --page: #1E1E1E; --band: #2A2A2A; --surface: #333333; --chip: #3D3D3D;
  --border: #474747; --text: #FBFBFB; --muted: #ABABAB;
  --rec: #D23232; --rec-hover: #B82828; --link: #FF6B6B;
  --glow: rgba(230, 58, 58, .30); --shadow: rgba(0, 0, 0, .45);
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #FFFFFF; --band: #F3F3F3; --surface: #FFFFFF; --chip: #ECECEC;
  --border: #DCDCDC; --text: #2A2A2A; --muted: #5C5C5C;
  --rec: #C42B2B; --rec-hover: #A82323; --link: #B3261E;
  --glow: rgba(230, 58, 58, .20); --shadow: rgba(0, 0, 0, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 17px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section.band { padding: clamp(56px, 8vw, 88px) 0; }
section.alt { background: var(--band); }
.lead-in { max-width: 680px; margin-top: 12px; color: var(--muted); }

[data-theme="light"] .only-dark, :root:not([data-theme="light"]) .only-light { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
  padding: 0 22px; border: 1px solid var(--border); border-radius: 10px; background: transparent;
  color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--chip); }
.btn.primary { border-color: var(--rec); background: var(--rec); color: #FFFFFF; }
.btn.primary:hover { border-color: var(--rec-hover); background: var(--rec-hover); }

/* Header */
.top { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.top .brand { flex: none; margin-right: auto; }
.top .brand img { width: auto; height: 52px; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.tools { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tools .lang { padding: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.tools .lang:hover { color: var(--text); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border);
  border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--chip); }
.icon-btn svg { width: 20px; height: 20px; }
[data-theme="light"] .sun, :root:not([data-theme="light"]) .moon { display: none; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none;
  background: radial-gradient(640px 460px at 76% 46%, var(--glow), transparent 72%);
}
.hero.on::before { opacity: 1; }
.hero .wrap { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}
.eyebrow { color: var(--muted); font-size: 15px; font-weight: 600; }
h1 { margin-top: 14px; font-size: clamp(40px, 6.2vw, 66px); line-height: 1.04; font-weight: 700; letter-spacing: -.02em; }
.lead { max-width: 560px; margin-top: 22px; color: var(--muted); font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Demo: the same card and tray colours as the program */
.demo { display: grid; gap: 16px; justify-items: center; }
.key { position: relative; width: min(210px, 56vw); aspect-ratio: 1; }
.key img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .25s, filter .25s; }
.key .lit { opacity: 0; }
.demo.on .key .lit { opacity: 1; filter: drop-shadow(0 0 32px rgba(230, 58, 58, .75)); }
.demo.on .key .idle { opacity: 0; }
.card {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 440px; min-height: 92px; padding: 18px 22px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: background .25s, border-color .25s;
}
.card .mic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--chip); color: var(--muted); }
.card .mic svg { width: 26px; height: 26px; }
.card strong { display: block; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: .02em; }
.card span { display: block; color: var(--muted); font-size: 15px; }
.demo.on .card { border-color: var(--rec); background: var(--rec); color: #FFFFFF; }
.demo.on .card .mic { background: rgba(255, 255, 255, .18); color: #FFFFFF; }
.demo.on .card span { color: #FFFFFF; }
.apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.apps button {
  min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 19px; background: transparent;
  color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.apps button:hover { background: var(--chip); }
.apps button[aria-pressed="true"] { border-color: var(--rec); background: var(--rec); color: #FFFFFF; }
.hint { color: var(--muted); font-size: 14px; }

/* Cards */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.tile { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tile p { margin-top: 8px; color: var(--muted); }
.tile .num {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%;
  background: var(--rec); color: #FFFFFF; font-weight: 700; font-size: 16px;
}

/* Features */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.shot { border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 18px 50px var(--shadow); }
.features { display: grid; gap: 22px; margin-top: 28px; padding: 0; list-style: none; }
.features p { margin-top: 4px; color: var(--muted); }

/* Works with */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.chips li { padding: 4px 12px; border-radius: 16px; background: var(--chip); font-size: 15px; }
.favourites { margin-top: 48px; }
.favourites h3 { font-size: 22px; }

/* FAQ */
.faq { max-width: 800px; margin-top: 32px; }
details { border-top: 1px solid var(--border); }
details:last-child { border-bottom: 1px solid var(--border); }
summary { padding: 18px 4px; font-weight: 600; cursor: pointer; }
details p { padding: 0 4px 20px; color: var(--muted); }

/* Footer */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); }
.support { max-width: 720px; }
.support .actions { margin-top: 18px; }
.small { margin-top: 36px; color: var(--muted); font-size: 14px; }
.small p + p { margin-top: 6px; }

.center { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 16px; }

@media (max-width: 900px) {
  .top nav { display: none; }
  .hero::before { background: radial-gradient(420px 420px at 50% 76%, var(--glow), transparent 72%); }
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cols, .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .top { min-height: 72px; gap: 12px; }
  .top .brand img { height: 42px; }
  .actions .btn { width: 100%; }
  .card { padding: 14px 16px; gap: 12px; }
  .card strong { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
