/* Layout: one 1120px column; hero is copy + the ordering steps drawn as a pit lane; sections alternate bg / surface and use ruled rows, not cards. Tokens live in assets/tokens.css. */
:root {
  color-scheme: dark;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --orange-soft: rgba(255, 107, 26, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-display); font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 800; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Key words: orange for the point of a line, white strong against muted text */
.hl { color: var(--accent); font-style: normal; }
strong { color: var(--text); font-weight: 600; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 20; }
.skip:focus { left: 8px; }

/* Status LED: amber means setting up */
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: inline-block; flex: none; }
.led-setup { background: var(--pc-warning); }

/* Placeholders that still need real values */
.tbd {
  display: inline-block; font-family: var(--font-mono); font-size: .8em; font-weight: 600;
  color: var(--pc-warning); border: 1px dashed var(--pc-warning); border-radius: var(--radius-sm);
  padding: 0 .45em; letter-spacing: .02em; vertical-align: middle;
}
.tbd-note { font-size: var(--fs-small); color: var(--pc-warning); border-left: 2px dashed var(--pc-warning); padding-left: var(--space-3); }

/* Buttons: navy text on orange */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3em;
  font: 700 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  padding: 14px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--pc-orange-deep); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-muted); background: var(--surface-2); }
.btn-sm { padding: 10px 16px; font-size: var(--fs-small); }

/* Banner: scrolls away with the page. Start lights go green one by one. */
.banner { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-small); }
.banner-inner { display: flex; align-items: center; justify-content: center; gap: var(--space-4); padding-block: 10px; }
.banner p { font-weight: 500; }
.banner a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.banner a::after { content: " →"; }
.banner a:hover { text-decoration: underline; }
.lights { display: inline-flex; gap: 5px; padding: 5px 7px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); flex: none; }
.lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc-online); animation: light 7s infinite backwards; }
.lights i:nth-child(2) { animation-delay: .45s; }
.lights i:nth-child(3) { animation-delay: .9s; }
.lights i:nth-child(4) { animation-delay: 1.35s; }
.lights i:nth-child(5) { animation-delay: 1.8s; }
@keyframes light { 0%, 6% { background: var(--border); } 7%, 100% { background: var(--pc-online); } }

