/* ==========================================================================
   Moose Labs — look & feel
   Lime on very dark blue. Prickly display type. Lab terms as accents.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* colour */
  --bg: #070d24;
  --bg-deep: #040817;
  --surface: #0b1431;
  --surface-2: #101b40;
  --line: #1b2853;
  --line-2: #2a3c70;
  --lime: #8cff5a; /* mint */
  --lime-rgb: 140 255 90;
  --on-lime: #070d24;
  --paper: #eaf2da;
  --muted: #94a0c4;
  --faint: #5a6690;

  /* type */
  --f-display: 'Tektur', system-ui, sans-serif;
  --w-display: 600;
  --display-vs: normal;
  --display-track: -0.03em;
  --f-body: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, monospace;

  /* layout */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --grid: 24px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgb(var(--lime-rgb) / 0.07), transparent 70%),
    linear-gradient(rgb(var(--lime-rgb) / 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--lime-rgb) / 0.028) 1px, transparent 1px);
  background-size: auto, var(--grid) var(--grid), var(--grid) var(--grid);
  color: var(--paper);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--on-lime); }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

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

.display {
  font-family: var(--f-display);
  font-weight: var(--w-display);
  font-variation-settings: var(--display-vs);
  letter-spacing: var(--display-track);
  line-height: 0.92;
  margin: 0;
}
.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lime { color: var(--lime); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--on-lime); padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* ---------- buttons & chips ---------- */
.btn {
  --cut: 10px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font: 600 12px/1 var(--f-mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--lime { background: var(--lime); color: var(--on-lime); }
.btn--ghost {
  background: rgb(var(--lime-rgb) / 0.06);
  color: var(--lime);
  box-shadow: inset 0 0 0 1px rgb(var(--lime-rgb) / 0.4);
}
.btn--ghost:hover { background: rgb(var(--lime-rgb) / 0.14); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 500 10px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.chip::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.chip--live { color: var(--lime); border-color: rgb(var(--lime-rgb) / 0.4); }
.chip--live::before { box-shadow: 0 0 0 0 rgb(var(--lime-rgb) / 0.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(var(--lime-rgb) / 0.6); }
  70% { box-shadow: 0 0 0 8px rgb(var(--lime-rgb) / 0); }
  100% { box-shadow: 0 0 0 0 rgb(var(--lime-rgb) / 0); }
}

/* Crop marks: add .crop to any box. */
.crop { position: relative; }
.crop::before, .crop::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--lime); border-style: solid; opacity: 0.8;
}
.crop::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.crop::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgb(7 13 36 / 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; flex: none; }
.brand__word {
  font-family: var(--f-display); font-weight: var(--w-display);
  font-variation-settings: var(--display-vs); letter-spacing: var(--display-track);
  font-size: 34px; line-height: 1;
}
.brand__tag { color: var(--lime); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  display: flex; align-items: baseline; gap: 6px;
  padding: 8px 12px;
  font: 500 12px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-radius: 4px;
}
.nav a span { color: var(--lime); font-size: 9px; }
.nav a:hover { color: var(--paper); background: rgb(var(--lime-rgb) / 0.06); }
.topbar .btn { padding: 11px 16px; }
@media (max-width: 960px) { .nav { display: none; } .topbar .chip { margin-left: auto; } }
@media (max-width: 520px) { .topbar .chip { display: none; } .topbar .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(78vh - 68px);
  display: flex; align-items: flex-end;
  padding: 80px 0 clamp(56px, 9vw, 120px);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero__goo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero__tag { font-size: clamp(40px, 6.4vw, 112px); line-height: 0.98; text-wrap: balance; }
.hero__tag span { display: block; }
@media (max-width: 700px) { .hero__tag span { display: inline; } }
.hero__tag em { font-style: normal; color: var(--lime); }

/* ---------- ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--bg-deep);
  overflow: hidden; white-space: nowrap;
  color: var(--muted);
}
.ticker__track { display: inline-flex; gap: 48px; padding: 14px 0; animation: ticker 40s linear infinite; }
.ticker__track span::before { content: '◆'; color: var(--lime); margin-right: 14px; font-size: 8px; vertical-align: 2px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.sec { padding: clamp(80px, 12vw, 140px) 0 0; }
.sec-head { margin-bottom: 48px; }
.sec-head__meta { display: flex; align-items: center; gap: 14px; color: var(--muted); margin-bottom: 22px; }
.sec-head__meta .tag { color: var(--on-lime); background: var(--lime); padding: 4px 8px; }
/* The lab name for each section: the theme's accent, now the headings are plain. */
.sec-head__meta .lab {
  font: var(--w-display) clamp(15px, 1.5vw, 19px)/1 var(--f-display);
  font-variation-settings: var(--display-vs);
  letter-spacing: 0.06em;
  color: var(--lime);
  text-shadow: 0 0 18px rgb(var(--lime-rgb) / 0.35);
}
.sec-head__meta .rule {
  flex: 1; height: 9px;
  background:
    linear-gradient(var(--line-2), var(--line-2)) bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 12px) bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--faint) 0 1px, transparent 1px 60px) bottom / 100% 9px no-repeat;
}
.sec-head h2 { font-size: clamp(48px, 7.5vw, 104px); max-width: 14ch; }
.sec-head p { color: var(--muted); font-size: 19px; max-width: 52ch; margin: 22px 0 0; }

