/* GenTop — design tokens & base styles
   Palette inspired by the GenTop presentation: white base, light cyan surfaces,
   deep navy text, teal accent, soft yellow accent. */

:root {
  --bg: #ffffff;
  --bg-soft: #f7fcfe;        /* very light cyan wash */
  --bg-cyan: #e7f6f8;        /* card / hero surface */
  --bg-cyan-2: #cfedf1;
  --slide-blue: #dff4f8;
  --slide-warm: #fbf3e8;
  --line: #d5e7ee;

  --ink: #1c2c4c;            /* primary navy text */
  --ink-2: #2a3d63;
  --ink-muted: #5a6a87;
  --ink-faint: #94a3b8;

  --teal: #22b8b4;           /* primary accent */
  --teal-dark: #12848a;
  --teal-soft: #aee4e4;

  --yellow: #ffd56a;         /* secondary accent, soft */
  --yellow-soft: #fff3cf;
  --coral: #ee8d91;
  --lavender: #7c86c9;

  --danger: #c0566b;

  --shadow-sm: 0 1px 2px rgba(28,44,76,.05);
  --shadow-md: 0 10px 28px rgba(28,44,76,.08);
  --shadow-lg: 0 28px 70px rgba(28,44,76,.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);

  --font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-fast: 160ms ease;
  --t-mid: 280ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(207, 237, 241, .55), transparent 28vw),
    radial-gradient(circle at 92% 3%, rgba(255, 243, 207, .45), transparent 24vw),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 .6em;
  line-height: 1.15;
}
h1 { font-size: clamp(38px, 5.4vw, 68px); letter-spacing: -0.045em; }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.035em; }
h3 { font-size: clamp(20px, 2.3vw, 24px); }
h4 { font-size: 18px; }
p { margin: 0 0 1em; color: var(--ink-2); }

.lead { font-size: 19px; color: var(--ink-2); }
.muted { color: var(--ink-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal-dark); font-weight: 600;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--teal); border-radius: 2px;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  padding: 13px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
.brand-mark { width: 44px; height: 44px; }
.brand-word { font-size: 21px; letter-spacing: .01em; }
.brand-word .accent { color: var(--teal); }

