/* ============================================================
   PHARMA LINK — Design Tokens
   Concept: precise, global, clinical-modern biotech/pharma network
   ============================================================ */

:root {
  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.15rem + 2.6vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6vw, 6.5rem);

  /* 4px spacing system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.3125rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

:root,
[data-theme='light'] {
  /* Surfaces — cool clinical neutrals */
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcfd;
  --color-surface-offset: #edf1f5;
  --color-surface-offset-2: #e3e8ee;
  --color-surface-dynamic: #d8dfe8;
  --color-divider: #e1e6ec;
  --color-border: #d2d9e2;

  /* Text — deep navy ink */
  --color-text: #10192b;
  --color-text-muted: #58627a;
  --color-text-faint: #9aa4b8;
  --color-text-inverse: #f4f6f9;

  /* Primary — Helix Blue */
  --color-primary: #1b3a6b;
  --color-primary-hover: #142c53;
  --color-primary-active: #0e1f3c;
  --color-primary-highlight: #dde5f2;

  /* Secondary accent — Catalyst Teal (sparingly) */
  --color-accent: #0e7a71;
  --color-accent-hover: #0a5c55;
  --color-accent-highlight: #d9ece9;

  --color-warning: #9a5a1c;
  --color-warning-highlight: #ecdfcd;
  --color-error: #9c2c4f;
  --color-error-highlight: #ecd4dd;
  --color-success: #2f6d3e;
  --color-success-highlight: #d6e6d9;

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 255 / 0.07);
  --shadow-md: 0 6px 16px oklch(0.25 0.03 255 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.25 0.03 255 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #090d16;
  --color-surface: #101828;
  --color-surface-2: #131c2f;
  --color-surface-offset: #172136;
  --color-surface-offset-2: #1c2740;
  --color-surface-dynamic: #24304c;
  --color-divider: #202a42;
  --color-border: #2a3550;

  --color-text: #e7ebf3;
  --color-text-muted: #98a2ba;
  --color-text-faint: #5c6785;
  --color-text-inverse: #10192b;

  --color-primary: #7fa3e0;
  --color-primary-hover: #9cb9e9;
  --color-primary-active: #b7cced;
  --color-primary-highlight: #1c2b48;

  --color-accent: #4bbcae;
  --color-accent-hover: #6bcabd;
  --color-accent-highlight: #16332f;

  --color-warning: #d38b4c;
  --color-warning-highlight: #3a2c1c;
  --color-error: #d97fa0;
  --color-error-highlight: #3a2531;
  --color-success: #7bc98d;
  --color-success-highlight: #1f3524;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #090d16;
    --color-surface: #101828;
    --color-surface-2: #131c2f;
    --color-surface-offset: #172136;
    --color-surface-offset-2: #1c2740;
    --color-surface-dynamic: #24304c;
    --color-divider: #202a42;
    --color-border: #2a3550;
    --color-text: #e7ebf3;
    --color-text-muted: #98a2ba;
    --color-text-faint: #5c6785;
    --color-text-inverse: #10192b;
    --color-primary: #7fa3e0;
    --color-primary-hover: #9cb9e9;
    --color-primary-active: #b7cced;
    --color-primary-highlight: #1c2b48;
    --color-accent: #4bbcae;
    --color-accent-hover: #6bcabd;
    --color-accent-highlight: #16332f;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
  }
}

body {
  font-feature-settings: 'ss01';
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 640px) {
  .container {
    padding-inline: var(--space-10);
  }
}

section {
  position: relative;
}

.section-pad {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section-pad-lg {
  padding-block: clamp(var(--space-20), 11vw, var(--space-32));
}

.section-pad-sm {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: currentColor;
  display: inline-block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

p {
  color: var(--color-text-muted);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 600;
  max-width: 20ch;
}

.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 62ch;
  line-height: 1.55;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-faint);
}

.btn-on-dark {
  background: color-mix(in oklab, white 12%, transparent);
  color: #fff;
  border-color: color-mix(in oklab, white 30%, transparent);
  backdrop-filter: blur(6px);
}
.btn-on-dark:hover {
  background: color-mix(in oklab, white 20%, transparent);
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--color-border) 70%, transparent);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.main-nav a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.icon-btn:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}

.menu-toggle {
  display: inline-flex;
}

.header-cta-desktop {
  display: none;
}