.fig { display: block; margin-top: 14px; color: var(--faint); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- brands: microscope slides ---------- */
.slides { display: grid; gap: 28px; }
.slide {
  display: grid; grid-template-columns: 190px 1fr;
  min-height: 300px;
  border-radius: 6px;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.01) 40%, rgb(255 255 255 / 0.04));
  box-shadow: inset 0 0 0 1px rgb(var(--lime-rgb) / 0.22), inset 0 1px 0 rgb(255 255 255 / 0.12), 0 30px 60px -30px rgb(0 0 0 / 0.8);
  overflow: hidden;
  text-decoration: none;
}
.slide__label {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px;
  background: repeating-linear-gradient(-45deg, rgb(var(--lime-rgb) / 0.1) 0 2px, transparent 2px 7px), rgb(var(--lime-rgb) / 0.06);
  border-right: 1px solid rgb(var(--lime-rgb) / 0.22);
  color: var(--lime);
}
.slide__label strong { font: var(--w-display) 34px/1 var(--f-display); font-variation-settings: var(--display-vs); color: var(--paper); text-transform: none; letter-spacing: 0; }
.slide__glass { position: relative; display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 24px; padding: 40px 24px 18px; overflow: hidden; }
.slide__cover {
  position: absolute; width: min(70%, 420px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgb(var(--lime-rgb) / 0.25);
  background: radial-gradient(circle, rgb(var(--lime-rgb) / 0.08), transparent 65%);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slide__cover::before, .slide__cover::after {
  content: ''; position: absolute; background: rgb(var(--lime-rgb) / 0.25);
}
.slide__cover::before { left: 50%; top: -20%; bottom: -20%; width: 1px; }
.slide__cover::after { top: 50%; left: -20%; right: -20%; height: 1px; }
.slide__specimen { position: relative; font-size: clamp(64px, 11vw, 150px); color: var(--paper); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.slide__foot { position: relative; justify-self: stretch; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.slide__meta { margin: 0; max-width: 56ch; font-size: 14px; line-height: 1.5; color: var(--muted); }
.slide__note { color: var(--muted); text-align: right; white-space: nowrap; }
.slide:hover .slide__cover { transform: scale(1.12); }
.slide:hover .slide__specimen { transform: scale(1.04); }
.slide--empty { min-height: 120px; box-shadow: inset 0 0 0 1px var(--line-2); background: none; }
.slide--empty .slide__label { background: none; border-right: 1px dashed var(--line-2); color: var(--faint); }
.slide--empty .slide__glass { color: var(--faint); place-items: center start; }
@media (max-width: 700px) {
  .slide { grid-template-columns: 1fr; }
  .slide__label { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid rgb(var(--lime-rgb) / 0.22); }
  .slide__label strong { font-size: 24px; }
  .slide__foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .slide--empty .slide__label { border-bottom: 1px dashed var(--line-2); }
}

/* ---------- services: periodic table ---------- */
.table { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.el {
  position: relative; display: flex; flex-direction: column;
  min-height: 300px; padding: 18px;
  background: var(--bg);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.el__top { display: flex; justify-content: space-between; color: var(--muted); }
.el__sym {
  margin: 28px 0 8px;
  font: var(--w-display) clamp(84px, 9vw, 128px)/0.8 var(--f-display);
  font-variation-settings: var(--display-vs);
  color: var(--lime);
}
.el__name { font-weight: 700; font-size: 20px; }
.el p { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.el__shell { margin-top: auto; padding-top: 18px; display: flex; gap: 4px; }
.el__shell i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--lime); }
.el__shell i.on { background: var(--lime); }
.el:hover { background: var(--lime); color: var(--on-lime); }
.el:hover .el__sym, .el:hover .el__top, .el:hover p { color: var(--on-lime); }
.el:hover .el__shell i { border-color: var(--on-lime); }
.el:hover .el__shell i.on { background: var(--on-lime); }
.el--unknown .el__sym { color: transparent; -webkit-text-stroke: 1.5px var(--lime); }
.el--unknown:hover .el__sym { -webkit-text-stroke-color: var(--on-lime); }
@media (max-width: 1100px) { .table { grid-template-columns: repeat(2, 1fr); } .el--unknown { grid-column: 1 / -1; min-height: 0; } }
@media (max-width: 520px) { .table { grid-template-columns: 1fr; } .el { min-height: 0; } }

/* ---------- people: field guide ---------- */
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.field {
  display: grid; grid-template-columns: minmax(180px, 0.9fr) 1.1fr;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.field__photo {
  position: relative; min-height: 380px; overflow: hidden;
  border-right: 1px solid var(--line-2);
  background: var(--bg-deep);
}
/* Placeholder halftone. Real photos use .duotone (navy tint is baked into the image). */
.halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgb(var(--lime-rgb) / 0.75) 1.4px, transparent 1.6px);
  background-size: 8px 8px;
  -webkit-mask-image: radial-gradient(ellipse 38% 30% at 50% 36%, #000 60%, transparent 62%), radial-gradient(ellipse 60% 40% at 50% 100%, #000 60%, transparent 62%);
  mask-image: radial-gradient(ellipse 38% 30% at 50% 36%, #000 60%, transparent 62%), radial-gradient(ellipse 60% 40% at 50% 100%, #000 60%, transparent 62%);
  opacity: 0.55;
}
.duotone { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.field__photo .ruler {
  position: absolute; top: 0; bottom: 0; right: 0; width: 22px;
  background:
    repeating-linear-gradient(to bottom, var(--lime) 0 1px, transparent 1px 10px) right / 6px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--lime) 0 1px, transparent 1px 50px) right / 14px 100% no-repeat;
  opacity: 0.6;
}
.field__photo .mono { position: absolute; left: 14px; top: 14px; padding: 4px 7px; background: rgb(4 8 23 / 0.8); color: var(--lime); }
.field__body { padding: 22px 24px; display: flex; flex-direction: column; }
.field__body > .mono { color: var(--muted); }
.field__tag { margin: 12px 0 0; color: var(--paper); line-height: 1.6; }
.field__name {
  margin: 18px 0 0;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--lime);
}
.field dl { margin: auto 0 0; padding-top: 28px; display: grid; grid-template-columns: auto 1fr; }
.field dt, .field dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line-2); }
.field dt { color: var(--muted); padding-right: 18px; }
.field dd { color: var(--paper); }
@media (max-width: 1100px) { .field-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .field { grid-template-columns: 1fr; }
  .field__photo { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line-2); }
}

/* ---------- products: experiments ---------- */
.experiments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.exp {
  display: flex; flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(to bottom, var(--surface), var(--bg));
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.exp:hover { border-color: rgb(var(--lime-rgb) / 0.6); transform: translateY(-4px); }
.exp__top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.exp h3 { font-size: clamp(54px, 5.5vw, 76px); margin: 36px 0 10px; }
.exp p { color: var(--muted); margin: 0 0 28px; }
.scope {
  margin-top: auto; width: 100%; height: 90px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 22.5px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 30px 100%,
    var(--bg-deep);
}
.scope path { fill: none; stroke: var(--lime); stroke-width: 1.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgb(var(--lime-rgb) / 0.6)); }
.exp__foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; color: var(--faint); }
.exp__foot span:last-child { white-space: nowrap; }
@media (max-width: 1000px) { .experiments { grid-template-columns: 1fr; } .exp h3 { margin-top: 24px; } }

