/* =============================================================
   BioExpert — bioexpert-mr.com
   Light mode · floating header capsule · teal pulse identity.
   Brand teal #06929D sampled from the logo.
   Fraunces + Hanken Grotesk + JetBrains Mono.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand teal (from logo) */
  --brand:        #06929D;
  --brand-ink:    #076069;   /* teal text on light (AA) */
  --brand-bright: #0AAAB6;
  --brand-deep:   #05464B;
  --brand-soft:   #E1F1F1;
  --brand-soft-2: #CDE8E8;

  /* Surfaces (light) */
  --bg:      #F5F9F9;
  --bg-2:    #ECF3F3;
  --panel:   #FFFFFF;

  /* Ink */
  --ink:    #08282D;
  --ink-2:  #35585C;
  --ink-3:  #5B7779;
  --white:  #FFFFFF;

  /* Lines */
  --line:   rgba(8, 40, 45, 0.10);
  --line-2: rgba(8, 40, 45, 0.17);

  /* Shadows (soft, single-layer — no ghost-card pairing) */
  --shadow-cap: 0 8px 30px -12px rgba(8, 40, 45, 0.22), 0 2px 8px -4px rgba(8, 40, 45, 0.10);
  --shadow-cap-2: 0 12px 34px -12px rgba(8, 40, 45, 0.30), 0 3px 10px -4px rgba(8, 40, 45, 0.12);
  --shadow-card: 0 2px 14px -8px rgba(8, 40, 45, 0.16);

  /* Type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index scale */
  --z-nav: 100;
  --z-skip: 200;

  --shell: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--brand); color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: clamp(20px, 5vw, 56px); }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: var(--z-skip);
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; transform: translateY(-160%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

/* Serif italic emphasis */
.hero-title em, .section-title em, .apropos-statement em { font-style: italic; color: var(--brand); }

/* ---------- Header (floating capsule) ---------- */
.masthead {
  position: sticky; top: 0; z-index: var(--z-nav);
  padding: 16px clamp(14px, 4vw, 40px);
  pointer-events: none;
  transition: padding 0.35s var(--ease);
}
.masthead.scrolled { padding-top: 10px; padding-bottom: 10px; }
.masthead-cap {
  pointer-events: auto;
  max-width: var(--shell); margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  background: var(--panel); border-radius: 16px;
  box-shadow: var(--shadow-cap);
  padding: 11px 14px 11px 22px;
  transition: padding 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.masthead.scrolled .masthead-cap { padding-top: 8px; padding-bottom: 8px; box-shadow: var(--shadow-cap-2); }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-logo { height: 32px; width: auto; }
.brand-word { font-family: var(--serif); font-size: 1.42rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); line-height: 1; }
.brand-word em { font-style: italic; color: var(--brand-ink); }

.nav { flex: 1; display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 34px); }
.nav > a { font-size: 0.95rem; color: var(--ink-2); font-weight: 500; position: relative; transition: color 0.2s var(--ease); }
.nav > a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--brand); border-radius: 2px; transition: width 0.28s var(--ease); }
.nav > a:hover { color: var(--ink); }
.nav > a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.pill { border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 0.9rem; letter-spacing: -0.005em; transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.15s var(--ease); white-space: nowrap; }
.pill:active { transform: translateY(1px); }
.pill-soft { background: var(--brand-soft); color: var(--brand-ink); }
.pill-soft:hover { background: var(--brand-soft-2); }
.pill-solid { background: var(--brand); color: #fff; }
.pill-solid:hover { background: var(--brand-ink); }

.nav-toggle { display: none; width: 42px; height: 42px; position: relative; flex: none; }
.nav-toggle span { position: absolute; left: 11px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  pointer-events: auto; max-width: var(--shell); margin: 10px auto 0;
  background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-cap);
  padding: 6px 20px 14px;
}
.mobile-nav a { display: block; padding: 13px 4px; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--brand-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans);
  font-weight: 600; font-size: 1rem; padding: 15px 26px; border-radius: 12px; letter-spacing: -0.01em;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-arrow { transition: transform 0.24s var(--ease); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }
.btn-line { color: var(--ink); border: 1px solid var(--line-2); }
.btn-line:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

/* ---------- Pulse ---------- */
.pulse-line { stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 6px color-mix(in srgb, var(--brand) 30%, transparent)); }
.pulse-line.thin { stroke-width: 1.8; opacity: 0.55; }
.pulse-blip { fill: var(--brand); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--brand) 60%, transparent)); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(44px, 8vh, 92px); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; }
.hero::before {
  content: ""; position: absolute; z-index: 0; top: -16%; right: -12%;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 12%, transparent) 0%, transparent 62%);
}

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.73rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-2); padding: 8px 15px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
}
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-title { font-family: var(--serif); font-size: clamp(2.6rem, 1.7rem + 4.2vw, 4.9rem); line-height: 1.03; letter-spacing: -0.022em; margin: 24px 0 22px; text-wrap: balance; font-weight: 500; }
.hero-lede { font-size: clamp(1.1rem, 1.02rem + 0.5vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 42ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-marquee { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); }
.hero-marquee li { display: inline-flex; align-items: center; gap: 10px; }
.hero-marquee li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

/* Hero readout — contained ECG strip below the content (no text overlap) */
.hero-readout {
  position: relative; margin-top: clamp(30px, 5vh, 58px);
  height: clamp(120px, 17vh, 188px);
  background: #E9F3F3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: 0.7;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.pulse-hero { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Section scaffolding ---------- */
.section { position: relative; padding-block: clamp(64px, 10vh, 128px); }
.section-head { max-width: 900px; margin-bottom: clamp(44px, 5.5vw, 76px); }
.section-title { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2.8vw, 3.3rem); line-height: 1.07; letter-spacing: -0.02em; text-wrap: balance; font-weight: 500; }
.section-note { margin-top: 20px; font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.16rem); color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }

