/* Echtlab's public site. Palette from the bench, as in the app: membrane white, Coomassie blue,
   Ponceau red, and the navy the films are set on. Fonts are served from this site, not a third party. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --membrane: #edf1f2;
  --sheet: #ffffff;
  --ink: #16202b;
  --ink-soft: #4d5b69;
  --rule: #d2dade;
  --coomassie: #1e4e9e;
  --ponceau: #c4325c;
  --stage: #07182e;
  --stage-rule: #24426b;
  --stage-ink: #e3ebf5;
  --stage-soft: #9db2cc;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 62ch;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--membrane);
  color: var(--ink);
  font-family: var(--text);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 700;
  font-stretch: 88%;
}

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

:focus-visible {
  outline: 3px solid var(--ponceau);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -100vw;
  top: 0.5rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--sheet);
  color: var(--ink);
}

.skip:focus {
  left: 0.5rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 85%;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.3rem;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-weight: 600;
  text-decoration: none;
}

.button.primary {
  border-color: var(--ponceau);
  background: var(--ponceau);
  color: #fff;
}

.button.primary:hover {
  background: #a82a4e;
  border-color: #a82a4e;
}

.button.quiet:hover {
  background: rgb(255 255 255 / 0.08);
}

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

/* The navy stage: hero, library and contact */

.stage {
  background: var(--stage);
  color: var(--stage-ink);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: 1.25rem var(--gutter) clamp(2.5rem, 7vh, 5rem);
  overflow: hidden;
}

.bar {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.signin {
  padding: 0.5rem 0;
  font-weight: 600;
}

/* A gel ladder: the row of reference bands every blot is read against. */

.ladder {
  order: 1;
  flex: 1;
  min-height: 11rem;
  margin: 1.75rem 0 clamp(1.75rem, 5vh, 3.5rem);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(0.6rem, 2.4vw, 2.25rem);
}

.lane {
  position: relative;
  border-top: 2px solid var(--stage-rule);
}

.lane span {
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(5px, 1.1vh, 11px);
  border-radius: 2px;
  background: var(--stage-ink);
  opacity: var(--o, 0.6);
  filter: blur(0.6px);
}

.ladder .lane:first-child span,
.ladder .lane:last-child span {
  background: var(--stage-soft);
}

.ladder .lane:nth-child(4) span:first-child {
  background: var(--ponceau);
  --o: 1;
}

/* The one piece of motion on the page: the blot develops once, as it would on film. */
@media (prefers-reduced-motion: no-preference) {
  .ladder .lane span {
    animation: develop 1.4s ease-out both;
    animation-delay: var(--d, 0ms);
  }

  @keyframes develop {
    from {
      opacity: 0;
      filter: blur(5px);
    }
  }
}

.hero-text {
  order: 2;
}

.hero h1 {
  max-width: 27ch;
  font-size: clamp(2.1rem, 5.4vw, 4.6rem);
  font-weight: 700;
  font-stretch: 84%;
  line-height: 1;
  letter-spacing: -0.015em;
}

.foot {
  order: 3;
  margin-top: clamp(2rem, 6vh, 4rem);
  color: var(--stage-soft);
  font-size: 0.9375rem;
}
