/* ============================================================
   Chimagen Biosciences — Design System
   Brand: blue (#1b3a94) + orange (#f58220), light professional theme
   ============================================================ */

:root {
  --blue-900: #0e1a3d;
  --blue-800: #14255c;
  --blue-700: #1b3a94;
  --blue-600: #2246b0;
  --blue-500: #2f56c9;
  --blue-100: #dde5f7;
  --blue-50: #eef2fb;
  --orange-600: #e06e0b;
  --orange-500: #f58220;
  --orange-400: #ff9a3d;
  --orange-50: #fff3e6;
  --ink: #17203a;
  --slate: #55608a;
  --muted: #8a93b8;
  --line: #e4e8f4;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(14, 26, 61, 0.07);
  --shadow-md: 0 10px 30px -8px rgba(14, 26, 61, 0.14);
  --shadow-lg: 0 24px 60px -16px rgba(14, 26, 61, 0.22);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand img { height: 44px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}
.main-nav a:hover { color: var(--blue-700); background: var(--blue-50); }
.main-nav a.active { color: var(--blue-700); background: var(--blue-50); }
.nav-cta {
  margin-left: 8px;
  background: var(--blue-700);
  color: #fff !important;
  padding: 10px 20px !important;
}
.nav-cta:hover { background: var(--blue-600); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(245, 130, 32, 0.12), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(34, 70, 176, 0.10), transparent 55%),
    linear-gradient(180deg, #fbfcff 0%, #f2f5fc 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 96px 0 88px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  background: var(--orange-50);
  border: 1px solid rgba(245, 130, 32, 0.28);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--blue-900);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--orange-500), var(--orange-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  font-size: 19px;
  color: var(--slate);
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 42px 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 460px;
}
.hero-card img { width: 300px; }
.hero-card .hero-tag {
  font-size: 14px;
  color: var(--slate);
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.molecule-dot {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.2px);
  opacity: 0.85;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(100deg, var(--orange-500), var(--orange-600));
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(245, 130, 32, 0.55);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 32px -10px rgba(245, 130, 32, 0.65); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--blue-100);
}
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); background: var(--blue-50); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark {
  background:
    radial-gradient(900px 480px at 110% 0%, rgba(245, 130, 32, 0.16), transparent 55%),
    linear-gradient(160deg, var(--blue-900), var(--blue-800));
  color: #dfe5f5;
}
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--blue-900);
  font-weight: 800;
}
.section.dark .section-head h2 { color: #fff; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--slate); }
.section.dark .section-head p { color: #aab4d8; }

/* ---------- Metrics bar ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.metric { text-align: center; }
.metric .value {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  color: var(--blue-700);
  letter-spacing: -0.02em;
}
.metric .label {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-100);
}
.card .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  color: var(--blue-700);
  margin-bottom: 20px;
}
.card h3 { font-size: 19px; color: var(--blue-900); margin-bottom: 10px; font-weight: 700; }
.card p { font-size: 15px; color: var(--slate); }

/* ---------- Program / pipeline cards ---------- */
.program-card { display: flex; flex-direction: column; gap: 12px; }
.program-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.program-name { font-size: 20px; font-weight: 800; color: var(--blue-900); }
.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.phase { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
.badge.preclinical { background: var(--orange-50); color: var(--orange-600); border: 1px solid rgba(245, 130, 32, 0.3); }
.badge.partner { background: #eef9f0; color: #1c7a38; border: 1px solid #c8ecd2; }
.program-target { font-size: 15px; font-weight: 700; color: var(--orange-600); }
.program-modality { font-size: 13.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.program-card p.desc { font-size: 15px; color: var(--slate); flex: 1; }
.text-link {
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange-600);
}
.text-link:hover { color: var(--orange-500); }

/* ---------- Pipeline table ---------- */
.pipeline-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; }
.pipeline-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.pipeline-table th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.pipeline-table td { padding: 20px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.pipeline-table tr:last-child td { border-bottom: 0; }
.pipeline-table tr:hover td { background: #fafbff; }
.cell-name { font-weight: 800; color: var(--blue-900); }
.cell-target { font-weight: 600; color: var(--orange-600); }
.cell-muted { color: var(--slate); }
.phase-track { display: flex; gap: 4px; align-items: center; min-width: 220px; }
.phase-seg {
  height: 8px;
  flex: 1;
  border-radius: 4px;
  background: var(--line);
}
.phase-seg.done { background: linear-gradient(90deg, var(--blue-600), var(--blue-500)); }
.phase-seg.current { background: linear-gradient(90deg, var(--orange-500), var(--orange-400)); box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.18); }
.phase-label { font-size: 13px; font-weight: 700; color: var(--blue-700); margin-top: 8px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-100), var(--orange-500));
}
.timeline-item { position: relative; padding: 0 0 42px 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-50);
}
.timeline-item:nth-child(even)::before { border-color: var(--orange-500); box-shadow: 0 0 0 4px var(--orange-50); }
.timeline-year { font-size: 14px; font-weight: 800; color: var(--orange-600); letter-spacing: 0.06em; }
.timeline-item h3 { font-size: 19px; color: var(--blue-900); margin: 4px 0 8px; }
.timeline-item p { color: var(--slate); font-size: 15.5px; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.news-card { display: flex; flex-direction: column; gap: 12px; }
.news-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.news-cat {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-600);
  background: var(--orange-50);
  padding: 4px 10px;
  border-radius: 999px;
}
.news-card h3 { font-size: 18.5px; line-height: 1.35; color: var(--blue-900); font-weight: 700; }
.news-card h3 a { color: inherit; }
.news-card h3 a:hover { color: var(--blue-600); }
.news-card p { font-size: 15px; color: var(--slate); flex: 1; }

.article-body { max-width: 760px; margin: 0 auto; }
.article-body p { font-size: 17px; color: var(--ink); margin-bottom: 22px; }
.article-header { max-width: 760px; margin: 0 auto 40px; }
.article-header h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; color: var(--blue-900); letter-spacing: -0.015em; }

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split h2 { font-size: clamp(26px, 3vw, 36px); color: var(--blue-900); letter-spacing: -0.015em; margin-bottom: 18px; }
.split p { color: var(--slate); font-size: 16.5px; margin-bottom: 16px; }
.split ul { list-style: none; margin-top: 8px; }
.split li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15.5px;
}
.split li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--orange-500), var(--orange-400));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat,
    linear-gradient(135deg, var(--orange-500), var(--orange-400));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.panel-visual {
  border-radius: 22px;
  background:
    radial-gradient(400px 300px at 80% 10%, rgba(245, 130, 32, 0.22), transparent 60%),
    linear-gradient(150deg, var(--blue-800), var(--blue-900));
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  box-shadow: var(--shadow-lg);
}
.panel-visual img { width: min(340px, 80%); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35)); }

