/* ============================================================
   CuriOmics — design system
   Light, airy, pastel. Scientific but warm.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --paper:        #FBFCFE;
  --surface:      #FFFFFF;
  --surface-tint: #F3F8FB;
  --surface-glass: rgba(255, 255, 255, 0.72);

  /* Ink */
  --ink:        #1B2A4A;
  --ink-soft:   #4E5E7E;
  --ink-faint:  #8693AB;
  --line:       #E7ECF4;
  --line-soft:  #EFF3F8;

  /* Pastel brand (derived from the CTCF / DNA visualization) */
  --mint:       #5DC9B6;   --mint-soft:  #E2F6F0;
  --sky:        #7FB0EE;   --sky-soft:   #E7F1FD;
  --lav:        #B6A6E8;   --lav-soft:   #F0EBFC;
  --coral:      #F2A0BE;   --coral-soft: #FDEBF2;
  --gold:       #ECC56A;   --gold-soft:  #FBF3DC;

  /* Actionable brand (accessible on white) */
  --brand:        #14897A;
  --brand-strong: #0F6E62;
  --brand-ink:    #0B5048;

  /* Effects */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 74, .05), 0 2px 8px rgba(27, 42, 74, .04);
  --shadow:    0 6px 24px rgba(27, 42, 74, .07), 0 2px 8px rgba(27, 42, 74, .04);
  --shadow-lg: 0 24px 60px rgba(27, 42, 74, .12), 0 8px 22px rgba(27, 42, 74, .06);

  /* Layout */
  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 48px);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- Reset / base ---------- */
*, *::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;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand-strong); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-ink); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1rem; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

