@import url("fonts.css");

/* ------------------------------------------------------------------
   GS Laboratory — original marketing site styles
   Paper, ink, and a single copper accent. No template grid of cards
   with drop shadows. Editorial, like a journal printed on warm stock.
   ------------------------------------------------------------------ */

:root {
  --ink: #14181c;
  --ink-soft: #2a3138;
  --muted: #4e565e;
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --cream: #faf8f3;
  --rule: #d5cfc3;
  --rule-strong: #b9b2a4;
  --accent: #8a3b1c;
  --accent-hover: #6e2d14;
  --accent-on-ink: #e0a080;
  --on-ink: #f3efe6;
  --on-ink-muted: #c9c2b5;
  --focus: #8a3b1c;

  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --t-display: clamp(2.55rem, 1.15rem + 4.4vw, 5.15rem);
  --t-xl: clamp(1.85rem, 1.05rem + 2.1vw, 3.05rem);
  --t-lg: clamp(1.4rem, 1.05rem + 1.1vw, 2rem);
  --t-md: 1.25rem;
  --t-body: 1.0625rem;
  --t-sm: 0.875rem;
  --t-xs: 0.75rem;

  --leading-display: 0.95;
  --leading-body: 1.6;
  --measure: 38rem;
  --wide: 72rem;
  --gutter: clamp(1.25rem, 4.2vw, 3.75rem);
  --header-h: 4.35rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --photo-filter: saturate(0.9) contrast(1.04);
}

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

html {
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

img { filter: var(--photo-filter); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--accent-hover); }

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

