:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-dim: #5a5a5a;
  --accent: #d21f2e;
  --line: #e6e6e6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Berkeley Mono", "JetBrains Mono", ui-monospace, "Courier New", monospace;
  font-size: 16px;
  line-height: 1.7;
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 4rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2.5rem;
  align-items: start;
}

.logo-img {
  display: block;
  width: min(460px, 100%);
  height: auto;
  margin-bottom: 2.5rem;
}

.body { margin-bottom: 1.6rem; max-width: 62ch; }

.body.dim { color: var(--ink-dim); }

.diagram { margin: 0 0 2rem; padding: 0.75rem 0; }

.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 961px;
  aspect-ratio: 961 / 292;
}

.diagram-video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 961px;
  aspect-ratio: 960 / 560;
  background: #000;
}

.diagram-caption {
  margin-top: 0.75rem;
  color: var(--ink-dim);
  font-size: 14px;
}

.section {
  color: var(--accent);
  margin: 2.5rem 0 0.6rem;
  letter-spacing: 0.15em;
}

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

code.config {
  display: block;
  max-width: 62ch;
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 0 0 1.6rem;
  white-space: pre;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

/* Right-hand video stage */
.stage {
  position: sticky;
  top: 2rem;
  margin-top: 2rem;
}

.stage-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
}

.stage-item + .stage-item { margin-top: 2rem; }

.stage-caption {
  margin-top: 0.75rem;
  color: var(--ink-dim);
  font-size: 14px;
}

/* Certification box under the videos */
.stage-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.fs-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.fs-report,
.fs-eta {
  position: absolute;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}

.fs-headline {
  display: flex;
  align-items: center;
  gap: 0.8em;
}

.fs-report {
  position: static;
  font-size: clamp(10px, 4.2cqw, 28px);
  animation: fs-report-cycle 10s linear infinite;
}

.fs-eta {
  font-size: clamp(12px, 5.2cqw, 34px);
  animation: fs-eta-cycle 10s linear infinite;
}

/* Shield drops in from above, left of the title */
.fs-shield {
  width: clamp(36px, 12cqw, 72px);
  opacity: 0;
  animation: fs-shield-cycle 10s linear infinite;
}

.fs-shield-body {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.fs-shield-mark {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/*
 * 10s loop:
 *  0.0-0.7s  report title fades in
 *  0.8-1.0s  shield drops in with a small bounce
 *  1.2-4.8s  title and shield hold
 *  4.8-5.4s  scene fades out
 *  5.6-8.5s  availability date
 *  8.5-10.0s fade out and restart
 */
@keyframes fs-report-cycle {
  0%, 2% { opacity: 0; transform: translateY(6px); }
  7%, 48% { opacity: 1; transform: translateY(0); }
  54%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes fs-shield-cycle {
  0%, 8% { opacity: 0; transform: translateY(-160%); }
  8.5% { opacity: 1; transform: translateY(-160%); }
  10% { opacity: 1; transform: translateY(0); }
  11% { opacity: 1; transform: translateY(-14%); }
  12%, 48% { opacity: 1; transform: translateY(0); }
  54%, 100% { opacity: 0; transform: translateY(0); }
}

@keyframes fs-eta-cycle {
  0%, 50% { opacity: 0; }
  56%, 85% { opacity: 1; }
  90%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fs-report { animation: none; opacity: 1; }
  .fs-shield { animation: none; opacity: 1; transform: none; }
  .fs-eta { animation: none; opacity: 1; }

  .fs-headline { gap: 0.5em; }

  .fs-scene {
    flex-wrap: wrap;
    gap: 0.5em;
  }

  .fs-eta { position: static; flex-basis: 100%; }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 4rem;
  margin-top: 4rem;
  color: var(--ink-dim);
  font-size: 14px;
}

.footer p { margin-bottom: 0.75rem; }

.footer a { display: block; width: fit-content; }

.footer-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 96px;
}

@media (max-width: 900px) {
  /* Unwrap .content so the video can stack between logo and ABOUT */
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .content { display: contents; }

  .content > * { order: 2; }
  .logo-img { order: 0; }

  .stage {
    order: 1;
    position: static;
    margin: 0 0 2rem;
  }
}