/* Top bar: floats below the banner, then sticks near the top of the window */
.topbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 10; margin-top: 12px; }
.topbar-inner {
  display: flex; align-items: center; gap: var(--space-6); min-height: 60px;
  padding: 0 var(--space-3) 0 var(--space-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.brand { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.wordmark { font-family: var(--font-display); font-stretch: 112%; font-weight: 900; font-size: 1.4rem; letter-spacing: .01em; }
.wm-accent { color: var(--accent); }
.wordmark-sm { font-size: 1.15rem; }
.nav { display: flex; gap: var(--space-6); margin-left: auto; }
.nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: var(--fs-small); white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a[hidden] { display: none; }
@media (max-width: 900px) {
  .nav { display: none; }
  .topbar .btn { margin-left: auto; }
}
@media (max-width: 560px) { .banner-inner { justify-content: flex-start; gap: var(--space-3); } }

/* Hero */
.hero { position: relative; padding-top: clamp(40px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: start; padding-bottom: clamp(48px, 7vw, 88px); }
.hero-copy { display: grid; gap: var(--space-6); min-width: 0; }
.hero h1 { font-size: clamp(2.25rem, 3.6vw + 1rem, 3.75rem); }
.lede { font-size: 1.125rem; color: var(--text-muted); max-width: 58ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.fineprint { font-size: var(--fs-small); color: var(--text-muted); max-width: 52ch; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Track: the ordering steps as a pit lane. Orange kerbs mark the stretches where PitCrew does the work. */
.track { min-width: 0; display: grid; gap: var(--space-4); padding: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.track .h-sm { margin: 0; }
.laps { list-style: none; margin: 0; padding: 14px 0 0; position: relative; }
.laps::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 40px; background: var(--bg); border-inline: 1px solid var(--border); }
.laps::after { content: ""; position: absolute; left: 25px; top: 14px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--border) 0 10px, transparent 10px 20px); }
.laps li { position: relative; z-index: 1; padding: 0 0 var(--space-4) 68px; display: grid; gap: 2px; min-height: 56px; }
.laps li:last-child { padding-bottom: var(--space-2); }
/* Markers are top-down race cars heading down the track, drawn as a mask so they take the step's color. */
.laps li::before {
  content: ""; position: absolute; left: 14px; top: 0; width: 24px; height: 43px; background: var(--text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 36'%3E%3Crect x='3' y='1' width='14' height='3.2' rx='1'/%3E%3Crect x='.5' y='6' width='4.5' height='8.5' rx='1.6'/%3E%3Crect x='15' y='6' width='4.5' height='8.5' rx='1.6'/%3E%3Crect x='4' y='9.4' width='12' height='1.6'/%3E%3Cpath d='M7 3.5h6l1.2 11.5-2 8-1 9.5H8.800l-1-9.500-2-8z'/%3E%3Crect x='1.500' y='21.500' width='3.800' height='7.500' rx='1.500'/%3E%3Crect x='14.700' y='21.500' width='3.800' height='7.500' rx='1.500'/%3E%3Crect x='4.500' y='24.600' width='11' height='1.300'/%3E%3Crect x='2' y='32' width='16' height='3.200' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 36'%3E%3Crect x='3' y='1' width='14' height='3.2' rx='1'/%3E%3Crect x='.5' y='6' width='4.5' height='8.5' rx='1.6'/%3E%3Crect x='15' y='6' width='4.5' height='8.5' rx='1.6'/%3E%3Crect x='4' y='9.4' width='12' height='1.6'/%3E%3Cpath d='M7 3.5h6l1.2 11.5-2 8-1 9.5H8.800l-1-9.500-2-8z'/%3E%3Crect x='1.500' y='21.500' width='3.800' height='7.500' rx='1.500'/%3E%3Crect x='14.700' y='21.500' width='3.800' height='7.500' rx='1.500'/%3E%3Crect x='4.500' y='24.600' width='11' height='1.300'/%3E%3Crect x='2' y='32' width='16' height='3.200' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.laps .crew::before { background: var(--accent); }
.laps .go::before { background: var(--pc-online); }
.laps .crew::after { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 4px; background: repeating-linear-gradient(var(--accent) 0 8px, var(--text) 8px 16px); }
.laps li:first-child { margin-top: -14px; padding-top: 14px; }
.laps li:first-child::before { top: 14px; }
.laps li:first-child::after { content: ""; position: absolute; left: 7px; top: 0; width: 38px; height: 8px; background: repeating-conic-gradient(var(--text) 0 25%, transparent 0 50%) 0 0 / 8px 8px; }
.who { font: 600 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.crew .who { color: var(--accent); }
.laps h3 { font-size: 1.05rem; }
.laps p { color: var(--text-muted); font-size: var(--fs-small); }

/* Checkered strip */
.checker { height: 14px; background: repeating-conic-gradient(var(--text) 0 25%, transparent 0 50%) 0 0 / 14px 14px; opacity: .9; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.sec-head { display: grid; gap: var(--space-4); max-width: 640px; margin-bottom: var(--space-8); }
.sec-head > p:not(.tbd-note) { color: var(--text-muted); font-size: 1.0625rem; }
.link-arrow { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.h-sm { font-size: var(--fs-h3); margin-bottom: var(--space-4); }

/* Compare: most hosts vs us */
.compare { border-top: 1px solid var(--border); }
.cmp-row { display: grid; grid-template-columns: 200px 1fr 1.2fr; gap: var(--space-4); padding-block: var(--space-3); border-bottom: 1px solid var(--border); color: var(--text-muted); }
.cmp-row > :first-child { font-size: var(--fs-small); }
.cmp-row .us { color: var(--text); font-weight: 600; }
.cmp-head { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.cmp-head .us { color: var(--accent); }
@media (max-width: 640px) {
  .cmp-row { grid-template-columns: 1fr 1fr; gap: var(--space-1) var(--space-4); }
  .cmp-row > :first-child { grid-column: 1 / -1; }
  .cmp-head > :first-child { display: none; }
}

/* What you get / what we set up */
.gets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-6) var(--space-8); }
.gets li { display: grid; gap: var(--space-1); align-content: start; padding-top: var(--space-4); border-top: 2px solid var(--border); color: var(--text-muted); font-size: var(--fs-small); }
.gets li:first-child { border-top-color: var(--accent); }
.gets strong { font-size: var(--fs-body); }

/* Game pages */
.hero-solo .hero-copy { padding-bottom: clamp(48px, 7vw, 88px); }
.hero-solo h1, .hero-solo .lede { max-width: 760px; }
.crumb { font-size: var(--fs-small); color: var(--text-muted); }
.crumb a { color: var(--text-muted); }
.keynote { font-size: var(--fs-small); color: var(--text-muted); max-width: 62ch; padding-left: var(--space-3); border-left: 2px solid var(--accent); }
.sec-head .spec { font-size: var(--fs-small); color: var(--text); }

/* Games: one row per game */
.games { border-top: 1px solid var(--border); }
.game { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: var(--space-4) var(--space-8); align-items: baseline; padding-block: var(--space-6); border-bottom: 1px solid var(--border); }
.game p { color: var(--text-muted); max-width: 62ch; }
.game h3 a { text-decoration: none; }
.game h3 a:hover { color: var(--accent); }
.game .spec { margin-top: var(--space-2); color: var(--text); font-size: var(--fs-small); }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; gap: var(--space-2); } }

/* Free trial */
.trial { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.trial > * { min-width: 0; }
.trial .sec-head { margin-bottom: 0; }
.code { color: var(--text); font-weight: 600; }
.code:not(.tbd) { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 8px; }
.terms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.terms li { padding-block: var(--space-4); border-bottom: 1px solid var(--border); color: var(--text-muted); }
.terms li { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-4); }
@media (max-width: 760px) { .trial { grid-template-columns: 1fr; } }

/* Support */
.support { display: grid; grid-template-columns: 1.3fr .7fr; gap: var(--space-6) clamp(32px, 6vw, 80px); }
.support > * { min-width: 0; }
.support .sec-head { grid-column: 1 / -1; margin-bottom: 0; }
.prose { display: grid; gap: var(--space-4); align-content: start; color: var(--text-muted); max-width: 62ch; }
.prose .lead { color: var(--text); font-size: 1.25rem; line-height: 1.45; }
.region { display: grid; gap: var(--space-3); align-content: start; padding-left: var(--space-6); border-left: 1px solid var(--border); }
.region p:not(.tbd-note) { color: var(--text-muted); }
@media (max-width: 760px) { .support { grid-template-columns: 1fr; } .region { padding-left: 0; border-left: 0; padding-top: var(--space-6); border-top: 1px solid var(--border); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.plan { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-6) var(--space-6) var(--space-6) 0; min-width: 0; }
.plan + .plan { padding-left: var(--space-6); border-left: 1px solid var(--border); }
.plan p:not(.price) { color: var(--text-muted); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-family: var(--font-display); font-stretch: 112%; font-weight: 900; font-size: 2.25rem; line-height: 1; }
.price .tbd { font-size: 1.1rem; }
.price .per { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-small); color: var(--text-muted); }
.plans-foot { margin-top: var(--space-6); color: var(--text-muted); }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan, .plan + .plan { padding: var(--space-6) 0; border-left: 0; }
  .plan + .plan { border-top: 1px solid var(--border); }
}

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--space-12); }
.faq-wrap .sec-head { margin-bottom: 0; align-content: start; }
.faq { min-width: 0; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: var(--space-4) var(--space-8) var(--space-4) 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; font-family: var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 var(--space-4); color: var(--text-muted); max-width: 65ch; }
@media (max-width: 760px) { .faq-wrap { grid-template-columns: 1fr; gap: var(--space-8); } }

/* Contact */
.contact-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.contact-inner img { width: 96px; }
.contact-inner > div { display: grid; gap: var(--space-4); }
.contact-inner p { color: var(--text-muted); max-width: 52ch; }
.contact-alt { font-size: var(--fs-small); }
.contact-alt a { color: var(--text); }
@media (max-width: 560px) { .contact-inner { grid-template-columns: 1fr; } .contact-inner img { width: 64px; } }

/* Footer */
.footer { background: var(--surface); }
.footer-inner { display: grid; gap: var(--space-2); padding-block: var(--space-8); font-size: var(--fs-small); color: var(--text-muted); }
.footer .fine { font-size: var(--fs-label); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lights i { animation: none; }
}