/* ---------- footer ---------- */
.foot { margin-top: clamp(100px, 14vw, 180px); border-top: 1px solid var(--line); background: var(--bg-deep); }
.foot__big { padding: 72px 0 56px; }
.foot__big .mono { color: var(--lime); }
.foot__big a {
  display: inline-block; margin-top: 18px;
  font-size: clamp(30px, 9.5vw, 150px);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 4px no-repeat;
  transition: background-size 0.4s ease, color 0.2s ease;
}
.foot__big a:hover { color: var(--lime); background-size: 100% 4px; }
.foot__row {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px 40px;
  padding: 28px 0 32px; border-top: 1px solid var(--line); color: var(--muted);
}
.foot__co { flex: 1 1 380px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.foot__co p, .foot__co address { margin: 0; font-style: normal; }
.foot__co-name { color: var(--paper); font-weight: 600; font-size: 15px; }
.foot__co a { color: var(--paper); text-decoration-color: rgb(var(--lime-rgb) / 0.5); text-underline-offset: 3px; }
.foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot__links a { color: var(--lime); text-decoration: none; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 20px 0 36px; border-top: 1px solid var(--line); color: var(--faint);
}
.foot__base p { margin: 0; }
.field dd a { color: var(--lime); text-decoration: none; }
.field dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.element {
  display: grid; grid-template-columns: auto auto; gap: 0 10px;
  width: 92px; padding: 8px 10px;
  border: 1px solid var(--lime);
  color: var(--lime);
}
.element .n { grid-column: 1 / -1; font-size: 10px; }
/* Mono so the lowercase l in "Ml" can't be misread as an I. */
.element .sym { grid-column: 1 / -1; text-transform: none; font: 600 32px/1.15 var(--f-mono); letter-spacing: -0.04em; color: var(--paper); }
.element .nm { grid-column: 1 / -1; font-size: 8px; }

/* ---------- analytics notice ---------- */
.foot__cookie {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: inherit; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--line-2);
}
.foot__cookie:hover { color: var(--lime); }

/* A small card in the corner. It never covers the page or blocks scrolling. */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
  font-size: 14px; line-height: 1.5;
}
.cookie[hidden] { display: none; }
.cookie__title { margin: 0 0 8px; color: var(--lime); }
.cookie__text { margin: 0; color: var(--paper); }
.cookie__state { display: block; margin-top: 6px; color: var(--muted); }
.cookie__state:empty { display: none; }
.cookie__more { margin-top: 10px; color: var(--muted); font-size: 13px; }
.cookie__more summary { cursor: pointer; color: var(--lime); font: 500 11px/1.6 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.cookie__more ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.cookie__more strong { color: var(--paper); font-weight: 600; }
.cookie__more code { font: 12px var(--f-mono); color: var(--paper); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cookie .btn { padding: 11px 16px; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticker__track, .chip--live::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

