@font-face {
  font-family: "Anybody";
  src: url("/assets/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --lagoon: #0f6f7e;
  --deep: #083d46;
  --sky: #58bfd6;
  --marigold: #ffc666;
  --frost: #eff7f7;
  --white: #ffffff;
  --ink: #083d46;
  --muted: #3d6169;
  --line: #c9dfe1;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Anybody", "Arial Black", sans-serif;
  --text: "Schibsted Grotesk", system-ui, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

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

.on-frost :focus-visible {
  outline-color: var(--lagoon);
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.1vw, 4.6rem);
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.9rem, 3.7vw, 3.1rem);
  font-stretch: 112%;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0;
}

.wrap {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 2;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

/* Header and hero */

.hero {
  background: var(--lagoon);
  color: var(--white);
  padding-bottom: clamp(36px, 5vw, 64px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-stretch: 112%;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(28px, 3.6vw, 48px) clamp(28px, 3.4vw, 40px);
}

.nowrap {
  white-space: nowrap;
}

.lede {
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.5;
}

.actions {
  margin-top: 22px;
}

.button {
  display: inline-block;
  padding: 14px 24px;
  background: var(--marigold);
  color: var(--deep);
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: #ffd488;
}

.fineprint {
  margin-top: 12px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* The batch, drawn to scale. Tile area matches file size. */

.map {
  position: relative;
  aspect-ratio: 5 / 2;
  border-radius: 14px;
  background: var(--deep);
}

.map-layer {
  position: absolute;
  inset: 0;
}

.tile {
  position: absolute;
  padding: 2px;
}

.tile-in {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: clamp(6px, 1vw, 14px);
  border-radius: 8px;
  container-type: size;
  font-size: 0.875rem;
  line-height: 1.25;
}

.tile-name,
.tile-size {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tile-size {
  font-weight: 700;
}

.map-before .tile-in {
  border: 1px solid rgb(255 255 255 / 28%);
  color: var(--white);
}

.map-output .tile-in {
  border: 0;
  color: var(--deep);
}

.map-output .tone-m .tile-in {
  background: var(--marigold);
}

.map-output .tone-s .tile-in {
  background: var(--sky);
}

.map-output .tone-d .tile-in {
  background: var(--lagoon);
  color: var(--white);
}

@container (max-width: 112px) {
  .tile-name {
    display: none;
  }
}

@container (max-height: 46px) {
  .tile-name {
    display: none;
  }
}

@container (max-width: 44px) {
  .tile-size {
    display: none;
  }
}

/* sqrt(927 KB / 78.7 MB) = 0.1085, so the shrunken map has the true area. */
.map-output {
  transform: scale(0.1085);
  transform-origin: calc(100% - 10px) calc(100% - 10px);
}

/* With scripting, the batch waits at full size until it scrolls into view. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .map:not(.is-playing) .map-output {
    transform: scale(1);
  }

  .map:not(.is-playing) .map-before {
    opacity: 0;
  }
}

.map.is-playing .map-output {
  animation: shrink 1.3s cubic-bezier(0.72, 0, 0.18, 1) 0.8s both;
}

.map.is-playing .map-before {
  animation: appear 0.5s ease 1.4s both;
}

@keyframes shrink {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.1085);
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.batch {
  margin: 0;
}

.map-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
  margin-top: 14px;
  font-size: 1rem;
}

.map-caption strong {
  font-weight: 700;
}

.map-caption button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* Page sections */

.section {
  padding-block: clamp(56px, 8vw, 112px);
}

.section-white {
  background: var(--white);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px clamp(32px, 6vw, 88px);
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p {
  max-width: 36rem;
  color: var(--muted);
}

.shot {
  border-radius: 14px;
}

.compare {
  width: 100%;
  margin-top: clamp(32px, 5vw, 56px);
  border-collapse: collapse;
  font-size: 1.0625rem;
}

.compare th,
.compare td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
  overflow-wrap: anywhere;
}

.compare thead th {
  color: var(--muted);
  font-weight: 400;
}

.compare tbody th {
  font-weight: 700;
}

.compare td:last-child {
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: clamp(32px, 6vw, 88px);
}

.split p {
  max-width: 34rem;
  margin-top: 18px;
  color: var(--muted);
}

.code {
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  overflow-x: auto;
  background: var(--deep);
  color: var(--white);
  border-radius: 14px;
  font: 400 0.9375rem/1.65 var(--code);
  tab-size: 2;
}

.code b {
  color: var(--marigold);
  font-weight: 400;
}

.sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 0;
}

.sizes dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.sizes dd {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-stretch: 112%;
  font-weight: 800;
  line-height: 1.2;
}

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(26px, 3.5vw, 44px) clamp(32px, 6vw, 88px);
}

.promises p {
  margin-top: 6px;
  color: var(--muted);
}

.formats {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
}

.formats th,
.formats td {
  padding: 14px 20px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}

.formats thead th {
  color: var(--muted);
  font-weight: 400;
}

.formats tbody th {
  width: 7rem;
  font-weight: 700;
}

.notes {
  margin: 24px 0 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.notes li + li {
  margin-top: 4px;
}

/* Install */

.install {
  background: var(--deep);
  color: var(--white);
}

.install .split p {
  color: var(--white);
}

.brew {
  position: relative;
}

.brew .code {
  padding-right: 88px;
  background: #0b4f5a;
}

.copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--marigold);
  color: var(--deep);
  font: 700 0.875rem/1.2 var(--text);
  cursor: pointer;
}

.install-other {
  margin-top: 18px;
  font-size: 1rem;
}

/* Footer */

.footer {
  padding-block: 28px;
  background: var(--deep);
  color: var(--white);
  border-top: 1px solid rgb(255 255 255 / 18%);
  font-size: 0.9375rem;
}

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

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Plain pages */

.plain-head {
  background: var(--lagoon);
  color: var(--white);
}

.prose {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter);
}

.prose h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

.prose h2 {
  margin-top: 36px;
  font-size: 1.5rem;
  font-stretch: 105%;
}

.prose p,
.prose ul {
  margin: 12px 0 0;
}

.prose .updated {
  margin-top: 10px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-copy,
  .section-head,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .map {
    aspect-ratio: 1 / 1;
  }

  .tile-in {
    border-radius: 6px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 460px) {
  .nav-links li:first-child {
    display: none;
  }

  .compare {
    font-size: 0.9375rem;
  }

  .compare th,
  .compare td {
    padding-right: 10px;
  }
}

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

  .map.is-playing .map-output,
  .map.is-playing .map-before {
    animation: none;
  }

  .replay {
    display: none;
  }
}