::selection {
  background: #e8cfc2;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -6rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.55rem 0.9rem;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* Layout ---------------------------------------------------------- */

.wrap {
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.measure { max-width: var(--measure); }

.page-main { min-height: 60vh; }

/* Type ------------------------------------------------------------ */

.kicker {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

h1, h2, h3, .display {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

h1, .display {
  font-size: var(--t-display);
  line-height: var(--leading-display);
  font-weight: 600;
  color: var(--ink);
}

h2 {
  font-size: var(--t-xl);
  line-height: 1.1;
}

h3 {
  font-size: var(--t-lg);
  line-height: 1.2;
}

.lead {
  font-size: clamp(1.08rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

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

.fine {
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.55;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin-inline: auto;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  width: 2.05rem;
  height: 2.05rem;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand-mark .peak { stroke: var(--accent); }

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--rule);
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 2px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-lines {
  display: block;
  width: 1.05rem;
  height: 0.7rem;
  position: relative;
}

.nav-toggle-lines span,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle-lines span { top: 50%; transform: translateY(-50%); }
.nav-toggle-lines::before { top: 0; }
.nav-toggle-lines::after { bottom: 0; }

.site-header.is-open .nav-toggle-lines span { opacity: 0; }
.site-header.is-open .nav-toggle-lines::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
.site-header.is-open .nav-toggle-lines::after { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.site-nav ul {
  display: flex;
  gap: 0.15rem 1.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  border-radius: 1px;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn-ghost:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-on-dark {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.btn-on-dark:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

/* Hero ------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.92fr) minmax(20rem, 1.18fr);
  min-height: min(48rem, calc(100svh - var(--header-h)));
  background: var(--paper);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 5.5rem);
  padding-right: clamp(1.5rem, 3vw, 3.25rem);
  max-width: 40rem;
  margin-left: auto;
  width: 100%;
}

.hero-copy h1 { margin-bottom: 1.25rem; }

.hero-visual {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  background-color: #1a2228;
  background-image: url("../assets/images/hplc-autosampler.jpg");
  background-size: cover;
  background-position: center;
}

.hero-visual picture {
  display: contents;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: var(--photo-filter);
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 1rem 0.85rem;
  background: linear-gradient(to top, rgba(12, 16, 20, 0.72), rgba(12, 16, 20, 0));
  color: var(--on-ink);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-caption span { color: var(--accent-on-ink); margin-right: 0.55rem; }

/* Sections -------------------------------------------------------- */

.section {
  padding: clamp(3.5rem, 7vw, 7rem) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(16rem, 1fr);
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  align-items: end;
}

.section-head .kicker { margin-bottom: 0.5rem; }

.section-head h2 { max-width: 16ch; }

.section-intro {
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0;
}

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

.section-ink h2,
.section-ink h3 { color: var(--on-ink); }

.section-ink .kicker { color: var(--accent-on-ink); }

.section-ink .muted,
.section-ink .section-intro,
.section-ink .fine { color: var(--on-ink-muted); }

.section-ink a { color: var(--accent-on-ink); }
.section-ink a:hover { color: var(--on-ink); }

.section-paper-2 { background: var(--paper-2); }

/* Process steps (home + process page) ----------------------------- */

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.step {
  padding: 1.5rem 1.35rem 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.step + .step { padding-left: 1.35rem; border-left: 1px solid var(--rule); }

.step-num {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 0.85rem;
  letter-spacing: 0.04em;
}

.step h3 {
  font-size: 1.45rem;
  margin-bottom: 0.65rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--t-sm);
  max-width: 28rem;
}

/* Featured tests -------------------------------------------------- */

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.test-card {
  padding: 1.6rem 1.5rem 1.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.test-card + .test-card {
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule);
}

.test-method {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.55rem;
}

.test-card h3 { margin-bottom: 0.7rem; }

.test-card p {
  margin: 0;
  color: var(--ink-soft);
}

.more-tests {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.more-tests a { color: var(--accent); }

/* Figures --------------------------------------------------------- */

.figure { margin: 0; }

.figure picture {
  display: block;
  width: 100%;
}

.figure img,
.figure picture img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.figcaption {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.figcaption .fn {
  color: var(--accent);
  flex: 0 0 auto;
}

/* Report teaser --------------------------------------------------- */

.report-teaser {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.example-badge {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  margin-bottom: 1rem;
}

.coa-mini {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.4rem 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(20, 24, 28, 0.35);
}

.coa-mini::before {
  content: "EXAMPLE — not a test result";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: rgba(138, 59, 28, 0.13);
  transform: rotate(-18deg);
  pointer-events: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.15;
}

.coa-mini-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
}

.coa-mini-top strong {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.coa-mini table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  position: relative;
}

.coa-mini th,
.coa-mini td {
  text-align: left;
  padding: 0.4rem 0.4rem 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.coa-mini th { color: var(--muted); font-weight: 500; width: 42%; }

/* Inner page header ----------------------------------------------- */

.page-hero {
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2.2rem, 4vw, 3.25rem);
}

.page-hero h1 { max-width: 16ch; }

.page-hero .lead { margin-top: 1.25rem; }

/* Testing catalogue ----------------------------------------------- */

.family {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--rule);
}

.family-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  align-items: baseline;
  margin-bottom: 2rem;
  max-width: 48rem;
}

.family-index {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.8;
  color: var(--accent);
  font-weight: 500;
}

.family-head p { margin: 0.6rem 0 0; color: var(--ink-soft); }

.test-row {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(18rem, 1.1fr);
  gap: 1rem 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.test-row:last-child { border-bottom: 1px solid var(--rule); }

.test-row h3 { font-size: 1.55rem; }

.test-row .q {
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 0.45rem;
}

.test-row p { margin: 0; color: var(--ink-soft); }

/* Process narrative ----------------------------------------------- */

.story {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.story:nth-child(even) .story-photo { grid-column: 2; }
.story:nth-child(even) .story-copy { grid-column: 1; grid-row: 1; }

.story-copy .step-num { margin-bottom: 0.5rem; }

.story-copy h2 { font-size: var(--t-lg); margin-bottom: 0.8rem; }

.story-copy p { margin: 0; color: var(--ink-soft); max-width: 32rem; }

.story-photo,
.story-photo picture {
  display: block;
  width: 100%;
  min-width: 0;
}

.story-photo img,
.story-photo picture img {
  display: block;
  width: 100%;
  height: 22rem;
  object-fit: cover;
  object-position: center;
}

.note-box {
  border: 1px solid var(--rule);
  background: var(--cream);
  padding: 1.5rem 1.5rem 1.4rem;
  max-width: 46rem;
}

.note-box h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }

.note-box p { margin: 0 0 0.8rem; color: var(--ink-soft); }
.note-box p:last-child { margin-bottom: 0; }

/* Sample COA ------------------------------------------------------ */

.coa-page {
  background: #d9d2c4;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.coa-banner {
  background: var(--accent);
  color: #fff8f3;
  text-align: center;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
}

.coa-sheet {
  width: min(52rem, 100%);
  margin: 1.25rem auto 0;
  background: #fbf8f2;
  color: var(--ink);
  border: 1px solid #cfc7b8;
  box-shadow: 0 30px 60px -36px rgba(20, 24, 28, 0.55);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.coa-watermark {
  position: absolute;
  inset: 12% 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 500;
  color: rgba(138, 59, 28, 0.1);
  transform: rotate(-22deg);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.coa-inner {
  position: relative;
  z-index: 2;
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.2rem, 3.2vw, 2.6rem) 1.6rem;
}

.coa-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}

.coa-letterhead .brand-name { font-size: 1.6rem; }

.coa-doc-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 500;
  margin: 1.1rem 0 0.15rem;
}

.coa-subtitle {
  margin: 0 0 1.2rem;
  font-size: var(--t-sm);
  color: var(--accent);
  font-weight: 500;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 2rem;
  margin: 0 0 1.5rem;
  font-size: var(--t-sm);
}

.meta-grid div {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.meta-grid dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.meta-grid dd { margin: 0; }

.coa-section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0.4rem 0 0.7rem;
  font-weight: 500;
}

.results {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  margin-bottom: 1.4rem;
}

.results th,
.results td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.results thead th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}

.results .flag {
  font-weight: 500;
  white-space: nowrap;
}

.not-tested { color: var(--muted); font-style: italic; }

.coa-notes p {
  margin: 0 0 0.65rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.coa-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.75rem;
  padding-top: 0.5rem;
}

.sign-line {
  border-top: 1px solid var(--ink);
  padding-top: 0.45rem;
  font-size: var(--t-sm);
}

.sign-line strong { display: block; font-weight: 500; }
.sign-line span { color: var(--muted); font-size: 0.8rem; }

.chrom {
  margin: 1.2rem 0 0.4rem;
  background: #f4efe6;
  border: 1px solid var(--rule);
  padding: 0.9rem 0.9rem 0.6rem;
}

.chrom svg { width: 100%; height: auto; }

.chrom-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.4rem;
}

/* Contact --------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(18rem, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.placeholder-note {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.3rem;
  margin: 1.25rem 0 0;
}

.placeholder-note p { margin: 0 0 0.7rem; }
.placeholder-note p:last-child { margin-bottom: 0; }

.enquire {
  display: grid;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--rule-strong);
  border-radius: 1px;
  padding: 0.7rem 0.75rem;
  color: var(--ink);
}

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

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

.form-note {
  font-size: var(--t-sm);
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.form-status {
  margin: 0.4rem 0 0;
  font-size: var(--t-sm);
  color: var(--accent);
}

/* Footer ---------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.4fr;
  gap: 2rem 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(243, 239, 230, 0.12);
}

.site-footer .brand-name { color: var(--on-ink); font-size: 1.5rem; }

.site-footer a { color: var(--accent-on-ink); }

.site-footer a:hover { color: var(--on-ink); }

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--on-ink);
  font-size: var(--t-sm);
}

.footer-nav a:hover { color: var(--accent-on-ink); }

.disclaimer {
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0;
  max-width: 38rem;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  font-size: 0.78rem;
}

/* Motion ---------------------------------------------------------- */

/* Content is visible immediately. A short, optional rise is applied
   only after a class is added; reduced-motion users see no movement. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1,
  .hero-copy .lead,
  .hero-copy .btn-row,
  .hero-copy .kicker {
    animation: rise 0.7s var(--ease) both;
  }
  .hero-copy .lead { animation-delay: 0.08s; }
  .hero-copy .btn-row { animation-delay: 0.14s; }
}

@keyframes rise {
  from { opacity: 0.7; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    max-width: none;
    margin: 0;
    padding: 2.4rem var(--gutter) 2rem;
  }

  .hero-visual {
    min-height: 0;
    aspect-ratio: 16 / 11;
  }

  .section-head,
  .test-grid,
  .report-teaser,
  .test-row,
  .story,
  .contact-grid,
  .footer-grid,
  .coa-sign,
  .meta-grid,
  .family-head {
    grid-template-columns: 1fr;
  }

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

  .step:nth-child(odd) { padding-left: 0; border-left: 0; }

  .step:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--rule); }

  .test-card + .test-card { padding-left: 0; border-left: 0; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.1rem;
  }

  .site-header.is-open .site-nav { display: block; }

  .site-nav ul { flex-direction: column; gap: 0; }

  .site-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }

  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 3px 0 0 var(--accent); padding-left: 0.7rem; }

  .story:nth-child(even) .story-photo,
  .story:nth-child(even) .story-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .story-photo img,
  .story-photo picture img { height: 16rem; }

  .meta-grid div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 620px) {
  .step-grid { grid-template-columns: 1fr; }

  .step,
  .step + .step,
  .step:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  h1, .display { font-size: clamp(2.15rem, 9vw, 3.1rem); }

  .hero-visual { aspect-ratio: 4 / 3; }
}

/* Print (especially the example COA) ------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .nav-toggle,
  .btn,
  .page-hero,
  .coa-intro { display: none !important; }

  body, .coa-page { background: white; }

  .coa-sheet {
    box-shadow: none;
    border: 1px solid #bbb;
    width: 100%;
    margin: 0;
  }

  .coa-banner { color: #000; background: none; border: 2px solid #8a3b1c; }

  a { text-decoration: none; color: inherit; }
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Library, model reports, ingredient lists ------------------------- */

img.plain,
img.qr,
.vial-panel img,
.lib-thumb,
.placeholder-vial {
  filter: none;
}

.lib-intro {
  margin: 0 0 2rem;
}

.lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 2.25rem;
}

.lib-toolbar label {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.lib-toolbar input[type="search"] {
  width: min(26rem, 100%);
  background: var(--cream);
  border: 1px solid var(--rule-strong);
  border-radius: 1px;
  padding: 0.7rem 0.75rem;
  color: var(--ink);
}

.lib-note {
  max-width: 28rem;
  margin: 0;
}

.lib-section {
  margin: 0 0 2.8rem;
}

.lib-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 0.15rem;
}

.lib-section-title h2 {
  font-size: var(--t-lg);
}

.lib-count {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.lib-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  gap: 0.9rem 1.2rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.lib-thumb-wrap {
  width: 4.6rem;
  height: 6.1rem;
  background: var(--cream);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lib-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7f3eb;
}

.lib-row .sku {
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 0.12rem;
}

.lib-row h3 {
  font-size: 1.28rem;
  line-height: 1.2;
}

.lib-row .spec {
  margin: 0.2rem 0 0;
  font-size: var(--t-sm);
  color: var(--muted);
}

.lib-links {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: var(--t-sm);
  text-align: right;
  white-space: nowrap;
}

.lib-empty {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0 2rem;
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin: 0 0 1.25rem;
  font-size: var(--t-sm);
}

.coa-id-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 1fr);
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.vial-panel,
.qr-panel,
.ing-block,
.permalink-box {
  border: 1px solid var(--rule);
  background: var(--cream);
  padding: 0.95rem 1rem 1rem;
}

.panel-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.55rem;
}

.vial-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vial-panel img {
  max-height: 22rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.vial-caption {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 22rem;
}

.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.qr-panel img.qr {
  width: 10.75rem;
  height: 10.75rem;
  image-rendering: pixelated;
  background: #fff;
  padding: 0.45rem;
  border: 1px solid var(--rule);
}

.qr-kicker {
  margin: 0.7rem 0 0.2rem;
  font-weight: 600;
  font-size: var(--t-sm);
}

.qr-url {
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--ink-soft);
  margin: 0.15rem 0 0.55rem;
  max-width: 22rem;
}

.placeholder-frame {
  width: min(16rem, 100%);
  aspect-ratio: 3 / 4;
  background: #f3efe6;
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.1rem;
  color: var(--ink);
}

.placeholder-frame .brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--ink);
}

.placeholder-frame p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  max-width: 12rem;
}

.library-promo {
  display: grid;
  grid-template-columns: minmax(18rem, 1.2fr) minmax(16rem, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.library-stat {
  border-top: 1px solid rgba(243, 239, 230, 0.22);
  padding-top: 1rem;
}

.library-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--t-lg);
  font-weight: 500;
  color: var(--on-ink);
}

.library-stat span {
  font-size: var(--t-sm);
  color: var(--on-ink-muted);
}

.ing-sheet-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 500;
  margin: 1.1rem 0 0.15rem;
}

.ingredients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  margin: 0 0 1.2rem;
}

