/*
  automatoes.dev design system (2026-11-05).
  Warm charcoal neutrals, one tomato red, one stem green. Flat solid fills, 1 px borders,
  corner radius 6 px at most, system fonts only. Every colour lives in the token block below.
  Component inventory with every class: docs/DESIGN.md, "Site design (2026-11-05)".
*/

/* 1. Tokens */

:root {
  /* Neutrals: warm charcoal, each surface one step lighter than what sits behind it. */
  --bg: #15110f;
  --bg-2: #1d1815;
  --bg-3: #261f1b;
  --chrome: #2c2420;
  --line: #352b25;
  --line-strong: #4b3e35;
  --text: #f6efe7;
  --text-2: #c2b4a6;
  --text-3: #968878;

  /* Tomato: the logo red for marks, a deeper red for filled buttons, the darkest for the band. */
  --tomato: #e53935;
  --tomato-light: #ff7a6b;
  --accent: #d32f2f;
  --accent-hover: #e53935;
  --accent-pressed: #b71c1c;
  --accent-ink: #ffffff;
  --band: #a8231c;
  --band-text: #f6efe7;
  --band-text-2: #ffd9d2;
  --band-line: #d8635b;
  --leaf: #43a047;

  /* Type */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, Menlo, monospace;
  --text-xs: 13px;
  --text-sm: 15px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-4xl: 60px;

  /* Spacing, 4 px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Layout. Corner radius is written as plain px: 6px for surfaces and buttons, 4px for small controls. */
  --width: 1120px;
  --width-text: 680px;
  --gutter: 24px;
  --slab: 24px;
}

/* 2. Base */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--text-md)/1.6 var(--font);
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }

a { color: var(--tomato-light); text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--tomato-light); outline-offset: 3px; }

::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--text-lg); font-weight: 650; }

p, ul, ol { margin: 0 0 var(--s-4); }
ul, ol { padding-left: var(--s-5); }
li { margin-bottom: var(--s-2); }
strong { color: var(--text); font-weight: 650; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--text);
  font: 600 0.82em/1.5 var(--mono);
  text-align: center;
  vertical-align: 0.08em;
}

.container {
  width: 100%;
  max-width: calc(var(--width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--s-2);
  top: -64px;
  z-index: 20;
  padding: var(--s-2) var(--s-3);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.skip:focus { top: var(--s-2); color: var(--accent-ink); }

/* 3. Header and nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  min-height: 64px;
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 700 19px/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav li { margin: 0; }
.nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover { background: var(--bg-3); color: var(--text); }
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline 2px var(--tomato);
  text-underline-offset: 8px;
}
.nav .nav-discord {
  margin-left: var(--s-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.nav .nav-discord:hover { border-color: var(--tomato-light); background: transparent; }

/* 4. Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 var(--text-md)/1.2 var(--font);
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.button:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--accent-ink); }
.button:active { border-color: var(--accent-pressed); background: var(--accent-pressed); }

.button-lg { min-height: 54px; padding: 14px 28px; font-size: 18px; }

.button-plain {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}
.button-plain:hover { border-color: var(--text-3); background: var(--bg-3); color: var(--text); }
.button-plain:active { background: var(--bg-2); }

.button-light {
  border-color: var(--band-text);
  background: var(--band-text);
  color: var(--bg);
}
.button-light:hover { border-color: var(--accent-ink); background: var(--accent-ink); color: var(--bg); }
.button-light:active { background: var(--band-text-2); }

.buttons { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }

/* 5. Sections and section heads */

.section { padding: var(--s-9) 0; }
.section-alt { background: var(--bg-2); }

.eyebrow {
  display: block;
  margin: 0 0 var(--s-3);
  color: var(--tomato-light);
  font: 600 var(--text-xs)/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lede { max-width: 36em; color: var(--text-2); font-size: var(--text-lg); line-height: 1.55; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--s-3) var(--s-8);
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; font-size: var(--text-3xl); line-height: 1.1; }
.section-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.section-head p { margin: 0; color: var(--text-2); }

.page-head { padding: var(--s-8) 0 var(--s-7); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--text-4xl); }
.page-head .lede { margin: 0; }

/* 6. Hero */

.hero { padding: var(--s-8) 0 var(--s-4); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s-8);
}
.hero h1 { margin-bottom: var(--s-5); font-size: var(--text-4xl); line-height: 1.02; letter-spacing: -0.03em; }
.hero .lede { margin-bottom: var(--s-6); }
.hero .buttons { margin: 0; }
.tomato-text { color: var(--tomato); }

