/* YAICG landing page. Values follow the key art banner (design reference, 1200x675):
   background #0E0F12, ink #F2F2EE, Archivo Black for display, JetBrains Mono for text,
   one accent. Change --accent to #3DE8FF or #FF7A3D for the banner's other two options. */

@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/archivo-black-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #0e0f12;
  --panel: #15171b;
  --ink: #f2f2ee;
  --soft: #c9cbcf;
  --muted: #9a9da3;
  --line: #2a2c31;
  --accent: #c6ff3d;
  --accent-hi: #e2ff9e;

  --display: "Archivo Black", "Arial Black", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 6vw, 80px);
  --max: 1200px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* `hidden` must win over any display a class sets (the form, the sections waiting to be shown). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hi);
}

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

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- hero */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding-top: clamp(24px, 5vw, 64px);
  padding-bottom: clamp(24px, 5vw, 64px);
}

.hero__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(11px, 1.3vw, 15px);
}

.hero__title {
  /* The banner sets the word at 210px with the ghosts 40, 100 and 160px in and the word
     itself 220px in; the same proportions in em let it scale down to a phone. */
  /* The ghosts and the word together are about 4.4em wide: 100vw / 5.3 leaves the gutters clear. */
  --t: clamp(52px, calc(100vw / 5.3), 210px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 20px);
}

.wordmark {
  position: relative;
  padding-left: 1.048em;
  font-family: var(--display);
  font-size: var(--t);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.wordmark h1 {
  position: relative;
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}

.wordmark .ghost {
  position: absolute;
  top: 0;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.wordmark .ghost:nth-child(1) {
  left: 0.19em;
  opacity: 0.18;
}

.wordmark .ghost:nth-child(2) {
  left: 0.476em;
  opacity: 0.35;
}

.wordmark .ghost:nth-child(3) {
  left: 0.762em;
  opacity: 0.6;
}

.hero__sub {
  margin: 0;
  padding-left: calc(var(--t) * 1.067);
  font-size: clamp(15px, 2.2vw, 26px);
  line-height: 1.35;
  color: var(--soft);
}

.hero__bottom {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.tagline {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}

/* The road and a rider with two ghosts behind it. It rides across once every nine seconds;
   with reduced motion it stays where the banner draws it. */
.road {
  flex: 1;
  position: relative;
  height: 14px;
  overflow: hidden;
}

.road::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.road__rider {
  position: absolute;
  inset: 0;
  animation: ride 9s linear infinite;
}

.road__rider span {
  position: absolute;
  top: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.road__rider span:nth-child(1) {
  left: 52%;
  opacity: 0.35;
}

.road__rider span:nth-child(2) {
  left: 64%;
  opacity: 0.6;
}

.road__rider span:nth-child(3) {
  top: 0;
  left: 76%;
  width: 14px;
  height: 14px;
  border: 0;
  background: var(--ink);
}

@keyframes ride {
  from {
    transform: translateX(-80%);
  }
  to {
    transform: translateX(30%);
  }
}

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

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 2px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  color: var(--bg);
}

.button--ghost {
  background: transparent;
  color: var(--accent);
}

.button--ghost:hover {
  background: transparent;
  color: var(--accent-hi);
}

/* ------------------------------------------------------------ sections */

section {
  padding: clamp(64px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 900px;
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 em {
  font-style: normal;
  color: var(--accent);
}

h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.15;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--soft);
  max-width: 62ch;
}

/* the idea: four points */
.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.point {
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg);
}

.point__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.point .label {
  color: var(--accent);
}

.tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag--soon {
  border-color: var(--accent);
  border-style: dashed;
  color: var(--accent);
}

.point p {
  color: var(--soft);
}

.point__aside {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.point__aside,
.point p.point__aside {
  color: var(--muted);
}

/* takes: the trailer and the stills */
.takes {
  display: grid;
  gap: clamp(12px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.take {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.take--wide {
  grid-column: 1 / -1;
}

.take img,
.take video,
.take iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.take figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  background: rgba(14, 15, 18, 0.72);
}

/* A YouTube take is a picture and a play button until it is clicked, so the page loads
   nothing from YouTube for a visitor who never presses play. */
.take__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.take__play img {
  position: absolute;
  inset: 0;
}

.take__play::after {
  content: "";
  position: relative;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 22px 0 22px 36px;
  border-color: transparent transparent transparent var(--bg);
  margin-left: 8px;
  z-index: 2;
}

.take__play::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.15s ease;
}

.take__play:hover::before {
  transform: scale(1.06);
}

/* what you need */
.needs {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.needs li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.needs strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.25;
}

.needs span {
  color: var(--soft);
}

@media (max-width: 640px) {
  .needs li {
    grid-template-columns: 1fr;
  }
}

/* where it is: the road again, with two stops */
.stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage {
  position: relative;
  padding-top: 36px;
}

.stage::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

/* side by side, the road runs on through the gap to the next stop */
@media (min-width: 700px) {
  .stage:not(:last-child)::before {
    right: -32px;
  }
}

.stage::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}

/* the rider is here, with its ghost behind it on the road */
.stage--now::after {
  left: 20px;
  border: 0;
  background: var(--ink);
  box-shadow: -20px 0 0 -2px var(--bg), -20px 0 0 0 rgba(198, 255, 61, 0.6);
}

.stage .label {
  display: block;
  margin-bottom: 10px;
}

.stage--now .label {
  color: var(--accent);
}

.stage p {
  color: var(--soft);
  max-width: 44ch;
}

/* download */
.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.download__meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.download__meta code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--soft);
  word-break: break-all;
}

/* register interest */
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 640px;
}

.signup input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
}

.signup input[type="email"]::placeholder {
  color: var(--muted);
}

.signup input[type="email"]:focus {
  border-color: var(--accent);
  outline: none;
}

.fineprint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  max-width: 62ch;
}

.signup__status {
  margin-top: 16px;
  font-weight: 700;
}

.signup__status:empty {
  display: none;
}

.signup__status--ok {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--accent);
}

.signup__status--error {
  color: #ff8a7a;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------- footer */

footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

footer a {
  color: var(--soft);
}
