/* Rhythm Macro site: the app's own colours (ink, red) and the game's three lane colours. */
:root {
  --ink: #0A090C;
  --panel: #121115;
  --raised: #1A191E;
  --line: #24232A;
  --text: #F2F2F4;
  --muted: #9A99A3;
  --faint: #66656E;
  --red: #D4202C;
  --red-hi: #E8343F;
  --red-dark: #2B0F12;
  --red-line: #6E1D24;
  --green: #6FD38A;
  --pink: #EC7A90;
  --yellow: #F6D873;
  --lime: #B9F23A;
  --display: "Bahnschrift", "DIN Alternate", "Barlow", "Segoe UI", system-ui, sans-serif;
  --body: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --wrap: 1080px;
  --gutter: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--red-hi); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-stretch: 75%; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(44px, 7.4vw, 86px); font-weight: 700; }
h2 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 700; margin-bottom: 18px; }
h3 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }

/* --------------------------------------------------------------- header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.logo b { color: var(--red); font-weight: 700; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15.5px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--red); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 17px/1 var(--display); text-decoration: none; cursor: pointer;
  padding: 15px 24px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--raised); color: var(--text);
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { background: #25242B; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn[disabled], .btn[aria-disabled="true"] { background: #1A1418; border-color: var(--line); color: var(--faint); cursor: not-allowed; transform: none; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* --------------------------------------------------------------- home: hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 22px; max-width: 11ch; }
.hero .lead { font-size: 19.5px; color: #CFCED6; max-width: 34em; margin-bottom: 28px; }
.hero .meta { margin-top: 18px; color: var(--faint); font-size: 14.5px; }
.highway { position: relative; aspect-ratio: 4 / 5; max-height: 560px; width: 100%; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 100%, #1B1418 0%, var(--ink) 70%); border: 1px solid var(--line); }
.highway canvas { width: 100%; height: 100%; }

/* --------------------------------------------------------------- home: sections */
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.steps p { color: var(--muted); margin: 0; }
.hit { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--c, var(--green)); display: grid; place-items: center;
  font: 700 20px/1 var(--display); color: var(--c, var(--green)); }
.hit.g { --c: var(--green); } .hit.p { --c: var(--pink); } .hit.y { --c: var(--yellow); }

.inst { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 8px; }
.inst dl { margin: 0; }
.inst dt { font: 600 20px/1.2 var(--display); margin-top: 18px; }
.inst dd { margin: 4px 0 0; color: var(--muted); }

table.plans { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 16.5px; }
.plans th, .plans td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans thead th { font: 700 24px/1.1 var(--display); padding-bottom: 12px; }
.plans thead th:first-child { width: 34%; }
.plans tbody th { font-weight: 400; color: var(--muted); }
.plans .price { display: block; font: 400 15px/1.3 var(--body); color: var(--muted); margin-top: 4px; }
.plans tfoot td { border-bottom: 0; padding-top: 18px; }

.risk { border-left: 3px solid var(--red); padding: 4px 0 4px 18px; color: #CFCED6; max-width: 62ch; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; max-width: 72ch; }
.faq summary { cursor: pointer; font: 600 19px/1.3 var(--display); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 22px; color: var(--red); }
.faq details[open] summary::before { content: "–"; }
.faq details p { margin: 10px 0 0 22px; color: var(--muted); }

/* --------------------------------------------------------------- key page */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(42px, 6.4vw, 68px); margin-bottom: 14px; }
.track { list-style: none; margin: 0; padding: 0; }
.stage { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 28px; margin: 22px 0; }
.stage .head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.stage .head h2 { font-size: 30px; margin: 0; }
.stage .hit { flex: none; }
.stage.locked { opacity: .45; }
.stage.locked .hit { border-style: dashed; }
.stage.done .hit { background: var(--c); color: var(--ink); }
.stage p:last-child { margin-bottom: 0; }
.say { min-height: 1.5em; margin: 14px 0 0; color: var(--muted); }
.say.bad { color: #FF7A82; }
.say.good { color: var(--green); }
.cf-turnstile { min-height: 65px; }

.ring { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring svg { width: 132px; height: 132px; flex: none; }
.ring .track-arc { stroke: #26252C; }
.ring .zone { stroke: var(--lime); transition: stroke .3s; }
.ring .needle { stroke: #fff; }
.ring .num { font: 700 38px var(--display); fill: var(--text); }
.ring .unit { font: 400 13px var(--body); fill: var(--muted); }
.ring.ready .zone { stroke: var(--green); }

.keybox { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-top: 4px; }
.keybox output { flex: 1 1 320px; display: flex; align-items: center; min-height: 54px; padding: 0 16px; border-radius: 8px;
  background: var(--ink); border: 1px solid var(--line); font: 600 clamp(15px, 2.3vw, 19px)/1.2 var(--mono); letter-spacing: .04em;
  color: var(--yellow); overflow-wrap: anywhere; user-select: all; }
.keybox output:empty::before { content: "Your key appears here"; color: var(--faint); font: 400 15px var(--body); letter-spacing: 0; }
.left { margin-top: 12px; color: var(--muted); }
.left strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- ads */
.ad { margin: 26px auto; min-height: 0; text-align: center; }
.ad.preview { min-height: 110px; border: 1px dashed #34333B; border-radius: 10px; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.ad ins { display: block; }

/* --------------------------------------------------------------- prose pages */
.prose { padding: 40px 0 56px; }
.prose h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 18px; }
.prose h2 { font-size: 30px; margin: 40px 0 10px; }
.prose h3 { font-size: 21px; margin: 24px 0 6px; }
.prose p, .prose li { max-width: 70ch; color: #D6D5DC; }
.prose li { margin-bottom: 6px; }
.prose kbd { font: 600 14px var(--mono); background: var(--red-dark); color: #FF8088; border: 1px solid var(--red-line); border-radius: 5px; padding: 1px 7px; }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; max-width: 70ch; }

/* --------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 64ch; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--muted); }

/* --------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .highway { aspect-ratio: 16 / 11; max-height: 340px; }
  .steps { grid-template-columns: 1fr; }
  .inst { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  :root { --gutter: 16px; }
  .stage { padding: 20px 18px 22px; }
  .plans th, .plans td { padding-right: 8px; font-size: 15px; }
  .plans thead th { font-size: 20px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