.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a {
  color: var(--ink-2); font-weight: 500; font-size: 14.5px;
  padding: 8px 10px; border-radius: 10px;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav a:hover, .nav a.active { background: var(--bg-cyan); color: var(--ink); }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none; width: 42px; height: 42px;
  background: var(--bg-cyan); border: 0; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 16px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all var(--t-fast);
  font-family: var(--font-body);
  white-space: nowrap;
}
.nav-cta { padding: 10px 16px; font-size: 14.5px; border-radius: 13px; }
.btn-primary { background: linear-gradient(135deg, var(--teal), #18a6b4); color: #fff; box-shadow: 0 10px 24px rgba(34,184,180,.20); }
.btn-primary:hover { background: linear-gradient(135deg, var(--teal-dark), #14758c); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(255,255,255,.68); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-cyan); color: var(--ink); }
.btn-link { background: transparent; color: var(--teal-dark); padding: 0; font-weight: 600; }
.btn-link::after { content: " →"; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 70% 34%, rgba(255,255,255,.92) 0 12%, rgba(255,255,255,.48) 13% 25%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255,213,106,.24), transparent 20%),
    radial-gradient(circle at 10% 24%, rgba(174,228,228,.52), transparent 24%),
    linear-gradient(120deg, #e3f5f8 0%, #f6fcfd 58%, #ffffff 100%);
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.hero::before {
  width: 420px; height: 420px;
  right: 6vw; top: 92px;
  background: rgba(255,255,255,.56);
  box-shadow: 0 0 80px rgba(34,184,180,.08);
}
.hero::after {
  width: 180px; height: 180px;
  left: -60px; bottom: 55px;
  background: rgba(255,213,106,.18);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.04fr 1fr; gap: 64px; align-items: center; padding: 88px 0 96px; }
.hero h1 { color: var(--ink); }
.hero p.lead { max-width: 540px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { display: flex; gap: 18px; margin-top: 42px; padding-top: 0; border-top: 0; flex-wrap: wrap; }
.hero-meta div { font-size: 14px; color: var(--ink-muted); }
.hero-meta div {
  min-width: 150px;
  padding: 16px 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(213,231,238,.86);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.hero-meta strong { display: block; color: var(--ink); font-size: 24px; font-family: var(--font-display); margin-bottom: 4px; line-height: 1.1; }

.hero-visual {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 540px; justify-self: end;
  filter: drop-shadow(0 24px 42px rgba(28,44,76,.08));
}
.hero-visual svg { width: 100%; height: 100%; }
.hero-visual-presentation {
  aspect-ratio: 620 / 520;
  max-width: 620px;
}

/* ---------- Section ---------- */
.section { padding: clamp(70px, 8vw, 112px) 0; }
.section-soft {
  background:
    radial-gradient(circle at 12% 18%, rgba(174,228,228,.34), transparent 24%),
    linear-gradient(180deg, var(--bg-soft), #ffffff);
}
.section-cyan {
  background:
    radial-gradient(circle at 82% 24%, rgba(255,213,106,.20), transparent 22%),
    linear-gradient(135deg, var(--slide-blue), #f7fcfe);
}
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.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: rgba(255,255,255,.82); border: 1px solid rgba(213,231,238,.92);
  border-radius: var(--radius-xl); padding: 30px;
  box-shadow: 0 12px 36px rgba(28,44,76,.045);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-soft); }
.card-icon {
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--bg-cyan-2); color: var(--teal-dark);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px;
  box-shadow: 0 0 0 14px rgba(213,231,238,.45);
}
.card-icon.alt { background: var(--yellow); color: #fff; box-shadow: 0 0 0 14px rgba(255,213,106,.24); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-muted); margin-bottom: 0; font-size: 15.5px; }

/* Gene card variant */
.gene-card { position: relative; }
.gene-card::before {
  content: "";
  position: absolute;
  width: 86px; height: 86px;
  right: 22px; top: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34,184,180,.14), rgba(255,213,106,.20));
  opacity: .68;
}
.gene-card .gene-tag {
  position: relative; z-index: 1;
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  font-size: 13px; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-cyan); color: var(--teal-dark); margin-bottom: 14px;
}
.gene-card h3 { font-family: var(--font-display); }
.gene-card .gene-genotypes {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 14px; color: var(--ink-muted);
}
.gene-card .gene-genotypes b { color: var(--ink); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: rgba(255,255,255,.84); border: 1px solid var(--line); border-radius: var(--radius-xl);
  padding: 28px; position: relative;
}
.step-num {
  width: 54px; height: 54px; border-radius: 999px; background: var(--teal); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
  box-shadow: 0 0 0 12px rgba(174,228,228,.45);
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

/* ---------- Disclaimer / note ---------- */
.notice {
  border-radius: 24px; padding: 22px 24px;
  background: var(--yellow-soft); color: #6f5410;
  border: 1px solid #f1e0a3;
  font-size: 15px;
}
.notice.cool { background: var(--bg-cyan); color: var(--ink-2); border-color: var(--teal-soft); }
.notice strong { color: inherit; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 24px; color: var(--teal); transition: transform var(--t-fast); line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { color: var(--ink); }
.faq-body { padding: 0 24px 22px; color: var(--ink-2); }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Reference list (research page) ---------- */
.ref-list { display: grid; gap: 14px; }
.ref {
  display: grid; grid-template-columns: 60px 1fr; gap: 18px; align-items: start;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
.ref-tag {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--teal-dark); padding-top: 2px;
}
.ref a { color: var(--ink); font-weight: 600; }
.ref a:hover { color: var(--teal-dark); }
.ref .ref-meta { font-size: 13.5px; color: var(--ink-muted); margin-top: 4px; }
.ref .ref-url { font-size: 12.5px; color: var(--ink-faint); word-break: break-all; }

/* ---------- Form ---------- */
.form { background: #fff; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font: inherit; color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(37,168,168,.15);
}
.field textarea { min-height: 110px; resize: vertical; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-muted); }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; }
.form-success {
  background: var(--bg-cyan); color: var(--ink); padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--teal-soft); margin-top: 16px; display: none;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background:
    radial-gradient(circle at 50% -20%, rgba(255,255,255,.92), transparent 36%),
    #dff4f8;
  color: var(--ink-2);
  padding: 56px 0 28px;
  margin-top: 80px;
  font-size: 14.5px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid #cfdfe5;
}
.footer-grid h5 { font-family: var(--font-display); color: var(--ink); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--teal-dark); }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); }

/* ---------- Back-to-top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast);
  box-shadow: var(--shadow-md);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 36px; }
.flow > p { margin-bottom: 1em; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-cyan); color: var(--teal-dark);
  font-size: 13px; font-weight: 600;
}
.tag.alt { background: var(--yellow-soft); color: #835f10; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.split.reverse > :first-child { order: 2; }

/* page heading */
.page-head {
  background:
    radial-gradient(circle at 76% 20%, rgba(255,213,106,.22), transparent 22%),
    radial-gradient(circle at 14% 16%, rgba(174,228,228,.55), transparent 26%),
    linear-gradient(135deg, #e1f5f8 0%, #f8fcfd 100%);
  padding: 92px 0 62px;
  border-bottom: 1px solid var(--line);
}
.page-head .crumbs { font-size: 13px; color: var(--ink-muted); margin-bottom: 14px; }
.page-head h1 { margin-bottom: 14px; }
.page-head p { max-width: 720px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 50px 0 60px; }
  .hero-visual { max-width: 360px; justify-self: start; margin-top: 10px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse > :first-child { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --gutter: 24px; }
  .container { padding-left: 24px; padding-right: 24px; }
  h1 { font-size: clamp(34px, 9vw, 42px); line-height: 1.08; letter-spacing: -0.04em; }
  h2 { font-size: clamp(28px, 7.2vw, 34px); }
  .lead { font-size: 17px; line-height: 1.62; }
  .hero-inner { padding: 58px 0 64px; }
  .hero-visual-presentation { max-width: 100%; margin-top: 18px; }
  .hero::before { width: 270px; height: 270px; right: -115px; top: 150px; }
  .hero::after { width: 120px; height: 120px; left: -70px; bottom: 120px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-meta { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-meta div { min-width: 0; }
  .eyebrow { font-size: 12px; letter-spacing: .11em; }
  .eyebrow::before { width: 20px; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-top: 1px solid var(--line); padding: 12px; gap: 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-cta { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .ref { grid-template-columns: 48px 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
