:root {
  --carbon: #0c0d0e;
  --panel: #16171a;
  --raised: #1f2023;
  --line: #2b2d30;
  --paper: #f2f2ee;
  --soft: #c4c5bf;
  --muted: #8f9294;
  --teal: #00c4ac;
  --teal-hover: #33d6c2;
  --amber: #f2b01e;
  --display: "Barlow Condensed", "Bahnschrift SemiBold Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --wide: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--carbon);
  color: var(--soft);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--paper);
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

h1, h2, h3 {
  margin: 0;
  color: var(--paper);
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.7rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

strong {
  color: var(--paper);
  font-weight: 600;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(12, 13, 14, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar-mark img {
  height: 22px;
  width: auto;
}

.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-weight: 500;
  font-size: 0.95rem;
}

.bar nav a {
  color: var(--soft);
  text-decoration: none;
}

.bar nav a:hover {
  color: var(--paper);
}

.bar nav .bar-git {
  color: var(--carbon);
  background: var(--teal);
  padding: 6px 14px;
  font-weight: 600;
}

.bar nav .bar-git:hover {
  background: var(--teal-hover);
  color: var(--carbon);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  min-height: min(88vh, 820px);
  padding: 72px var(--gutter) 88px;
}

.stripes {
  position: absolute;
  inset: 0 -10% 0 auto;
  width: 62%;
  pointer-events: none;
}

.stripes i {
  position: absolute;
  top: -10%;
  bottom: -10%;
  transform: skewX(-24deg);
  background: var(--teal);
}

.stripes i:nth-child(1) {
  left: 18%;
  width: 18%;
}

.stripes i:nth-child(2) {
  left: 42%;
  width: 4%;
}

.stripes i:nth-child(3) {
  left: 50%;
  width: 1.6%;
  background: var(--paper);
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}

.reveal {
  position: relative;
  width: min(100%, 470px);
  margin-bottom: 36px;
}

.reveal img {
  width: 100%;
}

.caret {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2.2%;
  background: var(--teal);
  transform: skewX(-9deg);
  opacity: 0;
}

.typing .caret {
  opacity: 1;
}

.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--paper);
  max-width: 32em;
}

.fine {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-block;
  padding: 13px 24px;
  font: 600 1.1rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--raised);
  border: 1px solid var(--line);
  text-decoration: none;
  transform: skewX(-12deg);
}

.button:hover {
  color: var(--paper);
  background: var(--line);
}

.button.primary {
  color: var(--carbon);
  background: var(--teal);
  border-color: var(--teal);
}

.button.primary:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: var(--carbon);
}

.hero-car {
  position: relative;
  z-index: 1;
  margin: 0 calc(var(--gutter) * -1) 0 -6%;
}

.hero-car img {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 52% 52%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 62% at 52% 52%, #000 62%, transparent 100%);
}

section {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
}

section > * {
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 44px;
}

.section-head p {
  margin: 0;
  max-width: 38em;
  font-size: 1.1rem;
}

.results {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: var(--soft);
}

.k::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: var(--bar);
}

.author {
  --bar: var(--teal);
}

.finished {
  --bar: var(--paper);
}

.tried {
  --bar: var(--amber);
}

.waiting {
  --bar: #3a3c3f;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 10px;
}

.series {
  display: grid;
  gap: 6px;
  align-content: start;
}

.series h3 {
  font-size: 1.3rem;
  color: var(--muted);
  padding: 0 0 6px 2px;
}

.lap {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 9px 12px 9px 14px;
  background: var(--raised);
  border-left: 4px solid var(--bar);
}

.lap b {
  grid-row: span 2;
  align-self: center;
  font: italic 700 1.35rem/1 var(--display);
  color: var(--paper);
  min-width: 2.2em;
}

.lap span {
  font: 600 1.05rem/1.2 var(--display);
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.lap small {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lap.author small {
  color: var(--teal);
}

.lap.tried span,
.lap.waiting span {
  color: var(--muted);
  font-weight: 500;
}

.note {
  margin-top: 26px;
  font-size: 0.92rem;
  color: var(--muted);
}

.story .split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px 72px;
  align-items: center;
}

.story .split + .split {
  margin-top: clamp(64px, 8vw, 110px);
}

.story .flip .prose {
  order: 2;
}

.prose {
  max-width: 36em;
}

.prose h3 {
  margin-bottom: 18px;
}

.shot {
  margin: 0;
}

.shot img {
  border: 1px solid var(--line);
}

.flip .shot {
  width: min(100%, 460px);
  margin: 0 auto;
}

.dash {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.frame {
  margin: 0 auto;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 196, 172, 0.25);
}

.steps {
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 18px;
  border-top: 3px solid var(--teal);
}

.steps li::before {
  content: counter(step);
  display: block;
  font: italic 700 3rem/1 var(--display);
  color: var(--teal);
  margin-bottom: 10px;
}

.steps h3 {
  margin-bottom: 10px;
}

.steps p {
  margin: 0;
  max-width: 30em;
}

.start .actions {
  margin-top: 44px;
}

.credits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 72px;
  max-width: calc(var(--wide) + var(--gutter) * 2);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.credits > * {
  margin: 0;
}

.credits h2 {
  font-size: 2rem;
  margin-bottom: 18px;
}

.credits ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.credits li:first-child {
  padding-top: 0;
}

.foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.foot p {
  margin: 0;
  flex: 1;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 48px;
  }

  .stripes {
    width: 100%;
    inset: auto -30% 0 auto;
    height: calc(32vw + 70px);
  }

  .hero-car {
    margin: 32px calc(var(--gutter) * -1) 0;
  }

  .section-head,
  .story .split,
  .credits {
    grid-template-columns: minmax(0, 1fr);
  }

  .story .flip .prose {
    order: 0;
  }

  .board {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
  }

  .series {
    display: contents;
  }

  .series h3 {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bar nav a:not(.bar-git) {
    display: none;
  }

  .button {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