@media (min-width: 900px) {
  .main-nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .header-cta-desktop {
    display: inline-flex;
  }
}

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: 68px;
  background: var(--color-bg);
  z-index: 90;
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}
@media (min-width: 900px) {
  .mobile-nav {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, oklch(0.12 0.03 255 / 0.35) 0%, oklch(0.08 0.03 255 / 0.55) 55%, oklch(0.06 0.02 255 / 0.88) 100%),
    linear-gradient(90deg, oklch(0.06 0.02 255 / 0.7) 0%, oklch(0.06 0.02 255 / 0.15) 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32)) var(--space-16);
  max-width: 900px;
}

.hero .eyebrow {
  color: #9fd6cc;
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.04;
  margin-block: var(--space-5) var(--space-6);
  color: #fff;
}

.hero-lede {
  font-size: var(--text-lg);
  color: color-mix(in oklab, white 82%, transparent);
  max-width: 56ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Capability strip below hero */
.capstrip {
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
}
.capstrip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-10);
  padding-block: var(--space-6);
}
.capstrip-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.capstrip-item strong {
  font-family: var(--font-display);
  color: var(--color-text);
  font-weight: 600;
}

/* ============================================================
   ABOUT — asymmetric two column
   ============================================================ */

.about {
  background: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--space-16);
  }
}

.about-media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text > * + * {
  margin-top: var(--space-5);
}

.pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  border-left: none;
  padding-left: var(--space-5);
  position: relative;
  margin-top: var(--space-8) !important;
}
.pull-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

/* ============================================================
   PRODUCTS
   ============================================================ */

.products {
  background: var(--color-surface-offset);
}

.products-header {
  max-width: 720px;
  margin-bottom: var(--space-12);
}

.products-divider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 21/9;
  margin-bottom: var(--space-16);
  box-shadow: var(--shadow-lg);
}
.products-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.products-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, oklch(0.1 0.03 255 / 0.75) 0%, oklch(0.1 0.03 255 / 0.15) 65%);
}
.products-divider-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: var(--space-8) clamp(var(--space-6), 5vw, var(--space-16));
  max-width: 46ch;
}
.products-divider-copy p {
  color: color-mix(in oklab, white 92%, transparent);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.4;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 800px) {
  .portfolio-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-6);
  }
}

.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
}

.portfolio-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.portfolio-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.portfolio-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.portfolio-tag.oncology {
  color: var(--color-primary);
}
.portfolio-tag.biosimilar {
  color: var(--color-accent);
}

.molecule-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.molecule-pill {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
}

.portfolio-card p.card-note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
}

/* ============================================================
   PARTNERSHIPS
   ============================================================ */

.partnerships-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 900px) {
  .partnerships-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-16);
  }
}

.partnerships-text > * + * {
  margin-top: var(--space-5);
}

.partnerships-media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 100px;
}
.partnerships-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-steps {
  margin-top: var(--space-10);
  display: grid;
  gap: var(--space-6);
}

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.process-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.process-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1;
}

.process-step h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.process-step p {
  font-size: var(--text-sm);
}

/* ============================================================
   STANDARDS — dark banner moment
   ============================================================ */

.standards {
  background: var(--color-primary);
  color: #fff;
}
[data-theme='dark'] .standards {
  background: var(--color-surface-2);
  border-block: 1px solid var(--color-divider);
}

.standards-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 900px) {
  .standards-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: var(--space-16);
  }
}

.standards h2 {
  color: #fff;
  font-size: var(--text-xl);
  max-width: 22ch;
}
[data-theme='dark'] .standards h2 {
  color: var(--color-text);
}

.standards p {
  color: color-mix(in oklab, white 78%, transparent);
  max-width: 58ch;
  margin-top: var(--space-4);
}
[data-theme='dark'] .standards p {
  color: var(--color-text-muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.badge {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4);
  border: 1px solid color-mix(in oklab, white 35%, transparent);
  border-radius: var(--radius-md);
  color: #fff;
  white-space: nowrap;
}
[data-theme='dark'] .badge {
  color: var(--color-text);
  border-color: var(--color-border);
}

/* ============================================================
   CONTACT / CTA
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-20);
  }
}

.contact-text h2 {
  font-size: var(--text-2xl);
  max-width: 14ch;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-md);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.contact-row:last-child {
  border-bottom: none;
}

.contact-row svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-row-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}

.contact-row a,
.contact-row span {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}
.contact-row a:hover {
  color: var(--color-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-10);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
}
.footer-brand .brand-mark {
  width: 26px;
  height: 26px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-links a:hover {
  color: var(--color-text);
}

.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding-bottom: var(--space-10);
}

.footer-meta a {
  color: var(--color-text-faint);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
