/* ==========================================================================
   SEREN BIO LABS — BRAND FOUNDATION
   Tokens sampled directly from Seren_Bio_Labs_Logo.pdf (1254x1254 DeviceRGB).
   Chrome ramp measured down the S monogram; accent blue measured from the
   "BIO LABS" lettering, which carries a vertical gradient #8FD3F5 -> #4278A2.
   ========================================================================== */

:root {
  /* --- Ground ------------------------------------------------------------ */
  --black:        #000000;
  --ink:          #06070A;
  --surface:      #0D0F14;
  --surface-hi:   #14171E;

  /* --- Chrome (the wordmark metal) --------------------------------------- */
  --chrome-hi:    #FFFFFF;
  --chrome-mid:   #C9CBCD;
  --chrome-lo:    #6E6C6C;
  --chrome-grad:  linear-gradient(158deg, #FFFFFF 0%, #E4E6E8 24%, #AFB2B5 56%, #6E6C6C 100%);
  --chrome-rule:  linear-gradient(90deg, transparent, var(--chrome-mid), transparent);

  /* --- Accent blue -------------------------------------------------------
     #004DFF is a dark, saturated blue. It works as a fill, but on black it
     only reaches 3.5:1 contrast, which fails accessibility for text. So the
     brand colour is used for buttons, borders and rules, and a lighter tint
     of the same hue carries any small text on a dark background. */
  --blue:         #004DFF;   /* fills, buttons, borders */
  --blue-text:    #5C8AFF;   /* text and links on dark - 7:1 on black */
  --blue-hi:      #3D7BFF;   /* hover */
  --blue-lo:      #0038BF;
  --blue-grad:    linear-gradient(180deg, #3D7BFF 0%, #0038BF 100%);
  --blue-glow:    rgba(0, 77, 255, 0.38);
  --blue-subtle:  rgba(0, 77, 255, 0.12);
  --blue-line:    rgba(0, 77, 255, 0.55);

  /* --- Text -------------------------------------------------------------- */
  --text:         #EEF1F4;
  --text-muted:   #9BA3AD;
  --text-dim:     #6B727C;
  --on-blue:      #FFFFFF;   /* white on #004DFF = 6:1, passes */

  /* --- Lines ------------------------------------------------------------- */
  --line:         #1A1D24;
  --line-hi:      #272C36;

  /* --- Type -------------------------------------------------------------- */
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Wide tracking is the logo's defining gesture — reused on every label. */
  --track-label:  0.26em;
  --track-wide:   0.14em;

  --maxw:         1360px;
  --radius:       2px;

  /* --- Legacy aliases ----------------------------------------------------
     The shop page carries a large body of page-specific CSS written against
     the original token names. Aliasing keeps that CSS working while the
     values below retarget it onto the real logo palette. ------------------- */
  --bg-black:          var(--black);
  --bg-charcoal:       var(--ink);
  --bg-card:           var(--surface);
  --bg-card-hover:     var(--surface-hi);
  --blue-primary:      var(--blue);
  --blue-hover:        var(--blue-hi);
  --text-silver:       var(--text);
  --border-titanium:   var(--line);
  --border-highlight:  var(--line-hi);
  --border-blue:       var(--blue-line);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { background: var(--black); overflow-x: hidden; }
body.modal-open { overflow: hidden; }

/* The [hidden] attribute only sets display:none through the UA stylesheet, so
   any explicit display (flex, grid) in our own CSS silently beats it and the
   element stays visible. Enforce it once, globally. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.font-mono { font-family: var(--font-mono); }
.text-blue { color: var(--blue-text); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

/* Chrome text treatment — mirrors the wordmark's metal. */
.chrome {
  background: var(--chrome-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Eyebrow label: mono, blue, heavily tracked — the logo's "BIO LABS" gesture */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue-text);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; }
.section-head  { margin-bottom: 52px; max-width: 760px; }
.section-head p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-top: 16px;
  line-height: 1.7;
}

/* ==========================================================================
   LEGAL / POLICY PAGES
   Long-form text. Narrower measure than the marketing pages, because these
   are read rather than scanned.
   ========================================================================== */
.legal-head {
  padding: clamp(48px, 6vw, 76px) clamp(20px, 4vw, 48px) 0;
  max-width: 820px;
  margin: 0 auto;
}
.legal-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 14px; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-dim);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 48px) clamp(20px, 4vw, 48px) 90px;
}
.legal h2 {
  font-size: 1.2rem;
  margin: 44px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal h3 { font-size: 1rem; margin: 26px 0 10px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: .95rem; line-height: 1.8; }
.legal p { margin-bottom: 16px; }
.legal ul, .legal ol { margin: 0 0 18px 22px; }
.legal li { margin-bottom: 9px; }
.legal strong { color: var(--text); }
.legal a { color: var(--blue-text); }

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 44px;
}
.legal-toc h2 {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  margin: 0 0 14px;
  padding: 0;
  border: none;
}
.legal-toc ol { margin: 0 0 0 20px; }
.legal-toc li { margin-bottom: 7px; font-size: .9rem; }

/* Callout for the things that genuinely matter to a buyer. */
.legal-note {
  background: var(--surface);
  border: 1px solid var(--line-hi);
  border-left: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 22px;
}
.legal-note p:last-child { margin-bottom: 0; }

/* Unfilled detail. Deliberately loud so it cannot ship unnoticed. */
.todo {
  background: rgba(224, 119, 122, .14);
  border: 1px dashed rgba(224, 119, 122, .55);
  color: #E0777A;
  font-family: var(--font-mono);
  font-size: .82em;
  padding: 1px 7px;
  border-radius: 2px;
  white-space: nowrap;
}

/* ==========================================================================
   RUO COMPLIANCE STRIP
   Sits above the nav on every page and restates the research-use position.
   ========================================================================== */
.ruo-strip {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  text-align: center;
  padding: 9px 16px;
}
.ruo-strip strong { color: var(--blue-text); font-weight: 500; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 76px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 48px);
}

