/* ==========================================================================
   Meridian Bio R&D — design system (LIGHT theme)
   White, airy, generous whitespace · deep ink text · clean teal accent
   Elegant serif display (Playfair) + Inter UI
   ========================================================================== */

:root {
  --ink:       #16232d;   /* primary text */
  --ink-soft:  #4c5a66;
  --muted:     #6b7884;
  --accent:    #0f7d86;   /* teal accent */
  --accent-deep:#0b5f66;
  --accent-br: #13a3af;
  --tint:      #f4f9f9;   /* very light section */
  --tint-2:    #eaf3f3;
  --tint-warm: #f7f9fa;
  --white:     #ffffff;
  --line:      #e4ebeb;
  --line-soft: #eef3f3;
  --shadow:    0 22px 55px rgba(16,45,50,.10);
  --shadow-sm: 0 8px 26px rgba(16,45,50,.06);
  --maxw:      1180px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  background: var(--white); line-height: 1.7; -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; line-height: 1.16; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 4.8vw, 4rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.85rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.section { padding: 118px 0; }
.section.tight { padding: 72px 0; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

/* eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 600;
  color: var(--accent); margin-bottom: 22px;
}
.eyebrow::before { content:""; width: 34px; height: 1px; background: var(--accent); display:inline-block; }
.center .eyebrow { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 30px; font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease; text-decoration: none; border-radius: 3px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* primary accent (class kept as btn-gold so HTML is unchanged) */
.btn-gold { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(15,125,134,.26); }
.btn-gold:hover { background: var(--accent-deep); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #0c1720; }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost-dark:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Subtle grid texture ---------- */
.grid-tex {
  background-image:
    linear-gradient(rgba(15,125,134,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,125,134,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.16rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 12px;
}
.brand:hover { text-decoration: none; }
.brand .accent { color: var(--accent); }
.brand .mark {
  width: 26px; height: 26px; flex: none; border: 1px solid var(--accent); border-radius: 50%; position: relative;
}
.brand .mark::before { content:""; position:absolute; inset:6px; border-radius:50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-soft); font-weight: 500; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 15px; border-radius: 4px;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- Hero (light) ---------- */
.hero { position: relative; background: var(--white); color: var(--ink); overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero::after {
  content:""; position:absolute; inset:0;
  background: radial-gradient(900px 460px at 84% -5%, rgba(19,163,175,.10), transparent 62%);
  pointer-events:none;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 110px; }
.hero h1 { max-width: 17ch; }
.hero .lead { color: var(--ink-soft); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 58px; align-items: center; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* stat / quote panel (light card) */
.panel {
  background: var(--white); border: 1px solid var(--line); padding: 48px 40px; text-align: center; border-radius: 6px;
  box-shadow: var(--shadow);
}
.panel .big { font-family: var(--serif); font-size: clamp(3rem,6vw,4.6rem); color: var(--accent); font-weight: 700; line-height: 1; }
.panel .cap { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--muted); margin-top: 12px; }
.panel .rule { width: 44px; height: 2px; background: var(--accent); margin: 24px auto; border-radius: 2px; }
.panel .quote { font-family: var(--serif); font-style: italic; font-size: 1.22rem; color: var(--ink); }

/* strip */
.strip { background: var(--tint); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 12px 42px; padding: 22px 26px; }
.strip span { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.strip span::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Section backgrounds (all light now) ---------- */
.on-dark, .on-navy2 { background: var(--tint); color: var(--ink); }
.on-cream { background: var(--white); }
.on-paper { background: var(--tint-warm); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-navy2 h2, .on-navy2 h3 { color: var(--ink); }
.on-dark .lead, .on-navy2 .lead { color: var(--ink-soft); }

.section-head { max-width: 730px; margin: 0 auto 60px; }
.section-head.left { margin-left: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); padding: 34px;
  border-radius: 6px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6e2e2; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* numbered service card */
.svc { position: relative; padding-top: 30px; }
.svc .no { font-family: var(--serif); font-size: 2.4rem; color: var(--accent); font-weight: 700; line-height: 1; margin-bottom: 12px; }
.svc .tagline { margin-top: 16px; text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; color: var(--accent); font-weight: 600; }

/* cards inside tinted sections stay white */
.on-dark .card, .on-navy2 .card { background: var(--white); border-color: var(--line); color: var(--ink-soft); box-shadow: var(--shadow-sm); }
.on-dark .card p, .on-navy2 .card p { color: var(--ink-soft); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 30px; }
.stat { text-align: center; }
.stat .num { font-family: var(--serif); font-size: clamp(2.1rem,3.4vw,3rem); font-weight: 700; color: var(--accent); line-height: 1; }
.stat .lbl { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.on-dark .stat .lbl, .on-navy2 .stat .lbl { color: var(--muted); }

/* ---------- Checklist ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); color: var(--ink); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content:"—"; position:absolute; left:0; color: var(--accent); font-weight:700; }
.on-dark .checks li { border-color: var(--line); color: var(--ink); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 66px; align-items: center; }

/* ---------- Project rows ---------- */
.proj { display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: start; }
.proj:last-child { border-bottom: 0; }
.proj .tag { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.2rem; }
.proj .tag small { display: block; font-family: var(--sans); color: var(--accent); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 8px; }
.on-dark .proj { border-color: var(--line); }

/* ---------- Quote band ---------- */
.quote-band { background: var(--tint-2); color: var(--ink); text-align: center; }
.quote-band .q { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem,3vw,2.2rem); color: var(--ink); max-width: 26ch; margin: 0 auto 16px; line-height: 1.32; }
.quote-band .by { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; color: var(--accent); }

/* ---------- CTA band (solid accent for pop) ---------- */
.cta-band { background: var(--accent); color: #fff; border-radius: 8px; padding: 64px; text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7efef; max-width: 58ch; margin: 0 auto 28px; }

/* ---------- Contact ---------- */
.contact-card { background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 36px; color: var(--ink-soft); }
.contact-card h3 { color: var(--ink); }
.contact-card .role { color: var(--accent); font-size: .8rem; letter-spacing:.1em; text-transform:uppercase; font-weight:600; }
.field-note { font-size:.86rem; }

/* ---------- Footer (light) ---------- */
.site-footer { background: var(--tint); color: var(--muted); padding: 72px 0 32px; border-top: 1px solid var(--line); }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { font-family: var(--sans); color: var(--ink); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 9px 0; font-size: .92rem; }
.foot-brand { font-family: var(--serif); color: var(--ink); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 1.05rem; margin-bottom: 14px; }
.foot-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.note { background: var(--tint-2); border-left: 3px solid var(--accent); border-radius: 4px; padding: 16px 20px; font-size: .92rem; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .grid-3, .grid-4, .stats { grid-template-columns: repeat(2,1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 18px; gap: 2px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-toggle { display: block; }
  .proj { grid-template-columns: 1fr; gap: 8px; }
  .cta-band { padding: 44px 26px; }
  .section { padding: 84px 0; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
}

/* ==========================================================================
   Distinctive interactive identity — motion, node-field, meridian motif
   ========================================================================== */

/* animated node-field canvas behind hero */
.hero { isolation: isolate; }
.node-field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block;
}
.hero .wrap { position: relative; z-index: 2; }

/* drifting aurora accent blobs in hero */
.hero::before {
  content: ""; position: absolute; z-index: 0; top: -18%; right: -8%;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(19,163,175,.16), transparent 72%);
  animation: drift 20s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-44px, 34px) scale(1.14); }
}

/* signature "meridian" arc across the hero */
.hero .wrap::before {
  content: ""; position: absolute; z-index: 0; left: -6%; right: -6%; top: 50%;
  height: 1px; background: linear-gradient(90deg, transparent, rgba(15,125,134,.35), transparent);
  transform: translateY(-50%) rotate(-4deg); pointer-events: none;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* pulsing brand mark ring */
.brand .mark::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(15,125,134,.55); animation: ping 3.6s ease-out infinite;
}
@keyframes ping {
  0%   { transform: scale(.75); opacity: .7; }
  70%  { opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* animated gradient on the CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--accent-deep) 0%, var(--accent) 45%, var(--accent-br) 100%);
  background-size: 220% 220%; animation: shimmer 11s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* card top-accent line on hover */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-br));
  transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.card:hover::before { width: 100%; }

/* oversized offering numeral gets a soft ghost */
.svc .no { position: relative; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero::before, .cta-band, .brand .mark::after { animation: none !important; }
  .node-field { display: none !important; }
}