.display { font-family: var(--font-display); font-weight: 400; font-optical-sizing: auto; letter-spacing: -0.01em; }
.display em { font-style: italic; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 110px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.27rem); color: var(--ink-soft); line-height: 1.6; }
.measure { max-width: 56ch; }
.measure-wide { max-width: 70ch; }
.mx-auto { margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--mint), var(--sky)); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brand);
  display: inline-flex; align-items: center; gap: .55em;
  font: inherit; font-weight: 600; font-size: .98rem;
  padding: .78em 1.4em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary {
  background: linear-gradient(135deg, #189686, #127063);
  color: #fff; box-shadow: 0 6px 18px rgba(18, 112, 99, .22);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(18, 112, 99, .3); }
.btn--ghost {
  background: var(--surface); color: var(--ink); border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { color: var(--ink); border-color: #CFE3DF; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--light { background: rgba(255,255,255,.16); color:#fff; border-color: rgba(255,255,255,.4); }
.btn--light:hover { background: rgba(255,255,255,.28); color:#fff; }
.btn--lg { padding: .95em 1.7em; font-size: 1.02rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 252, 254, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 16px rgba(27,42,74,.04); }
.nav { display: flex; align-items: center; gap: 1.2rem; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 700; }
.brand .brand-accent { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  padding: .5rem .8rem; border-radius: 10px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-tint); }
.nav-links a.active { color: var(--brand-strong); }

/* dropdown */
.has-menu { position: relative; }
.has-menu > a::after {
  content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .45em;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .6; transition: transform .2s;
}
.menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 280px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.has-menu:hover > a::after { transform: translateY(-2px) rotate(-135deg); }
.menu a { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 12px; }
.menu a:hover { background: var(--surface-tint); }
.menu .mi-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; margin-top: 2px; }
.menu .mi-t { color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.3; }
.menu .mi-d { color: var(--ink-faint); font-size: .8rem; line-height: 1.35; font-weight: 400; }

.nav-cta { margin-left: .5rem; }
.nav-links a.btn--primary, .nav-links a.btn--primary:hover { color: #fff; background: linear-gradient(135deg, #189686, #127063); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 86px); padding-bottom: clamp(56px, 8vw, 100px); }
.hero .eyebrow { justify-content: flex-start; }
.hero h1 { max-width: 16ch; }
.hero-slogan { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2.3vw, 1.7rem);
  color: var(--brand); margin: .5rem 0 0; letter-spacing: -0.01em; }
.hero .lead { max-width: 54ch; margin-top: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin-top: 3rem; }
.hero-meta .stat b { display: block; font-size: 1.7rem; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.hero-meta .stat span { font-size: .86rem; color: var(--ink-faint); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 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(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative; overflow: hidden;
}
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D7E6E2; }
.card h3 { margin-bottom: .4rem; }
.card p { margin-bottom: 0; font-size: .97rem; }
.card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.card .more { display: inline-flex; align-items: center; gap: .35em; margin-top: 1.1rem; font-weight: 600; font-size: .9rem; color: var(--brand-strong); }
.card .more svg { width: 1em; height: 1em; transition: transform .18s; }
.card--link:hover .more svg { transform: translateX(3px); }
.card .tag { position: absolute; top: 16px; right: 16px; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .25em .6em; border-radius: 999px; background: var(--gold-soft); color: #91701E; }

/* tinted icon chips */
.ic-mint { background: var(--mint-soft); color: #137a6a; }
.ic-sky  { background: var(--sky-soft);  color: #2f6fc0; }
.ic-lav  { background: var(--lav-soft);  color: #6b4fc0; }
.ic-coral{ background: var(--coral-soft);color: #c64f81; }
.ic-gold { background: var(--gold-soft); color: #9a7720; }

/* feature row (alternating) */
.feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.feature--flip .feature-media { order: -1; }
.feature-media { border-radius: var(--radius-lg); overflow: hidden; }

/* ---------- Spec / data tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.spec { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 540px; }
table.spec th, table.spec td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.spec thead th { background: var(--surface-tint); color: var(--ink); font-weight: 600; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
table.spec tbody tr:last-child td { border-bottom: none; }
table.spec td:first-child { color: var(--ink); font-weight: 500; }
table.spec .y { color: #137a6a; font-weight: 600; }
table.spec .n { color: var(--ink-faint); }

/* definition list of specs */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs > div { background: var(--surface); padding: 18px 20px; }
.specs dt { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .35rem; }
.specs dd { margin: 0; font-weight: 600; color: var(--ink); font-size: 1.02rem; }

/* checklist */
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.check li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ink-soft); }
.check li svg { width: 1.25em; height: 1.25em; flex: none; margin-top: .22em; color: var(--mint); }

/* steps */
.steps { counter-reset: step; display: grid; gap: clamp(14px, 2vw, 22px); }
.steps .step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps .step .n { counter-increment: step; width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: var(--brand-strong);
  background: var(--mint-soft); border: 1px solid #CEEBE4; font-family: var(--font-display); }
.steps .step .n::before { content: counter(step); }
.steps .step h3 { margin-bottom: .2rem; }
.steps .step p { margin-bottom: 0; font-size: .96rem; }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { font-size: .82rem; font-weight: 500; padding: .35em .8em; border-radius: 999px; background: var(--surface-tint); color: var(--ink-soft); border: 1px solid var(--line); }

/* platform logos strip */
.platforms { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.platforms .plat { font-weight: 600; font-size: .92rem; color: var(--ink-soft); padding: .5em 1em; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 20px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); font-weight: 400; transition: transform .2s; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0 0 18px; font-size: .97rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eafaf6 0%, #e7f1fd 50%, #f0ebfc 100%);
  border: 1px solid #E2EDEA; padding: clamp(34px, 5vw, 64px); text-align: center; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .lead { max-width: 52ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Banner / notice ---------- */
.notice { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface-tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; font-size: .9rem; color: var(--ink-soft); }
.notice svg { width: 1.2em; height: 1.2em; flex: none; margin-top: .2em; color: var(--brand); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8em 1em; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.field .hint { font-size: .78rem; color: var(--ink-faint); }

/* ---------- Footer ---------- */
.site-footer { background: #0f1b30; color: #c5d0e4; margin-top: clamp(60px, 9vw, 110px); }
.site-footer a { color: #c5d0e4; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 48px); padding-block: clamp(44px, 6vw, 72px); }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #91a0bd; font-size: .92rem; max-width: 34ch; margin-top: 1rem; }
.footer-tag { font-family: var(--font-display); font-style: italic; color: #e5ecf8 !important; font-size: 1.18rem; margin-top: .9rem !important; margin-bottom: .1rem; }
.footer-group { margin-top: .8rem !important; font-size: .88rem !important; color: #8492b0 !important; }
.footer-group strong { color: #c9d4e8; font-weight: 600; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { font-size: .93rem; color: #aab7d1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding-block: 24px; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; align-items: center; font-size: .82rem; color: #7c8aa8; }
.footer-bottom .ruo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: .3em .8em; border-radius: 8px; color: #aab7d1; }

/* ---------- DNA / CTCF background ---------- */
.bg-canvas { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-canvas svg { position: absolute; height: min(122vh, 1240px); width: auto; top: 50%; right: 0; left: auto;
  transform: translate(9%, -50%); opacity: .46; }
.bg-canvas::after { /* veil: clean reading column on the left, soft top/bottom fade */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(251,252,254,.62) 34%, rgba(251,252,254,0) 64%),
    radial-gradient(120% 70% at 80% 40%, rgba(231,241,253,.35), transparent 60%),
    linear-gradient(180deg, rgba(251,252,254,.55) 0%, rgba(251,252,254,0) 16%, rgba(251,252,254,0) 84%, rgba(251,252,254,.9) 100%);
}
@media (max-width: 760px) {
  .bg-canvas svg { opacity: .22; transform: translate(26%, -50%); height: 110vh; }
}
.helix-rot { transform-box: fill-box; transform-origin: center; animation: helix-drift 90s ease-in-out infinite alternate; }
@keyframes helix-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-44px, -20px, 0); } }
.zn-pulse { animation: zn-pulse 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes zn-pulse { 0%,100% { opacity:.5; } 50% { opacity:1; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin-block: 0; }
.kicker-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: clamp(16px,2.4vw,26px); }
.skip-link { position:absolute; left:-9999px; top:0; background:#fff; padding:.6em 1em; border-radius:8px; z-index:200; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature-media { order: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 70px 0 auto; flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px var(--gutter) 24px;
    box-shadow: var(--shadow-lg); transform: translateY(-130%); transition: transform .28s ease; margin-left: 0; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .8rem .4rem; font-size: 1.02rem; }
  .has-menu .menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 12px; min-width: 0; }
  .has-menu > a::after { display: none; }
  .nav-cta { margin: .6rem 0 0; }
  .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; width: 42px; height: 42px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content:""; display:block; width:18px; height:2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
  .nav-toggle span::before { position:absolute; top:-6px; } .nav-toggle span::after { position:absolute; top:6px; }
  .nav-toggle.open span { background: transparent; }
  .nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span::after { transform: translateY(-6px) rotate(-45deg); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-meta { gap: 1.2rem 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .helix-rot, .zn-pulse { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
