/* Optimux homepage. No external requests: fonts and media are served from /assets. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

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

:root {
  --paper: #eef2f8;
  /* cool page */
  --sheet: #ffffff;
  /* code box, video frame */
  --ink: #0e1a33;
  /* text */
  --muted: #4a5873;
  /* secondary text */
  --line: #cfd8e6;
  /* borders */
  --light: #5b9cf6;
  /* the light lane: Simple model */
  --heavy: #1f3fa8;
  /* the heavy lane: Complex model */
  --brand: #2f6fe4;
  /* links, main button */
  --focus: #f59e0b;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 38rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 420;
}

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

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  left: 0.5rem;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.4rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.top nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.98rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.top nav a:hover {
  color: var(--ink);
}

.top nav .nav-gh {
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding-block: 3.5rem 4.5rem;
}

h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 820;
  margin: 0 0 1.4rem;
  max-width: 14ch;
  text-wrap: balance;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.install {
  display: flex;
  align-items: stretch;
  background: var(--sheet);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  max-width: 40rem;
  overflow: hidden;
}

.install code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--ink);
  padding: 0.85rem 1rem;
  white-space: nowrap;
  overflow-x: auto;
}

.copy {
  flex: none;
  border: 0;
  border-left: 1.5px solid var(--line);
  background: transparent;
  font: 600 0.9rem var(--sans);
  color: var(--brand);
  padding: 0 1.1rem;
  cursor: pointer;
}

.copy:hover {
  background: var(--paper);
}

.copy.done {
  color: #0f7a4a;
}

.install-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.65rem 0 2rem;
  max-width: var(--measure);
}

/* The hero points down to the Install section */
.jump {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--brand);
  text-decoration: none;
  padding-block: 0.4rem;
}

.jump:hover {
  color: var(--heavy);
  text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.btn:hover {
  color: var(--ink);
  background: var(--sheet);
}

.btn-main {
  background: var(--ink);
  color: #fff;
}

.btn-main:hover {
  background: var(--heavy);
  border-color: var(--heavy);
  color: #fff;
}

/* The lanes: the one moving thing on the page */
.lanes {
  margin: 0;
}

.lanes svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.road {
  fill: none;
  stroke-linecap: round;
}

.road-in {
  stroke: var(--ink);
  stroke-width: 12;
}

.road-light {
  stroke: var(--light);
  stroke-width: 8;
}

.road-heavy {
  stroke: var(--heavy);
  stroke-width: 16;
}

.end-light {
  fill: var(--light);
}

.end-heavy {
  fill: var(--heavy);
}

.node {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 4;
}

.tag {
  font: 700 15px var(--sans);
  fill: var(--ink);
}

.tag-sub {
  font: 450 13px var(--sans);
  fill: var(--muted);
}

.dot {
  stroke: var(--paper);
  stroke-width: 3;
}

.dot-light {
  fill: #fff;
  stroke: var(--light);
}

.dot-heavy {
  fill: #fff;
  stroke: var(--heavy);
  stroke-width: 4;
}

@media (prefers-reduced-motion: reduce) {
  .traffic {
    display: none;
  }
}

/* Sections */
section h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 780;
  margin: 0 0 1.2rem;
}

.flow {
  padding-block: 3.5rem;
  border-top: 1.5px solid var(--line);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1rem;
  background: var(--sheet);
  border: 1.5px solid var(--line);
}

.steps li:nth-child(2)::before {
  background: var(--light);
  border-color: var(--light);
  color: #fff;
}

.steps h3 {
  font-size: 1.12rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.demo {
  padding-block: 3.5rem;
  border-top: 1.5px solid var(--line);
}

.demo-note {
  color: var(--muted);
  max-width: var(--measure);
  margin: -0.4rem 0 1.6rem;
}

.screen {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  background: #030712;
}

.screen video {
  width: 100%;
  height: auto;
}

.play {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  border: 0;
  cursor: pointer;
  font: 600 0.85rem var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

/* Install: the command gets the full page width */
.get {
  padding-block: 3.5rem;
  border-top: 1.5px solid var(--line);
  scroll-margin-top: 1rem;
}

.install-full {
  max-width: none;
}

/* Install: the two packages, each with its name and what it is */
.install-intro {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: var(--measure);
}

.pkg {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}

.pkg span {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

.install-note a {
  color: var(--brand);
}

.install-full code {
  font-size: 0.95rem;
  padding-block: 1rem;
}

.fit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  padding-block: 3.5rem;
  border-top: 1.5px solid var(--line);
}

.fit p {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

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

.facts li {
  padding: 0.75rem 0 0.75rem 1.4rem;
  border-bottom: 1.5px solid var(--line);
  position: relative;
}

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

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--heavy);
}

.facts li:first-child::before {
  top: calc(0.72em - 0.75rem);
}

.closing {
  padding-block: 4rem 3rem;
  border-top: 1.5px solid var(--line);
}

.beta {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 1.2rem 0 0;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1.5px solid var(--line);
}

/* Smaller screens */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-block: 2rem 3rem;
  }

  .lanes {
    max-width: 34rem;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fit {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 560px) {
  .top nav a:not(.nav-gh) {
    display: none;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .lede {
    font-size: 1.1rem;
  }
}

/* The tutorial film and its chapters */
.tour {
  padding-block: 3.5rem;
  border-top: 1.5px solid var(--line);
}

.chapters-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.6rem 0 0.7rem;
  font-weight: 700;
}

.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}

.chapters button {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: 600 0.95rem var(--sans);
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}

.chapters button:hover {
  border-color: var(--brand);
}

.chapters button[aria-current="true"] {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.chapters .t {
  font: 500 0.8rem var(--mono);
  color: var(--muted);
}

/* A key in a chapter title (the terminal client's keys) */
.chapters kbd {
  font: 500 0.82rem var(--mono);
  color: var(--heavy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .chapters {
    grid-template-columns: 1fr;
  }
}
