/* Shared by the English (index.html) and Spanish (es/index.html) pages. */
/* The app's palette (idle_runner/ui/theme.py): night plum, the copper of the game's dialog frames, coin gold and
   the purple of Slayer Points. The same as the icon and the window. */
:root {
  --night: #17121c;
  --surface: #231a29;
  --raised: #33263b;
  --copper: #b9805a;
  --gold: #f2c14e;
  --gold-light: #ffe08a;
  --on-gold: #2a1a05;
  --purple: #a87cff;
  --outline: #0e0a12;
  --hero-text: #f3edf7;
  --hero-muted: #b9aec4;
  --page: #f7f3fa;
  --text: #231a29;
  --muted: #5e5068;
  --rule: #e2d8ea;
  --pixel: "Pixelify Sans", "DejaVu Sans Mono", monospace;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #17121c;
    --text: #f3edf7;
    --muted: #b9aec4;
    --rule: #33263b;
  }
}
:root[data-theme="dark"] { --page: #17121c; --text: #f3edf7; --muted: #b9aec4; --rule: #33263b; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }

/* Hero: the window's night, with the ground scrolling under it as if running. */
.sky {
  position: relative;
  background: linear-gradient(var(--night), var(--surface));
  color: var(--hero-text);
  overflow: hidden;
}

.hero { position: relative; padding: 104px 16px 72px; max-width: 68rem; margin: 0 auto; }
/* The language switch, top right. */
.lang { position: absolute; top: 24px; right: 16px; margin: 0; font: 700 1.05rem/1 var(--pixel); }
.lang a, .lang strong { color: var(--hero-text); padding: 4px 2px; }
.lang strong { border-bottom: 3px solid var(--gold); }
.title { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.mark { width: clamp(72px, 12vw, 128px); height: auto; image-rendering: pixelated; flex: none; }
h1 {
  font: 700 clamp(2.6rem, 8vw, 5.8rem)/0.95 var(--pixel);
  margin: 0;
  color: var(--hero-text);
  text-shadow: 5px 5px 0 #000;
  letter-spacing: -0.01em;
}
.lede { font-size: 1.3rem; line-height: 1.45; max-width: 34ch; margin: 24px 0 32px; font-weight: 700; }

.download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.btn {
  display: inline-block;
  font: 700 1.35rem/1 var(--pixel);
  color: var(--on-gold);
  background: var(--gold);
  border: 4px solid var(--outline);
  box-shadow: 6px 6px 0 var(--outline);
  padding: 18px 26px 16px;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { background: var(--gold-light); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--outline); }
.alt { font-weight: 700; color: var(--hero-text); }
.fine { margin: 16px 0 0; font-size: .95rem; max-width: 52ch; color: var(--hero-muted); }

.ground { position: relative; height: 72px; background: var(--raised); }
.ground::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background:
    linear-gradient(var(--copper) 4px, transparent 4px),
    repeating-linear-gradient(90deg, transparent 0 40px, #3a2f45 40px 100px, transparent 100px 200px),
    var(--surface);
  background-size: 100% 100%, 400px 4px, 100% 100%;
  background-position: 0 0, 0 22px, 0 0;
  background-repeat: no-repeat, repeat-x, no-repeat;
  animation: run 2.4s linear infinite;
}
@keyframes run { to { background-position: 0 0, -400px 22px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .ground::after { animation: none; } .btn { transition: none; } }

/* The app window sits on the ground line, in a copper frame like its own panels. */
.shot { margin-top: -40px; position: relative; }
.shot img { border: 4px solid var(--copper); box-shadow: 10px 10px 0 var(--outline); width: 100%; max-width: 60rem; margin: 0 auto; }
.shot p { text-align: center; color: var(--muted); margin: 20px auto 0; max-width: 60ch; }

section { padding: 72px 0 0; }
h2 { font: 700 2.1rem/1.1 var(--pixel); margin: 0 0 24px; }
h3 { font: 700 1.3rem/1.2 var(--pixel); margin: 0 0 12px; }

.intro { color: var(--muted); margin: -12px 0 24px; max-width: 60ch; }
.does { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 48px; margin: 0; }
.does div { border-top: 2px solid var(--rule); padding: 14px 0 16px; }
.does dt { font-weight: 700; }
.does dd { margin: 2px 0 0; color: var(--muted); }

.gallery { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-top: 40px; align-items: start; }
.gallery img { border: 3px solid var(--copper); }
.gallery figcaption { color: var(--muted); font-size: .95rem; margin-top: 8px; }
.gallery figure { margin: 0; }

/* The promises: a panel of the window, with the coin gold. */
.never { background: var(--surface); color: var(--hero-text); padding: 40px clamp(20px, 5vw, 56px); border-left: 8px solid var(--copper); }
.never h2 { color: var(--gold); }
.never ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.never li { padding-left: 28px; position: relative; max-width: 60ch; }
.never li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; background: var(--purple); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 32px 48px; }
.steps ol, .steps ul { margin: 0; padding-left: 1.4em; }
.steps li { margin-bottom: 8px; }
.steps li::marker { font-family: var(--pixel); font-weight: 700; }
code { font: .92em/1.4 ui-monospace, "DejaVu Sans Mono", monospace; background: var(--rule); padding: 1px 5px; overflow-wrap: anywhere; }
.note { color: var(--muted); font-size: .95rem; margin-top: 12px; }

footer { margin-top: 88px; border-top: 2px solid var(--rule); padding: 32px 0 48px; color: var(--muted); font-size: .95rem; }
footer p { margin: 0 0 10px; max-width: 70ch; }
footer .support { color: var(--text); font-size: 1.05rem; }

@media (max-width: 40rem) {
  .hero { padding-top: 80px; }
  .gallery { grid-template-columns: 1fr; }
  .shot img { box-shadow: 6px 6px 0 var(--outline); }
}