.logo-container { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.logo-mark { height: 34px; width: auto; }

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--chrome-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo-text span {
  -webkit-text-fill-color: var(--blue-text);
  color: var(--blue-text);
  background: none;
}

.nav-menu { display: flex; gap: 34px; list-style: none; }
.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active { color: var(--text); border-bottom-color: var(--blue-text); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-cta-btn {
  background: var(--blue);
  color: var(--on-blue);
  padding: 11px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: background .2s ease, box-shadow .2s ease;
}
.nav-cta-btn:hover { background: var(--blue-hi); box-shadow: 0 0 22px var(--blue-glow); }

.mobile-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.mobile-hamburger span { width: 22px; height: 2px; background: var(--text); }

.mobile-nav-drawer {
  display: none;
  position: fixed;
  left: 0; right: 0;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 24px;
  z-index: 999;
  transform: translateY(-130%);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.mobile-nav-drawer.active { transform: translateY(0); box-shadow: 0 24px 48px rgba(0,0,0,.9); }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.mobile-nav-links a {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-family: var(--font-display);
}
.mobile-nav-links a.active { color: var(--blue-text); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 17px 34px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .12s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 700;
  border: 1px solid var(--blue);
}
.btn-primary:hover {
  background: var(--blue-hi);
  border-color: var(--blue-hi);
  box-shadow: 0 0 30px var(--blue-glow);
  transform: translateY(-2px);
}
.btn-secondary {
  border: 1px solid var(--line-hi);
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.btn-secondary:hover { border-color: var(--chrome-lo); background: rgba(255,255,255,.04); }

/* ==========================================================================
   COMPLIANCE ENTRY MODAL (kept — research-use acknowledgement)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.modal-box {
  background: var(--ink);
  border: 1px solid var(--line-hi);
  box-shadow: 0 0 70px var(--blue-glow);
  max-width: 620px; width: 100%;
  padding: 40px 32px;
  position: relative;
  border-radius: var(--radius);
  max-height: 92vh; overflow-y: auto;
}
.modal-box::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}
.modal-logo { height: 54px; width: auto; margin: 0 auto 22px; }
.modal-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-text);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: center;
}
.modal-box h2 { font-size: 1.4rem; margin-bottom: 18px; text-align: center; }
.modal-box p { color: var(--text-muted); font-size: .88rem; margin-bottom: 14px; }
.modal-box strong { color: var(--text); }

.btn-agree {
  width: 100%;
  min-height: 50px;
  background: var(--blue);
  color: var(--on-blue);
  border: none;
  padding: 15px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .04em;
  cursor: pointer;
  margin-top: 16px;
  border-radius: var(--radius);
  transition: background .2s ease, box-shadow .2s ease;
}
.btn-agree:hover { background: var(--blue-hi); box-shadow: 0 0 26px var(--blue-glow); }
.modal-decline {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--text-dim);
  font-size: .78rem;
  text-decoration: underline;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding: 80px clamp(20px,4vw,48px) 36px; }
.footer-grid {
  max-width: var(--maxw); margin: 0 auto 60px;
  display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px;
}
.footer-brand .logo-mark { height: 40px; }
.footer-brand-tagline {
  color: var(--text-dim);
  font-size: .72rem;
  margin-top: 14px;
  font-family: var(--font-mono);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}
.footer-brand p { color: var(--text-muted); font-size: .86rem; margin-top: 16px; max-width: 330px; }

.footer-col h4 {
  font-size: .74rem; color: var(--text); margin-bottom: 20px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--track-label);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a, .footer-col span {
  color: var(--text-muted); text-decoration: none; font-size: .86rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--blue-text); }

.disclaimer-box {
  max-width: var(--maxw); margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 2px solid var(--blue);
  padding: 24px 30px;
  background: var(--black);
  border-radius: var(--radius);
}
.disclaimer-title {
  font-family: var(--font-mono); color: var(--text);
  font-size: .72rem; font-weight: 600;
  letter-spacing: var(--track-wide); margin-bottom: 10px; text-transform: uppercase;
}
.disclaimer-text { color: var(--text-dim); font-size: .78rem; line-height: 1.7; }

.footer-bottom {
  max-width: var(--maxw); margin: 36px auto 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .74rem; color: var(--text-dim); font-family: var(--font-mono);
  letter-spacing: .04em;
}
.footer-bottom a { color: var(--text-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--blue-text); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-menu { display: none; }
  .mobile-hamburger { display: flex; }
  .mobile-nav-drawer { display: block; }
}
@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .nav-cta-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