/* ---------- Jobs ---------- */
.job-card { display: flex; flex-direction: column; gap: 14px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.job-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--slate);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
}
.job-req { margin-top: 4px; padding-left: 20px; color: var(--slate); font-size: 15px; }
.job-req li { margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info-card { background: linear-gradient(160deg, var(--blue-800), var(--blue-900)); color: #dfe5f5; border-radius: var(--radius); padding: 40px 36px; }
.contact-info-card h3 { color: #fff; font-size: 21px; margin-bottom: 22px; }
.contact-line { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-line .ic { color: var(--orange-400); flex-shrink: 0; margin-top: 3px; }
.contact-line .t { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #93a0cc; font-weight: 700; }
.contact-line .v { color: #eef1fb; font-size: 15.5px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 36px; box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(47, 86, 201, 0.12);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.form-success {
  display: none;
  background: #eef9f0;
  border: 1px solid #c8ecd2;
  color: #1c7a38;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 18px;
}
.form-success.show { display: block; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; letter-spacing: -0.015em; }
.cta-band p { color: #aab4d8; max-width: 620px; margin: 0 auto 32px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #9aa6cf; }
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 72px 0 48px;
}
.footer-brand img { height: 46px; margin-bottom: 20px; }
.footer-brand p { font-size: 14.5px; max-width: 320px; line-height: 1.7; }
.footer-col h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  font-weight: 700;
}
.footer-col a { display: block; color: #9aa6cf; font-size: 15px; margin-bottom: 11px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #7c88b6;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(245, 130, 32, 0.10), transparent 60%),
    linear-gradient(180deg, #fbfcff, #f0f4fc);
  border-bottom: 1px solid var(--line);
  padding: 84px 0 64px;
}
.page-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  color: var(--blue-900);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 16px;
}
.page-hero p { font-size: 18px; color: var(--slate); max-width: 680px; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; font-weight: 600; letter-spacing: 0.04em; }
.breadcrumb a { color: var(--blue-600); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0 60px; gap: 44px; }
  .hero-visual { order: -1; }
  .hero-card { padding: 32px; }
  .hero-card img { width: 240px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
}
