/* Gaming Toggles for PC — MAECLY
   Dark editorial-technical. One accent, used sparingly. Rules instead of cards.
   No gradients, no blurs, no coloured shadows: every surface is a flat fill and a 1px line.
   Fonts are system-only on purpose — the previous build declared Inter without ever
   shipping it, so nine of its ten font-weights silently collapsed. */

:root {
  color-scheme: dark;

  --bg: #0a0a0b;
  --surface: #101012;
  --surface-2: #161619;
  --line: #232327;
  --line-strong: #34343a;

  --text: #f2f2f3;
  --text-2: #a3a3ad;
  --text-3: #7e7e8a;

  /* Fill green matches the physical key art; the lighter tint is the only one used
     for text, where #107c10 would sit at 3.7:1 against the page and fail WCAG AA. */
  --accent: #107c10;
  --accent-fg: #46c246;

  --font-sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --shell: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section: clamp(3rem, 5.5vw, 4.75rem);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }

:is(a, button, summary):focus-visible {
  outline: 2px solid var(--accent-fg);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 60;
  padding: .65rem 1rem;
  border-radius: var(--r-md);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.shell {
  width: min(var(--shell), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------- type ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.5rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-fg);
}

.mono { font-family: var(--font-mono); }

.lede {
  max-width: 46ch;
  margin: 1.25rem 0 0;
  color: var(--text-2);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
}
.lede strong { color: var(--text); font-weight: 600; }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  color: var(--text-2);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header > .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .16em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--accent-fg);
  font-size: .75rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2.5vw, 1.75rem);
}
.site-nav a {
  color: var(--text-2);
  font-size: .875rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }
.site-nav .is-desk { display: none; }

.language-link {
  padding: .2rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text) !important;
  font-family: var(--font-mono);
  font-size: .75rem;
}

@media (min-width: 800px) {
  .site-nav .is-desk { display: inline; }
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { background: #fff; }
.button-secondary { border-color: var(--line-strong); color: var(--text); }
.button-secondary:hover { border-color: var(--text-3); background: var(--surface); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin-top: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent-fg);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */

.section {
  border-top: 1px solid var(--line);
  padding-block: var(--section);
}
.section-head { max-width: 54ch; }
.section-head p {
  margin: 1rem 0 0;
  color: var(--text-2);
  max-width: 52ch;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  align-items: center;
}
@media (min-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
}

.hero-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .75rem;
}
.hero-specs li { display: flex; align-items: center; gap: .5rem; }
/* Rules only where the row cannot wrap; otherwise a separator orphans onto a new line. */
@media (min-width: 560px) {
  .hero-specs li + li::before {
    content: "";
    width: 1px;
    height: 11px;
    margin-right: .75rem;
    background: var(--line-strong);
  }
}
@media (max-width: 559px) {
  .hero-specs { gap: .4rem 1.5rem; }
}

/* ---------- the device ---------- */

.rig { display: grid; gap: 1rem; min-width: 0; }

.rig-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Stream Deck MK.2 — a real 5x3 grid of square keys, not an invented layout. */
.deck {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4.4%;
  padding: 4.4%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.deck-key {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9%;
  background: #0d0d10;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
}
.deck-key[disabled] { cursor: default; }
.deck-key img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Mirrors how the hardware paints the action title over the lower third of the key. */
.deck-key-title {
  position: absolute;
  inset: auto 0 3% 0;
  display: grid;
  gap: 1px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  line-height: 1.06;
}
.deck-key-title span,
.deck-key-title strong { font-size: clamp(.45rem, 1.35vw, .5625rem); letter-spacing: -.01em; }
.deck-key-title strong { font-weight: 700; }
.deck-key:hover:not([disabled]) { outline: 1px solid var(--line-strong); outline-offset: 2px; }

.deck-blank {
  aspect-ratio: 1;
  border-radius: 9%;
  background: #0d0d10;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .03);
}

/* Windows 11 Settings — Fluent geometry taken from the WinUI ToggleSwitch and
   SettingsCard resources, not eyeballed: card 68px min-height, 16px padding,
   4px radius; track 40x20 r10 with a 12px thumb travelling exactly 20px.
   The #4CC2FF "on" fill is quoted from Windows' own dark-theme accent
   (SystemAccentColorLight2) rather than being a second brand colour. */
.settings {
  padding: 3px;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  background: #202020;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 12px 16px;
  border-radius: 4px;
  background: #2b2b2b;
}
.settings-row + .settings-row { margin-top: 3px; }
.settings-row > div { flex: 1; min-width: 0; }
.settings-row h4 {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.settings-row p {
  margin: 0;
  color: #9b9b9b;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  word-break: break-all;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 20px;
  border: 1px solid #9f9f9f;
  border-radius: 10px;
  background: #272727;
  transition: background-color .18s ease, border-color .18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cecece;
  transition: transform .18s ease, background-color .18s ease;
}
.switch.is-on { background: #4cc2ff; border-color: #4cc2ff; }
.switch.is-on::after { transform: translateX(20px); background: #000; }

.rig-hint {
  margin: 0;
  color: var(--text-3);
  font-size: .75rem;
  font-family: var(--font-mono);
}

/* ---------- spec strip ---------- */

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
}
.strip b { color: var(--text-2); font-weight: 400; }

/* ---------- capability rows ---------- */

.rows { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.row {
  display: grid;
  gap: 1.5rem;
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 780px) {
  .row { grid-template-columns: 88px minmax(0, 1fr) minmax(0, 20rem); gap: 2rem; }
}

.row-art {
  width: 72px;
  height: 72px;
  border-radius: 12%;
  display: block;
}
.row-marker {
  margin: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .6875rem;
  white-space: nowrap;
}
.row-key {
  display: block;
  margin: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .6875rem;
  word-break: break-all;
}
.row h3 { margin-bottom: .5rem; }
.row p { margin: 0; color: var(--text-2); font-size: .9375rem; }

/* ---------- install ---------- */

.steps {
  counter-reset: step;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .8125rem;
  padding-top: .15rem;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--text-2); font-size: .9375rem; }

.download-panel {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
}
@media (min-width: 700px) {
  .download-panel { grid-template-columns: 56px minmax(0, 1fr) auto; }
}
.download-panel img { width: 56px; height: 56px; border-radius: var(--r-md); }
.download-panel h3 { margin: 0; font-size: 1rem; }
.download-panel p {
  margin: .3rem 0 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .75rem;
}
.download-note {
  margin: .9rem 0 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: .75rem;
}

/* ---------- facts table ---------- */

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: start; }
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .8125rem;
}
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); text-align: right; }

/* ---------- author ---------- */

.author p { margin: 1rem 0 0; color: var(--text-2); max-width: 52ch; }
.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

/* ---------- faq ---------- */

.faq-list { margin-top: clamp(2rem, 4vw, 3rem); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list p {
  margin: 0 0 1.2rem;
  max-width: 62ch;
  color: var(--text-2);
  font-size: .9375rem;
}

/* ---------- final cta ---------- */

.cta { text-align: left; }
.cta .actions { margin-top: 1.75rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  color: var(--text-3);
  font-size: .8125rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.legal {
  max-width: 78ch;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

/* ---------- reveal ----------
   The previous build shipped .reveal and .reveal.is-visible with identical
   declarations, so the IntersectionObserver in main.js animated nothing. */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .switch, .switch::after, .button { transition: none; }
}