.ingredients-table th,
.ingredients-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.ingredients-table thead th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}

.sequence {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.55;
  word-break: break-word;
}

.permalink-box p { margin: 0 0 0.45rem; }
.permalink-box p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .lib-row,
  .coa-id-visuals,
  .library-promo {
    grid-template-columns: 1fr;
  }

  .lib-links { text-align: left; }

  .lib-row {
    grid-template-columns: 4.6rem minmax(0, 1fr);
  }

  .lib-links {
    grid-column: 2;
  }
}

@media print {
  .page-toolbar,
  .lib-toolbar { display: none !important; }

  .ing-page { background: white; }

  .qr-panel img.qr { border-color: #bbb; }
}


/* PDF export page box */
@page { size: A4; margin: 12mm; }
@media print {
  .nav-toggle, .skip-link { display: none !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.is-document .site-header,
  body.is-document .site-footer,
  body.is-document .btn,
  body.is-document .page-hero,
  body.is-document .coa-intro,
  body.is-document .page-toolbar { display: none !important; }
}


/* PDF report compact */
@media print {

  body.is-document .coa-id-visuals {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    break-inside: avoid;
  }
  body.is-document .vial-panel img,
  body.is-document .coa-vial img,
  body.is-document img.plain {
    max-height: 45mm !important;
    width: auto !important;
    object-fit: contain;
  }
  body.is-document img.qr,
  body.is-document .qr-panel img {
    width: 26mm !important;
    height: 26mm !important;
  }
  body.is-document .qr-panel a,
  body.is-document .qr-panel .btn,
  body.is-document .qr-help,
  body.is-document .qr-note,
  body.is-document .qr-panel .fine { display: none !important; }
  body.is-document .acc-note { font-size: 8pt; }
  body.is-document .coa-sheet { break-inside: auto; }
  body.is-document .coa-meta { font-size: 9pt; }
}
