@font-face {
  font-family: "Lexend";
  src: url("/fonts/lexend-5.3.0-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* The ground and both gradient ends are sampled from the brand mark
   (images/univiron-u-circuit-emerald-dark-v2.png in the hub repo). */
:root {
  color-scheme: dark;
  --ground: #0a0f0d;
  --ink: #e2efe8;
  --ink-soft: #8ea89c;
  --rule: #1c2824;
  --grad-a: #86f6c9;
  --grad-b: #0c7765;
  --accent: #86f6c9;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #eef4f1;
    --ink: #0b2620;
    --ink-soft: #4b675d;
    --rule: #cbdad3;
    /* The mark's mint end vanishes on a pale ground, so light mode starts deeper. */
    --grad-a: #3fd09c;
    --grad-b: #0a6655;
    --accent: #0a6655;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 330;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul {
  margin: 0;
}

a {
  color: inherit;
}

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

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

/* ---------- layout ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  row-gap: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 6vw, 6rem) clamp(1.5rem, 3vw, 2.5rem);
}

.intro {
  display: grid;
  align-content: center;
  row-gap: clamp(1.75rem, 4vw, 2.5rem);
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
}

/* 73rem is where the copy column beside the mark first clears the labs' 44rem
   container query; any earlier and the five-column row folds back to a list. */
@media (min-width: 73rem) {
  .intro {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
  }
}

/* ---------- the mark ---------- */

.mark {
  display: block;
  width: clamp(4.5rem, 18vw, 6rem);
  height: auto;
  overflow: visible;
}

@media (min-width: 73rem) {
  .mark {
    width: clamp(11rem, 19vw, 16rem);
    margin-top: 0.6rem;
  }
}

.mark-stop-a {
  stop-color: var(--grad-a);
}

.mark-stop-b {
  stop-color: var(--grad-b);
}

/* ---------- copy ---------- */

.copy {
  display: grid;
  row-gap: clamp(1.25rem, 3vw, 2rem);
  min-width: 0;
}

.wordmark {
  font-size: clamp(3.25rem, 11vw, 8.5rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
  /* Lexend's sidebearings leave the U visibly indented at display sizes. */
  margin-inline-start: -0.05em;
}

.lede {
  max-width: 30ch;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.status {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

/* ---------- the labs ---------- */

/* Each lab is a dot like the mark's own. Together the five dots walk the
   mark's gradient from its mint end to its deep end, in list order. */

.labs {
  container-type: inline-size;
  margin-block: clamp(0.75rem, 3vw, 1.75rem);
}

.lab-list {
  list-style: none;
  padding: 0;
  display: grid;
  row-gap: 1.25rem;
}

.lab-list > li:nth-child(1) { --t: 0%; }
.lab-list > li:nth-child(2) { --t: 20%; }
.lab-list > li:nth-child(3) { --t: 40%; }
.lab-list > li:nth-child(4) { --t: 60%; }
.lab-list > li:nth-child(5) { --t: 80%; }

.lab {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  grid-template-areas:
    "dot name"
    "dot line"
    "dot site";
  column-gap: 1rem;
  align-items: start;
  text-decoration: none;
}

.lab-dot {
  grid-area: dot;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--grad-a);
}

.lab-name {
  grid-area: name;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lab-line {
  grid-area: line;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.lab-site {
  grid-area: site;
  margin-top: 0.2rem;
  color: var(--accent);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a.lab:hover .lab-site,
a.lab:focus-visible .lab-site {
  text-decoration-color: currentColor;
}

/* A lab without a published site gets the dot's outline only. */
.lab.is-pending .lab-dot {
  background: none;
  border: 2px solid var(--grad-a);
}

/* Gated rather than layered: a declaration holding var() passes parsing, so an
   unsupported color-mix() would fail late and paint nothing instead of falling
   back to the flat colour above. */
@supports (color: color-mix(in oklab, red, blue)) {
  .lab-dot {
    background: linear-gradient(
      135deg,
      color-mix(in oklab, var(--grad-a), var(--grad-b) var(--t, 0%)),
      color-mix(in oklab, var(--grad-a), var(--grad-b) calc(var(--t, 0%) + 20%))
    );
  }

  .lab.is-pending .lab-dot {
    border-color: color-mix(in oklab, var(--grad-a), var(--grad-b) var(--t, 0%));
  }
}

.lab.is-pending .lab-site {
  color: var(--ink-soft);
}

@container (min-width: 44rem) {
  .lab-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .lab {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "dot"
      "name"
      "line"
      "site";
    row-gap: 0.35rem;
  }

  .lab-dot {
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 0 0.85rem;
  }
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.footer a {
  color: var(--ink);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* ---------- the one moment of motion ----------
   On load the mark's dot settles onto its stem like a tittle, and the
   labs' dots follow it, one after another. */

@media (prefers-reduced-motion: no-preference) {
  .mark-dot,
  .lab-dot {
    animation: settle 720ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
  }

  .mark-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation-delay: 150ms;
  }

  .lab-list > li:nth-child(1) .lab-dot { animation-delay: 520ms; }
  .lab-list > li:nth-child(2) .lab-dot { animation-delay: 600ms; }
  .lab-list > li:nth-child(3) .lab-dot { animation-delay: 680ms; }
  .lab-list > li:nth-child(4) .lab-dot { animation-delay: 760ms; }
  .lab-list > li:nth-child(5) .lab-dot { animation-delay: 840ms; }
}

@keyframes settle {
  0% {
    opacity: 0;
    transform: translateY(-70%);
  }
  55% {
    opacity: 1;
    transform: translateY(8%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 404 ---------- */

.text-link {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