/* The tomato slab: a flat red block offset behind a screenshot, with the logo's green stem on top. */
.stage {
  position: relative;
  isolation: isolate;
  margin: var(--s-7) var(--slab) 0 0;
}
.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--slab));
  right: calc(-1 * var(--slab));
  bottom: var(--slab);
  left: var(--slab);
  border-radius: 6px;
  background: var(--tomato);
}
.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--slab) - 30px);
  left: 58%;
  width: 16px;
  height: 42px;
  border-radius: 3px;
  background: var(--leaf);
  transform: rotate(10deg);
}

/* 7. Screenshot frames (a flat Windows title bar above a real screenshot) */

.shot { margin: 0; }
.shot-window {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
}
.shot-window img { display: block; width: 100%; height: auto; }
.shot-bar {
  display: flex;
  align-items: stretch;
  height: 32px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  color: var(--text-3);
}
.shot-title {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--s-2);
  padding-left: var(--s-3);
  font-size: 12px;
}
.shot-title img { width: 14px; height: 14px; }
.shot-ctl { position: relative; width: 44px; }
.shot-ctl::before, .shot-ctl::after { content: ""; position: absolute; left: 50%; top: 50%; }
.shot-ctl-min::before { width: 10px; height: 1px; margin-left: -5px; background: currentColor; }
.shot-ctl-max::before { width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 1px solid currentColor; }
.shot-ctl-close::before, .shot-ctl-close::after { width: 13px; height: 1px; margin-left: -6.5px; background: currentColor; transform: rotate(45deg); }
.shot-ctl-close::after { transform: rotate(-45deg); }
.shot-caption { margin-top: var(--s-4); color: var(--text-2); font-size: var(--text-sm); }
.shot-caption strong { display: block; margin-bottom: 2px; font-size: var(--text-md); }

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-7) var(--s-6);
}

/* 8. Supported game strip */

.games {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3) var(--s-6);
  padding: var(--s-5) var(--s-6);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tomato);
  border-radius: 6px;
  background: var(--bg-2);
}
.hero .games { margin-top: var(--s-9); }
.games .eyebrow { margin: 0; }
.games-name { margin: 0; font: 800 var(--text-2xl)/1.1 var(--font-display); letter-spacing: -0.02em; }
.games-note { margin: 0; color: var(--text-2); font-size: var(--text-sm); }

/* 9. Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
.feature {
  display: flex;
  flex-direction: column;
  padding: var(--s-6) var(--s-5) var(--s-5);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
  transition: border-color 120ms ease;
}
.feature:hover { border-color: var(--line-strong); }
.feature h3 { margin-bottom: var(--s-2); }
.feature p { margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.feature-num {
  display: block;
  margin-bottom: var(--s-5);
  color: var(--tomato-light);
  font: 600 var(--text-xs)/1 var(--mono);
  letter-spacing: 0.1em;
}
.feature-lead { grid-column: span 2; border-top: 3px solid var(--tomato); }
.feature-lead h3 { font-size: var(--text-2xl); letter-spacing: -0.01em; }
.feature-lead p { max-width: 34em; font-size: var(--text-md); }
.feature-lead .keys { margin-top: auto; padding-top: var(--s-6); }

/* 10. Hotkeys */

.keys {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.keys li { display: flex; align-items: center; gap: var(--s-2); margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.keys kbd { font-size: 14px; }

/* 11. Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6) var(--s-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { margin: 0; color: var(--text-2); font-size: var(--text-sm); counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: var(--s-4);
  color: var(--tomato);
  font: 800 var(--text-4xl)/0.9 var(--font-display);
  letter-spacing: -0.04em;
}
.steps h3 { margin-bottom: var(--s-2); color: var(--text); }
.steps p { margin: 0; }

/* 12. Download band */

.download { padding: var(--s-9) 0; background: var(--band); color: var(--band-text); }
.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: var(--s-7) var(--s-8);
}
.download h2 { margin-bottom: var(--s-4); font-size: var(--text-4xl); line-height: 1; letter-spacing: -0.03em; }
.download p { max-width: 30em; color: var(--band-text-2); font-size: var(--text-lg); }
.download .buttons { margin: var(--s-6) 0 0; }
.download .button-plain { border-color: var(--band-line); color: var(--band-text); }
.download .button-plain:hover { border-color: var(--band-text); background: var(--accent-pressed); }
.download a:focus-visible { outline-color: var(--band-text); }

.facts { display: grid; gap: var(--s-5); margin: 0; }
.facts div { padding-left: var(--s-4); border-left: 2px solid var(--band-line); }
.facts dt { color: var(--band-text-2); font: 600 var(--text-xs)/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; font: 700 var(--text-xl)/1.3 var(--font-display); }

/* 13. Cards, split layout, notes */

.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
  gap: var(--s-6) var(--s-7);
}

