:root {
  --bg: #e8ecef;
  --paper: #f7f9fa;
  --ink: #13233a;
  --muted: #55657a;
  --line: #c9d1d9;
  --marker: #ffe15a;
  --teal: #1f6f63;
  --error: #b42318;

  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  color-scheme: light;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.wordmark span {
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
}

.site-nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0;
  list-style: none;
}

.site-nav a {
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
}

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

/* Buttons */

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms, color 120ms;
}

.button:hover {
  background: #22395c;
  border-color: #22395c;
}

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

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

/* Shared page typography */

.page-head {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem);
}

.page-head h1,
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.section h2 {
  max-width: 20ch;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.section-intro {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--muted);
}

/* Home hero */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) 0;
}

.hero .actions {
  margin-top: 2.25rem;
}

/* The tagged link: the hero artifact */

.tagged-link {
  margin: clamp(3.5rem, 8vw, 5.5rem) 0 0;
  padding-block: clamp(2rem, 4vw, 2.75rem) clamp(2.25rem, 5vw, 3.25rem);
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.tagged-link figcaption {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.url {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.75rem 0.2em;
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2.1vw, 1.45rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.url .base {
  color: var(--muted);
}

.param {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 100%;
}

.param mark {
  align-self: flex-start;
  padding: 0.05em 0.1em;
  position: relative;
  isolation: isolate;
  background: none;
  color: var(--ink);
}

.param mark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--marker);
  transform-origin: left center;
}

.param small {
  position: relative;
  max-width: 17rem;
  padding: 0.55rem 0 0 0.85rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.35;
}

.param small::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: -0.35rem;
  width: 0.5rem;
  height: 1.3rem;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.param small b {
  display: block;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .param mark::before {
    animation: mark 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .param small {
    animation: note 360ms ease-out both;
  }

  .param:nth-child(2) mark::before { animation-delay: 300ms; }
  .param:nth-child(3) mark::before { animation-delay: 650ms; }
  .param:nth-child(4) mark::before { animation-delay: 1000ms; }
  .param:nth-child(2) small { animation-delay: 650ms; }
  .param:nth-child(3) small { animation-delay: 1000ms; }
  .param:nth-child(4) small { animation-delay: 1350ms; }
}

@keyframes mark {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes note {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: none; }
}

/* Products list */

.products {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  list-style: none;
}

.products li {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 2fr;
  gap: 0.5rem 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.products li:last-child {
  border-bottom: 1px solid var(--line);
}

.products h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.products p {
  max-width: 34rem;
  color: var(--muted);
}

.products .connects {
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: 0.9375rem;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 700;
}

.steps h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.steps p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* Closing call to action */

.closing {
  padding-block: clamp(4rem, 10vw, 7rem);
  background: var(--ink);
  color: var(--paper);
}

.closing h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.closing p {
  max-width: 32rem;
  margin-top: 1.25rem;
  color: #b9c4d2;
}

.closing .actions {
  margin-top: 2rem;
}

.closing .button {
  background: var(--marker);
  border-color: var(--marker);
  color: var(--ink);
}

.closing .button:hover {
  background: #fff0a3;
  border-color: #fff0a3;
}

.closing :focus-visible {
  outline-color: var(--marker);
}

/* About */

.prose {
  display: grid;
  gap: 1.25rem;
  max-width: 38rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
}

.principles {
  display: grid;
  gap: 2rem;
  padding: 0;
  list-style: none;
}

.principles h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.principles p {
  max-width: 34rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

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

.facts dd {
  margin-top: 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 3rem clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 9vw, 6rem);
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.25rem;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.field.full,
.form fieldset,
.form .actions,
.form-status {
  grid-column: 1 / -1;
}

.field label,
.form legend {
  font-weight: 600;
  font-size: 0.9375rem;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 0;
  border-color: var(--ink);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  color: var(--error);
  font-size: 0.875rem;
}

.field-error:empty {
  display: none;
}

.form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.form legend {
  margin-bottom: 0.6rem;
  padding: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
}

.chip input:hover + span {
  border-color: var(--muted);
}

.chip input:checked + span {
  border-color: var(--ink);
  background: var(--marker);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.form-status {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--teal);
  background: var(--paper);
}

.form-status h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.form-status p {
  margin-top: 0.3rem;
  color: var(--muted);
}

.aside {
  display: grid;
  align-content: start;
  gap: 2rem;
  padding-top: 0.25rem;
}

.aside h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.aside p {
  margin-top: 0.35rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.closing + .site-footer {
  border-top: 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

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

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 52rem) {
  .steps,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

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

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

  .form {
    grid-template-columns: 1fr;
  }

  .param small {
    max-width: none;
  }
}