/* ---------- Services / feature blocks ---------- */
.features { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 72px); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature:nth-child(even) .feature-media { order: 2; }

.feature-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(130% 130% at 28% 18%, #12A7B2 0%, #06929D 46%, #06727B 100%);
  box-shadow: var(--shadow-card);
}
.feature-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 80% 90%, rgba(255,255,255,0.10), transparent 60%); }
.fm-icon { width: clamp(64px, 11vw, 104px); height: auto; color: #fff; opacity: 0.96; position: relative; z-index: 1; }
.fm-pulse { position: absolute; left: 0; right: 0; bottom: 26%; width: 100%; height: 42px; color: rgba(255, 255, 255, 0.34); z-index: 0; }
.fm-tag { position: absolute; left: 20px; bottom: 18px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.86); z-index: 1; }

.feature-text h3 { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; }
.feature-text > p { margin-top: 14px; color: var(--ink-2); max-width: 46ch; }
.mini-offerings { margin-top: 22px; display: flex; flex-direction: column; gap: 13px; }
.mini-offerings li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 0.98rem; max-width: 48ch; }
.mini-offerings li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.mini-offerings strong { color: var(--ink); font-weight: 600; }

/* ---------- Approche / reasons ---------- */
.approche { background: var(--bg-2); }
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 28px); }
.reason { background: var(--panel); border-radius: 18px; padding: clamp(24px, 3vw, 34px); box-shadow: var(--shadow-card); }
.reason-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; margin-bottom: 20px; color: #fff; background: var(--brand); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand) 65%, transparent); }
.reason-ic svg { width: 27px; height: 27px; }
.reason h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.15; }
.reason p { margin-top: 12px; color: var(--ink-2); font-size: 0.99rem; }

/* ---------- À propos ---------- */
.apropos { background: var(--bg); }
.apropos-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 92px); align-items: start; }
.apropos-statement { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.8rem); line-height: 1.16; letter-spacing: -0.018em; color: var(--ink); text-wrap: balance; }
.apropos-body p { color: var(--ink-2); }
.apropos-body p + p { margin-top: 18px; }
.spec-strip { display: flex; flex-wrap: wrap; gap: 14px 0; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 26px; }
.spec-strip > div { padding-inline: clamp(16px, 2vw, 28px); }
.spec-strip > div:first-child { padding-left: 0; }
.spec-strip > div + div { border-left: 1px solid var(--line); }
.spec-strip dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.spec-strip dd { margin-top: 8px; font-family: var(--serif); font-size: 1.18rem; color: var(--brand-ink); font-weight: 500; }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--bg-2); overflow: hidden; padding-bottom: clamp(96px, 13vh, 168px); }
.contact-monitor { position: absolute; inset: auto 0 0 0; height: 150px; opacity: 0.9; }
.pulse-foot { width: 100%; height: 100%; }
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.contact-cards { display: flex; flex-direction: column; gap: 12px; }
.ccard { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 4px; text-align: left; width: 100%; padding: 20px 22px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); transition: border-color 0.22s var(--ease), transform 0.15s var(--ease); }
.ccard:not(.ccard-static):hover { border-color: var(--brand); }
.ccard:not(.ccard-static):active { transform: translateY(1px); }
.ccard-k { grid-column: 1; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ccard-v { grid-column: 1; grid-row: 2; font-family: var(--mono); font-size: 1.05rem; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.ccard-do { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 0.85rem; font-weight: 600; color: var(--brand-ink); }
.ccard.copied .ccard-do { color: #1a8a5a; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 54px 30px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px 32px; align-items: start; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-tag { color: var(--ink-2); font-size: 0.96rem; max-width: 34ch; }
.footer-nav, .footer-reach { display: flex; flex-direction: column; gap: 11px; padding-top: 6px; }
.footer-nav a, .footer-reach a, .footer-reach span { color: var(--ink-2); font-size: 0.95rem; width: fit-content; transition: color 0.2s var(--ease); }
.footer-nav a:hover, .footer-reach a:hover { color: var(--brand-ink); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-3); }
.footer-live { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Load animation (hero only, ungated) ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
[data-load] { animation: riseIn 0.8s var(--ease) both; }
[data-load="1"] { animation-delay: 0.05s; }
[data-load="2"] { animation-delay: 0.14s; }
[data-load="3"] { animation-delay: 0.24s; }
[data-load="4"] { animation-delay: 0.34s; }
[data-load="5"] { animation-delay: 0.44s; }
.pulse-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease) 0.3s forwards; }
.pulse-line.thin { animation-duration: 2s; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav, .nav-actions { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media { aspect-ratio: 16 / 9; }
  .reasons { grid-template-columns: 1fr; gap: 14px; }
  .apropos-inner { grid-template-columns: 1fr; gap: 30px; }
  .contact-inner { grid-template-columns: 1fr; gap: 38px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .hero-title { font-size: clamp(1.9rem, 1.3rem + 3.6vw, 3rem); overflow-wrap: break-word; }
  .hero-title br, .section-title br, .apropos-statement br { display: none; }
  .hero-lede { max-width: none; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { gap: 10px; }
  .spec-strip { flex-direction: column; gap: 16px; }
  .spec-strip > div { padding-inline: 0; }
  .spec-strip > div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; gap: 8px; }
  .brand-word { font-size: 1.28rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  [data-load] { opacity: 1; transform: none; }
  .pulse-line { stroke-dashoffset: 0; }
  .pulse-blip { display: none; }
  .live { animation: none; }
}