.card {
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
}
.card h3 { font-size: var(--text-xl); }
.card p { color: var(--text-2); }
.card .buttons { margin: var(--s-5) 0 0; }

.note {
  margin: 0 0 var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--tomato);
  border-radius: 0 6px 6px 0;
  background: var(--bg-2);
  color: var(--text-2);
}
.note > :last-child { margin-bottom: 0; }

/* 14. FAQ (details and summary, no script) */

.faq { display: grid; gap: var(--s-2); }
.faq details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
  transition: border-color 120ms ease;
}
.faq details:hover, .faq details[open] { border-color: var(--line-strong); }
.faq summary {
  position: relative;
  padding: 18px 56px 18px var(--s-5);
  color: var(--text);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--s-5);
  width: 14px;
  height: 2px;
  margin-top: -1px;
  background: var(--tomato-light);
  transition: transform 150ms ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:focus-visible { outline-offset: -2px; border-radius: 6px; }
.faq-body { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); }
.faq-body > :last-child { margin-bottom: 0; }
.faq-more { margin: var(--s-5) 0 0; font-weight: 600; }

/* 15. Long text pages */

.text > * { max-width: var(--width-text); }
.text h1 { margin-bottom: var(--s-6); font-size: var(--text-4xl); }
.text h2 {
  margin-top: var(--s-8);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.text h1 + h2, .text h2:first-child { margin-top: 0; }
.text h3 { margin-top: var(--s-6); }
.text p, .text li { color: var(--text-2); }
.text li::marker { color: var(--tomato-light); font-weight: 700; }

/* 16. Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: var(--text-sm);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}
.site-footer p { margin: 0; }
.site-footer .nav { gap: var(--s-1) var(--s-5); }
.site-footer .nav a { padding: 4px 0; font-weight: 500; }
.site-footer .nav a:hover { background: transparent; }
.site-footer .footer-grid { padding-top: var(--s-7); }
.footer-mark { display: block; flex: 1 0 100%; width: 100%; height: auto; margin-top: var(--s-6); }

/* 17. Breakpoints */

@media (max-width: 900px) {
  :root { --gutter: 20px; --slab: 16px; }
  h1, .text h1, .page-head h1 { font-size: 40px; }
  .hero h1 { font-size: 48px; }
  .section, .download { padding: var(--s-8) 0; }
  .hero { padding: var(--s-7) 0 var(--s-2); }
  .hero-grid, .download-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .stage { margin-top: var(--s-6); }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head h2, .download h2 { font-size: 36px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .games { grid-template-columns: minmax(0, 1fr); padding: var(--s-5); }
  .hero .games { margin-top: var(--s-8); }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --slab: 12px; }
  body { font-size: 16px; }
  h1, .text h1, .page-head h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .hero h1 { font-size: 40px; }
  .lede, .download p { font-size: var(--text-md); }
  .section, .download { padding: var(--s-7) 0; }
  .hero { padding: var(--s-6) 0 0; }
  .page-head { padding: var(--s-6) 0 var(--s-5); }
  .text h2 { margin-top: var(--s-7); }
  .section-head { margin-bottom: var(--s-6); }
  .section-head h2, .download h2 { font-size: 30px; }
  .site-header .container { padding-top: var(--s-3); padding-bottom: var(--s-2); }
  .site-header nav { width: 100%; }
  .site-header .nav { justify-content: space-between; margin: 0 -8px; }
  .nav a { padding: 6px 8px; }
  .nav .nav-discord { margin-left: 0; }
  .buttons .button { flex: 1 1 auto; }
  .feature-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .feature-lead { grid-column: auto; }
  .feature-lead h3 { font-size: var(--text-xl); }
  .steps li::before { font-size: var(--text-3xl); }
  .shot-ctl { width: 32px; }
  .card { padding: var(--s-5); }
  .faq summary { padding-left: var(--s-4); }
  .faq-body { padding: 0 var(--s-4) var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
