/* ------- base ------- */
  html { scroll-behavior: smooth; scroll-padding-top: 80px; }
  body { font-family: 'Inter Tight', system-ui, sans-serif; background: #FAF8F3; color: #0A1628; -webkit-font-smoothing: antialiased; }
  body.menu-locked { overflow: hidden; }

  .font-display { font-family: 'Instrument Serif', serif; font-weight: 400; }
  .font-display em { font-style: italic; }
  .font-mono { font-family: 'JetBrains Mono', monospace; }

  /* ------- layout ------- */
  .container-x {
    width: 100%;
    max-width: 80rem;
    margin-left: auto; margin-right: auto;
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
  }
  .container-narrow {
    width: 100%;
    max-width: 56rem;
    margin-left: auto; margin-right: auto;
    padding-left: clamp(1.25rem, 4vw, 3rem);
    padding-right: clamp(1.25rem, 4vw, 3rem);
  }

  /* ------- typography ------- */
  .hero-h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 7.5vw, 7.2rem);
    line-height: 0.98;
    letter-spacing: -0.025em;
  }
  .section-h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
  }
  .section-h3 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    line-height: 1.1;
  }

  .text-gradient {
    background: linear-gradient(135deg, #1FA0D4 0%, #1181B1 45%, #0B4165 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
  }
  .section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }

  /* ------- navigation ------- */
  #nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
  }
  #nav.scrolled {
    background: rgba(250, 248, 243, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(10, 22, 40, 0.06);
  }
  /* on legal/contact pages or any time you want nav solid from start */
  #nav.solid {
    background: rgba(250, 248, 243, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(10, 22, 40, 0.06);
  }
  .nav-link {
    position: relative;
    font-size: 0.875rem;
    color: #0A1628;
    transition: color 0.2s;
  }
  .nav-link:hover { color: #106490; }
  .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: #1181B1;
    border-radius: 1px;
  }

  /* ------- buttons ------- */
  .btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.875rem 1.75rem;
    background: #0A1628;
    color: #FAF8F3;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
  }
  .btn-primary::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1181B1 0%, #106490 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .btn-primary > * { position: relative; z-index: 1; }
  .btn-primary:hover::before { opacity: 1; }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 20px 40px -15px rgba(17,129,177, 0.4); }

  .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.875rem 1.75rem;
    background: transparent;
    color: #0A1628;
    border: 1px solid rgba(10, 22, 40, 0.2);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  .btn-ghost:hover { border-color: #1181B1; color: #106490; background: rgba(213, 235, 231, 0.4); }

  .btn-text {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: #0A1628;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: all 0.3s ease;
  }
  .btn-text:hover { color: #106490; border-bottom-color: #1181B1; }

  /* ------- decorative ------- */
  .mesh-bg {
    background:
      radial-gradient(60% 50% at 20% 30%, rgba(17,129,177, 0.12) 0%, transparent 60%),
      radial-gradient(50% 60% at 80% 20%, rgba(244, 184, 96, 0.08) 0%, transparent 60%),
      radial-gradient(70% 80% at 50% 100%, rgba(17,129,177, 0.06) 0%, transparent 60%);
  }
  .grain-bg::after {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  }

  /* animated orbs */
  .orb { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
  @keyframes float-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -30px); } }
  @keyframes float-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 40px); } }
  .orb-a { animation: float-a 18s ease-in-out infinite; }
  .orb-b { animation: float-b 22s ease-in-out infinite; }

  /* ECG line drawing */
  @keyframes draw-line { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
  .ecg-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw-line 6s ease-out forwards; }

  /* helix spin */
  @keyframes helix-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  .helix-spin { animation: helix-spin 60s linear infinite; transform-origin: center; }

  /* pulse dot */
  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.4); }
  }
  .pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

  /* ------- reveal animations ------- */
  .scroll-fade {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
  }
  .scroll-fade.in {
    opacity: 1;
    transform: translateY(0);
  }
  .scroll-fade.delay-1 { transition-delay: 0.12s; }
  .scroll-fade.delay-2 { transition-delay: 0.24s; }
  .scroll-fade.delay-3 { transition-delay: 0.36s; }
  .scroll-fade.delay-4 { transition-delay: 0.48s; }

  /* hero staggered reveal */
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .reveal-up { opacity: 0; animation: reveal-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .d-1 { animation-delay: 0.1s; }
  .d-2 { animation-delay: 0.25s; }
  .d-3 { animation-delay: 0.4s; }
  .d-4 { animation-delay: 0.55s; }
  .d-5 { animation-delay: 0.7s; }
  .d-6 { animation-delay: 0.85s; }

  /* ------- tabs ------- */
  .tab-btn {
    display: block; width: 100%; text-align: left;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    color: #5A6478;
    background: transparent;
    border: 1px solid transparent;
    font-family: 'Inter Tight', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  .tab-btn:hover { color: #0A1628; background: rgba(239, 235, 224, 0.5); }
  .tab-btn.active {
    color: #0A1628;
    background: #FAF8F3;
    border-color: rgba(17,129,177, 0.3);
    box-shadow: 0 4px 20px -10px rgba(10, 22, 40, 0.08);
  }

  .tab-content { display: none; }
  .tab-content.active { display: block; animation: tab-in 0.5s ease forwards; }
  @keyframes tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  /* ------- cards ------- */
  .card-hallmark, .card-playbook, .card-blog { transition: all 0.5s ease; }

  /* arrow circle rotate */
  .arrow-circle { transition: all 0.5s ease; }

  /* ------- bullets ------- */
  .bullet-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.625rem;
    color: #5A6478;
  }
  .bullet-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.6em;
    width: 1rem;
    height: 1px;
    background: #1181B1;
  }

  /* ------- biomarker bars ------- */
  .biomarker-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
  }
  .biomarker-bar::after {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #1181B1, #F4B860);
    border-radius: 999px;
    transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .biomarker-bar.draw::after { width: var(--pct, 50%); }

  /* svg data line draw */
  .data-line {
    stroke-dasharray: var(--len, 1000);
    stroke-dashoffset: var(--len, 1000);
    transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .data-line.draw { stroke-dashoffset: 0; }

  /* mobile menu */
  #mobile-menu.open { transform: translateX(0) !important; }
  #mobile-overlay.open { opacity: 1 !important; pointer-events: auto !important; }

  /* prose-style for legal pages */
  .prose-legal { color: #5A6478; line-height: 1.75; }
  .prose-legal h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.875rem;
    color: #0A1628;
    margin-top: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
  }
  .prose-legal h3 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0A1628;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }
  .prose-legal p { margin-bottom: 1rem; }
  .prose-legal ul { margin-bottom: 1.25rem; padding-left: 1.5rem; }
  .prose-legal ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
    list-style: none;
  }
  .prose-legal ul li::marker { content: ''; }
  .prose-legal ul li::before {
    content: '—';
    position: absolute;
    left: -1.25rem;
    color: #1181B1;
  }
  .prose-legal strong { color: #0A1628; font-weight: 600; }
  .prose-legal a { color: #106490; text-decoration: underline; text-underline-offset: 3px; }
  .prose-legal a:hover { color: #1181B1; }
  
  /* FAQ accordion */
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item[open] .faq-icon { transform: rotate(45deg); }
  .faq-item summary:focus-visible { outline: 2px solid #1181B1; outline-offset: 2px; }

  
  /* ---------- mobile hardening ---------- */
  html, body { overflow-x: hidden; max-width: 100%; }
  img, svg, video, canvas { max-width: 100%; height: auto; }
  *, *::before, *::after { min-width: 0; }
  /* keep the desktop nav from overflowing at the xl breakpoint */
  #nav .nav-link { font-size: 0.82rem; }
  @media (min-width: 1280px) and (max-width: 1439px) {
    #nav .nav-link { font-size: 0.78rem; }
  }
  /* fluid hero headline that never overflows narrow screens */
  @media (max-width: 640px) {
    .hero-h1 { font-size: clamp(2.25rem, 11.5vw, 3.4rem); line-height: 1.02; }
    .section-h2 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
    .section-h3 { font-size: clamp(1.5rem, 7vw, 2rem); }
    section { padding-top: 4rem; padding-bottom: 4rem; }
  }
  /* comfortable tap targets on touch devices */
  @media (hover: none) and (pointer: coarse) {
    .nav-link, .btn-text, footer a, .mobile-link { padding-top: 2px; padding-bottom: 2px; }
    button, a.btn-primary, a.btn-ghost { min-height: 44px; }
  }
  /* tables scroll horizontally instead of breaking layout */
  .overflow-x-auto { -webkit-overflow-scrolling: touch; }
