@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* The theme: the only place colors, faces and sizes are set. */
:root {
  --paper: #e9ede8;
  --ink: #16201b;
  --ink-soft: #47554d;
  --rule: #c3cbc4;
  --screen: #0c110e;
  --screen-text: #dfe7e1;
  --screen-soft: #a3b1a8;
  --screen-edge: #2c3631;
  --signal: #1c6b42;
  --phosphor: #5bd68e;

  --font-text: "Inter Variable", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* 1.25 scale from 17px */
  --size-s: 0.882rem;
  --size-m: 1.0625rem;
  --size-l: 1.328rem;
  --size-xl: 1.66rem;
  --size-xxl: 2.075rem;
  --size-hero: clamp(2.6rem, 7.2vw, 5.5rem);

  --measure: 64ch;
  --page: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --rail: 15rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--size-m);
  line-height: 1.55;
  font-optical-sizing: auto;
  caret-color: var(--ink);
}

::selection {
  background: var(--phosphor);
  color: var(--screen);
}

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

a {
  color: var(--signal);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

h2 {
  font-size: var(--size-xl);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--size-l);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p,
ul,
ol,
dl {
  margin: 0;
  max-width: var(--measure);
}

p + p,
p + ul,
ul + p,
p + pre,
pre + p {
  margin-top: 1em;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  margin: 0;
  max-width: var(--measure);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: var(--screen);
  color: var(--screen-text);
  border-radius: 6px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre .prompt {
  color: var(--screen-soft);
  user-select: none;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 0.5rem;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header and footer, the same block on every page */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand img {
  height: 24px;
  width: auto;
  /* the wordmark file is white; this turns it to ink */
  filter: brightness(0);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--size-s);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--ink-soft);
}

/* Screen: wherever BAUD is shown, the page turns into its screen */

.screen {
  background: var(--screen);
  color: var(--screen-text);
}

.screen a {
  color: var(--phosphor);
}

.screen :focus-visible {
  outline-color: var(--phosphor);
}

.hero {
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 25rem);
  gap: 3rem;
  align-items: end;
  padding-top: clamp(3rem, 8vw, 6rem);
}

.hero-text {
  align-self: center;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero h1 {
  font-size: var(--size-hero);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 650;
  max-width: 11ch;
}

.hero .lede {
  margin-top: 1.5rem;
  font-size: var(--size-l);
  line-height: 1.45;
  color: var(--screen-soft);
  max-width: 34ch;
}

/* The phone shot runs off the bottom edge of the band. */
.hero-shot {
  margin: 0;
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 760 / 1100;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--screen-edge);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--signal);
}

.screen .button {
  background: var(--phosphor);
  color: var(--screen);
}

.screen .button:hover {
  background: var(--screen-text);
}

/* Sections on paper: heading in the left rail, text on the right */

.band .wrap {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--rule);
}

.band .wrap > * {
  min-width: 0;
}

.band:last-of-type .wrap {
  border-bottom: 0;
}

.band h2 {
  font-size: var(--size-l);
  line-height: 1.25;
}

.band .note {
  color: var(--ink-soft);
  font-size: var(--size-s);
  margin-top: 0.5rem;
}

.uses {
  display: grid;
  gap: 2.25rem;
  padding: 0;
  list-style: none;
}

.uses h3 {
  font-size: var(--size-xl);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 24ch;
}

.uses p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

/* The wire: places AIPass can live, joined by one line to the phone */

.wire {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
  max-width: none;
}

.wire li {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.wire li:not(:last-child)::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  margin: 0 0.6rem;
  background: var(--ink);
}

.wire .end {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

.wire li:nth-last-child(2)::after {
  height: 3px;
}

/* BAUD strip on Home */

.strip .wrap {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.strip img {
  width: 100%;
  max-width: 54rem;
  border-radius: 10px;
}

.strip h2 {
  font-size: var(--size-l);
}

.strip p {
  margin-top: 1.5rem;
  color: var(--screen-soft);
}

.strip p a {
  font-weight: 600;
}

/* Direction: four lines, set apart from what exists today */

.direction {
  padding: 0;
  list-style: none;
  border-left: 3px solid var(--rule);
}

.direction li {
  padding: 0.35rem 0 0.35rem 1.25rem;
}

/* FAQ */

.faq details {
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1;
  transition: transform 150ms ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--ink-soft);
}

/* Inner pages */

.page-head .wrap {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.page-head .lede {
  margin-top: 1rem;
  font-size: var(--size-l);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 44ch;
}

.steps {
  padding-left: 1.4rem;
}

.steps li + li {
  margin-top: 1.5rem;
}

.steps li::marker {
  font-weight: 600;
}

.steps pre {
  margin-top: 0.6rem;
}

.plain {
  padding-left: 1.2rem;
}

.plain li + li {
  margin-top: 0.4rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
  max-width: 54rem;
}

.shots figure,
.shots-wide {
  margin: 0;
}

.shots-wide {
  max-width: 54rem;
}

.shots-wide img {
  border-radius: 10px;
}

.shots img {
  border-radius: 18px;
  border: 1px solid var(--screen-edge);
}

.shots figcaption,
.shots-wide figcaption {
  margin-top: 0.75rem;
  font-size: var(--size-s);
  color: var(--screen-soft);
}

.gallery .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.links {
  padding: 0;
  list-style: none;
}

.links li + li {
  margin-top: 0.6rem;
}

.links a {
  font-weight: 600;
}

.links span {
  display: block;
  color: var(--ink-soft);
}

@media (max-width: 52rem) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-text {
    padding-bottom: 2.5rem;
  }

  .hero-shot {
    width: min(20rem, 85%);
  }

  .hero-shot img {
    aspect-ratio: 760 / 820;
  }

  .wire {
    flex-direction: column;
    gap: 0;
    border-left: 1px solid var(--ink);
    padding-left: 1rem;
  }

  .wire li {
    padding: 0.2rem 0;
  }

  .wire li:not(:last-child)::after {
    display: none;
  }

  .band .wrap {
    grid-template-columns: 1fr;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
