/* RetroShade design system v0.2 (console palette, 2026-12-01) — see WEBSITE_DESIGN.md.
   Tokens first, then base, layout, components. Plain CSS, no build step. */

@font-face { font-family: "Russo One"; src: url("fonts/RussoOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Chakra Petch"; font-weight: 500; src: url("fonts/ChakraPetch-Medium.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Chakra Petch"; font-weight: 700; src: url("fonts/ChakraPetch-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("fonts/VT323-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  /* Colour: VariLoop's console (Source/Console.h), the four RetroShade
     stripe colours. */
  --page: #e2dfd8;       /* light console shell: the page */
  --panel: #d6d2cb;      /* the app's shell: raised panels */
  --rule: #a8a39a;       /* shell shadow: borders and rules */
  --ink: #2b2f6b;        /* navy print, as on the app's panels */
  --outline: #3a3742;    /* dark bezel: outlines round keys and screens */
  --dark: #3a3742;       /* the bezel: header and dark sections */
  --dark-2: #2a2830;     /* deeper bezel: footer */
  --on-dark: #eeece7;    /* text on the bezel */
  --bezel: #57535f;      /* grey print: disabled text */
  --red: #d85a4a;
  --mustard: #d6b457;
  --green: #5ca36c;
  --blue: #3e8dbd;
  --red-ink: #942f23;    /* red usable as text on the shell (AA) */
  --lcd: #a9b36b;        /* olive LCD, as the app's screens */
  --lcd-ink: #25301a;

  /* Type */
  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-body: "Chakra Petch", system-ui, "Segoe UI", sans-serif;
  --font-lcd: "VT323", ui-monospace, Consolas, monospace;

  /* Spacing scale (4px base) */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 6rem;

  --radius: 10px;
  --maxw: 72rem;
  --shadow: 0 2px 0 rgba(30,28,40,.18), 0 10px 24px -12px rgba(30,28,40,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 500 1.0625rem/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { color: var(--red-ink); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 var(--s4); letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s4); max-width: 62ch; }
.lede { font-size: 1.2rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: var(--s4); top: -4rem; background: var(--dark); color: var(--on-dark); padding: var(--s2) var(--s4); z-index: 10; border-radius: 0 0 6px 6px; }
.skip:focus { top: 0; color: var(--on-dark); }

/* Layout */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
section { padding-block: var(--s8); }
.grid { display: grid; gap: var(--s5); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.eyebrow { font: 700 .8rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--red-ink); margin-bottom: var(--s3); }
.dark .eyebrow { color: var(--mustard); }

/* The four-stripe motif */
.stripes { height: 12px; background: linear-gradient(var(--red) 0 25%, var(--mustard) 25% 50%, var(--green) 50% 75%, var(--blue) 75%); }
.stripes.thin { height: 8px; }

/* Header / nav */
header.site { background: var(--dark); color: var(--on-dark); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding-block: var(--s3); flex-wrap: wrap; }
.brand { font: 400 1.5rem var(--font-display); color: var(--on-dark); text-decoration: none; display: flex; align-items: center; gap: var(--s3); }
.brand:hover { color: var(--mustard); }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 18px 0 0 var(--mustard), 36px 0 0 var(--green), 54px 0 0 var(--blue); margin-right: 54px; }
nav.main ul { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main a { color: var(--on-dark); text-decoration: none; font-weight: 700; padding: var(--s2) 0; border-bottom: 3px solid transparent; }
nav.main a:hover, nav.main a[aria-current="page"] { border-bottom-color: var(--mustard); color: var(--on-dark); }

/* Buttons: pill keys with a pressed state */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); font: 700 1.05rem var(--font-body);
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid var(--outline); text-decoration: none;
  background: var(--mustard); color: var(--outline); box-shadow: 0 4px 0 var(--outline);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s;
  min-height: 44px; cursor: pointer;
}
.btn:hover { background: #e2c471; color: var(--outline); transform: translateY(-1px); box-shadow: 0 5px 0 var(--outline); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--outline); }
.btn.secondary { background: var(--page); }
.btn.secondary:hover { background: #fff; }
.btn[aria-disabled="true"] { background: var(--panel); color: var(--bezel); box-shadow: 0 4px 0 var(--rule); border-color: var(--rule); cursor: not-allowed; transform: none; }
.btn .tag { font: 400 1.1rem var(--font-lcd); background: var(--lcd); color: var(--lcd-ink); padding: 0 .5rem; border-radius: 4px; letter-spacing: .04em; }
.actions { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s5); }

/* Cards and panels */
.card { background: var(--panel); border: 2px solid var(--rule); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 56px; height: 56px; margin-bottom: var(--s3); object-fit: contain; }
.dark { background: var(--dark); color: var(--on-dark); }
.dark a { color: var(--on-dark); }
.dark a:hover { color: var(--mustard); }

/* LCD readout */
.lcd { background: var(--lcd); color: var(--lcd-ink); font: 400 1.5rem/1.3 var(--font-lcd); padding: var(--s3) var(--s4); border-radius: 6px; border: 3px solid var(--outline); box-shadow: inset 0 3px 8px rgba(0,0,0,.35); letter-spacing: .04em; }

/* Device frame for screenshots */
.device { background: #5b5a57; border: 3px solid var(--outline); border-radius: 14px; padding: var(--s4); box-shadow: var(--shadow); }
.device .screen { background: var(--lcd); color: var(--lcd-ink); border-radius: 6px; border: 3px solid var(--outline); box-shadow: inset 0 3px 8px rgba(0,0,0,.35); min-height: 16rem; display: grid; place-items: center; text-align: center; padding: var(--s5); font: 400 1.6rem/1.3 var(--font-lcd); }
.device .controls { display: flex; gap: var(--s4); align-items: center; justify-content: center; margin-top: var(--s4); }
.device .controls img { width: 44px; height: 44px; }
.device .controls img.knob { width: 56px; height: 56px; }

/* Hero */
.hero { padding-block: var(--s8) var(--s9); }
.hero .grid { align-items: center; gap: var(--s7); }
.hero h1 .accent { color: var(--red-ink); }
.dark .hero h1 .accent, .hero.dark h1 .accent { color: var(--mustard); }

/* Lists */
.checks { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.checks li { padding-left: 1.9rem; position: relative; margin-bottom: var(--s2); }
.checks li::before { content: ""; position: absolute; left: 0; top: .5rem; width: .9rem; height: .9rem; background: var(--green); border: 2px solid var(--outline); border-radius: 2px; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: var(--s4); }
.steps li { counter-increment: s; padding-left: 3.5rem; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.15rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--lcd); color: var(--lcd-ink); font: 400 1.6rem var(--font-lcd); border: 2px solid var(--outline); border-radius: 6px; }

/* Status chips */
.chip { display: inline-block; font: 700 .75rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 999px; border: 2px solid var(--outline); background: var(--page); color: var(--outline); }
.chip.soon { background: var(--mustard); }
.chip.dev { background: var(--panel); }

/* FAQ */
details { border-bottom: 2px solid var(--rule); padding-block: var(--s3); }
details summary { font-weight: 700; cursor: pointer; padding: var(--s2) 0; min-height: 44px; display: flex; align-items: center; }
details[open] summary { color: var(--red-ink); }
details p { margin-top: var(--s2); }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 2px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 400; background: var(--panel); }

/* Footer */
footer.site { background: var(--dark-2); color: var(--on-dark); padding-block: var(--s7); }
footer.site a { color: var(--on-dark); }
footer.site a:hover { color: var(--mustard); }
footer.site .grid { align-items: start; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: var(--s2); }
footer.site small { opacity: .85; }

.notice { border: 2px dashed var(--ink); border-radius: var(--radius); padding: var(--s4) var(--s5); background: var(--page); }

@media (max-width: 40rem) {
  section { padding-block: var(--s7); }
  nav.main ul { gap: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
@media (forced-colors: active) { .btn { border: 2px solid ButtonText; } }

/* Buttons keep their own ink colour inside dark sections. */
.dark .btn, .dark .btn:hover { color: var(--outline); }

/* ---- VariLoop product identity (design handoff 2026-11-30) ----
   Navy from the VariLoop logo; grey shell and olive screen from the app. */
:root { --navy: var(--ink); --shell: var(--panel); }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 3px solid var(--outline); border-radius: 12px; box-shadow: var(--shadow); background: var(--shell); }
a.shot { display: block; }
a.shot:hover img { transform: translateY(-2px); }
.shot figcaption { font-size: .95rem; margin-top: var(--s3); }
.hero.shell { background: var(--shell); padding-bottom: var(--s7); }
.hero-shot { margin-top: var(--s7); }
body.vl h2, body.vl h3 { color: var(--navy); }
body.vl .dark h2, body.vl .dark h3, body.vl .card h3 { color: inherit; }
body.vl .card h3 { color: var(--navy); }
body.vl .eyebrow { color: var(--red-ink); }
.stack { display: grid; gap: var(--s5); }
.stack .shot img { border-radius: 8px; }
body.vl .dark .eyebrow { color: var(--mustard); }

/* ---- Support form ---- */
form.support { display: grid; gap: var(--s5); max-width: 44rem; }
form.support fieldset { border: 0; padding: 0; margin: 0; }
form.support legend { font: 400 1.25rem var(--font-display); margin-bottom: var(--s3); padding: 0; }
.modes { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.mode { display: block; position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mode span { display: block; border: 2px solid var(--rule); border-radius: var(--radius); padding: var(--s3) var(--s4); background: var(--panel); min-height: 44px; transition: background-color .12s, border-color .12s; }
.mode small { display: block; font-weight: 500; }
.mode:hover span { border-color: var(--ink); }
.mode input:checked + span { background: var(--lcd); color: var(--lcd-ink); border-color: var(--outline); box-shadow: inset 0 2px 6px rgba(0,0,0,.25); }
.mode input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.field label { display: block; font-weight: 700; margin-bottom: var(--s2); }
.req { font-weight: 500; font-size: .9rem; }
.field input, .field textarea { width: 100%; font: 500 1rem var(--font-body); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: .65rem .8rem; min-height: 44px; }
.field textarea { resize: vertical; }
.hint { font-size: .95rem; margin: var(--s2) 0 0; }
.hidden-field { position: absolute; left: -9999px; }
.btn[disabled] { cursor: not-allowed; }
/* Only the fields for the chosen mode are shown (no JavaScript). */
.only { display: none; gap: var(--s5); }
form.support:has(input[value="help"]:checked) .only-help,
form.support:has(input[value="troubleshooting"]:checked) .only-troubleshooting,
form.support:has(input[value="suggestion"]:checked) .only-suggestion { display: grid; }

form.support .btn { justify-self: start; }
