/* Bioscity Limited — site styles
   Palette is taken from the wordmark: leaf #449318, lime #5bbd25. */

:root {
  --paper: #f6f9f1;
  --paper-2: #ecf3e3;
  --ink: #142b19;
  --ink-2: #4b5f4f;
  --line: #cddcc0;
  --leaf: #449318;
  --leaf-deep: #2f6c10;
  --lime: #5bbd25;
  --lime-soft: #dff3cc;
  --white: #ffffff;
  --amber: #b7791f;
  --amber-soft: #fbf0d6;

  --font-display: "Quicksand", "Nunito", "Segoe UI Rounded", "Avenir Next Rounded", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;

  --measure: 66ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
p, li { max-width: var(--measure); }
.lead { font-size: 1.2rem; color: var(--ink-2); }
small, .small { font-size: 0.92rem; }
.muted { color: var(--ink-2); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand span { font-family: var(--font-display); font-weight: 700; color: var(--ink-2); font-size: 0.95rem; margin-top: 4px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--lime-soft); color: var(--leaf-deep); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 40px; cursor: pointer; color: var(--ink); align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
}

/* Sections */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(24px, 4vw, 48px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 46ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--leaf); color: var(--white); }
.btn-primary:hover { background: var(--leaf-deep); color: var(--white); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--leaf); color: var(--leaf-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 44ch; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Statement card: the one bold object on the site */
.statement {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -40px rgba(20, 43, 25, 0.35);
  overflow: hidden;
  font-size: 0.95rem;
}
.statement-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; background: var(--paper-2); color: var(--ink-2); font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.statement table { width: 100%; border-collapse: collapse; }
.statement td { padding: 12px 18px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.statement td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.statement .date { color: var(--ink-2); white-space: nowrap; width: 1%; }
.statement .row-hit td { background: var(--lime-soft); }
.statement .row-hit .desc { font-family: var(--font-display); font-weight: 700; color: var(--leaf-deep); letter-spacing: 0.01em; }
.statement .row-dim { color: #9aa79d; }
.statement-note { padding: 18px; }
.statement-note p { margin: 0 0 8px; max-width: none; }
.statement-note p:last-child { margin: 0; }

/* Product registry */
.registry { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.registry li { max-width: none;
  display: grid; grid-template-columns: 1.1fr 1.5fr 0.8fr; gap: 16px 32px;
  padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.registry .name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.1; margin: 0; }
.registry .name a { color: var(--ink); text-decoration: none; }
.registry .name a:hover { color: var(--leaf-deep); }
.registry .url { display: block; margin-top: 6px; color: var(--ink-2); font-size: 0.92rem; }
.registry .what { margin: 0; max-width: 52ch; color: var(--ink); }
.registry .what small { display: block; color: var(--ink-2); margin-top: 6px; }
.registry .meta { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .registry li { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .registry .meta { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
}
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.status.soon::before { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status.legacy::before { background: #9aa79d; box-shadow: 0 0 0 3px #e6ebe4; }

/* Billing columns */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--ink-2); margin-bottom: 0.6em; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* Two-column about strip */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Fact list (registered details) */
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px 0; } .facts dd { margin-bottom: 10px; } }

/* Legal / long-form pages */
.page-title { padding-block: clamp(40px, 7vw, 80px) clamp(24px, 4vw, 40px); }
.page-title h1 { max-width: 18ch; }
.page-title .meta { color: var(--ink-2); }
.legal { padding-bottom: clamp(48px, 8vw, 96px); }
.legal h2 { font-size: 1.5rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.6em; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }
.legal table { border-collapse: collapse; width: 100%; max-width: 760px; font-size: 0.95rem; margin: 1em 0 1.5em; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink-2); font-weight: 500; }
.table-scroll { overflow-x: auto; }
.toc { background: var(--paper-2); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 2em; max-width: 760px; }
.toc strong { display: block; margin-bottom: 6px; font-family: var(--font-display); }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.callout {
  border-left: 4px solid var(--leaf); background: var(--white);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0; max-width: 760px;
}
.callout p { margin: 0; max-width: none; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); word-break: break-word; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { max-width: none; padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list span { color: var(--ink-2); font-size: 0.92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding-block: 40px 32px; font-size: 0.93rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 0.95rem; margin-bottom: 10px; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--leaf-deep); text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.55; }
.site-footer .legal-line { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* Error page */
.err { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 60px; }
.err h1 { font-size: clamp(3rem, 12vw, 7rem); color: var(--leaf); line-height: 1; }

/* Product marks in the registry */
.registry .ident { display: flex; gap: 14px; align-items: flex-start; }
.registry .mark {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--line); object-fit: contain; padding: 4px;
}
.registry .mark-empty {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink-2);
  background: var(--paper-2);
}
