/* ==========================================================================
   Apex Evergreen Pharma — Therapeutic Areas Page Styles
   --------------------------------------------------------------------------
   Self-contained page styles. Consumes tokens from design-system.css and
   builds on global.css. Redefines the shared components (reveal, node-divider)
   with identical values so this page looks like the same site without loading
   home.css.

   Sections:
     1. Hero   2. Stats accent   3. The 13 areas grid
     4. Depth & breadth (linking)   5. Closing CTA
   ========================================================================== */

/* ==========================================================================
   SHARED — SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   SHARED — CONNECTIVE NODE DIVIDER
   ========================================================================== */
.node-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding-block: var(--space-2xl);
}
.node-divider--cream  { background-color: var(--color-cream); }
.node-divider--forest { background-color: var(--color-forest); }
.node-divider::before,
.node-divider::after {
  content: "";
  height: 1px;
  width: clamp(48px, 14vw, 180px);
  background: linear-gradient(to right, transparent, rgba(201, 169, 74, 0.45));
}
.node-divider::after { transform: scaleX(-1); }
.node-divider__mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.node-divider__mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-box: fill-box;
  transform-origin: center;
}
.node-mark__ring { stroke: var(--color-gold); stroke-width: 1.25; opacity: 0.7; fill: none; }
.node-mark__core { fill: var(--color-gold); transform-box: fill-box; transform-origin: center; }
@keyframes node-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.15); }
}
.node-divider__mark .node-mark__core { animation: node-pulse 3.2s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) {
  .node-divider__mark .node-mark__core { animation: none; }
}

/* ==========================================================================
   1. HERO  (cream) — clears the fixed header
   ========================================================================== */
.ta-hero {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: calc(var(--header-height) + var(--space-2xl)) var(--space-2xl);
}
.ta-hero__content { max-width: 62ch; }
.ta-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}
.ta-hero__lead {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.3rem);
  line-height: 1.6;
  color: var(--color-text-muted-light);
  max-width: 66ch;
}

/* ==========================================================================
   2. STATS accent  (forest)
   ========================================================================== */
.ta-stats {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ta-stats__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2xl);
}
.ta-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ta-stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 3vw + 1rem, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums;
}
.ta-stat__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted-dark);
}
.ta-stat__sep {
  width: 1px;
  align-self: stretch;
  min-height: 48px;
  background-color: rgba(169, 184, 174, 0.2);
}

/* ==========================================================================
   3. THE 13 AREAS grid  (cream)
   ========================================================================== */
.ta-areas {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ta-areas__header {
  max-width: 48ch;
  margin-bottom: var(--space-2xl);
}
.ta-areas__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw + 0.75rem, 3rem);
  line-height: 1.12;
  color: var(--color-ink);
}
.ta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.ta-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius);
  background-color: #fff;
  border: 1px solid var(--color-cream-dark);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}
.ta-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 169, 74, 0.5);
  box-shadow: var(--shadow-soft);
}
/* Thin-lined gold icons colour from currentColor. */
.ta-card__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-md);
  color: var(--color-gold-deep);
  transition: color var(--transition);
}
.ta-card__icon svg { width: 100%; height: 100%; overflow: visible; }
.ta-card:hover .ta-card__icon { color: var(--color-gold); }
.ta-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}
.ta-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-muted-light);
  margin-top: auto;
}
/* Reveal stagger across the grid (4-column cadence). */
.ta-grid .ta-card.reveal:nth-child(4n + 1) { transition-delay: 0.00s; }
.ta-grid .ta-card.reveal:nth-child(4n + 2) { transition-delay: 0.06s; }
.ta-grid .ta-card.reveal:nth-child(4n + 3) { transition-delay: 0.12s; }
.ta-grid .ta-card.reveal:nth-child(4n + 4) { transition-delay: 0.18s; }

/* ==========================================================================
   4. DEPTH & BREADTH (linking)  (forest)
   ========================================================================== */
.ta-linking {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.ta-linking .eyebrow { color: var(--color-gold); }
.ta-linking__content { max-width: 64ch; }
.ta-linking__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3vw + 0.75rem, 3rem);
  line-height: 1.12;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}
.ta-linking__body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
  line-height: 1.7;
  color: var(--color-text-muted-dark);
  margin-bottom: var(--space-xl);
}
.ta-linking__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
/* Gold-outline buttons read clearly on the forest surface. */
.ta-linking .btn-secondary { color: var(--color-gold); }
.ta-linking .btn-secondary:hover { color: var(--color-forest); }

/* ==========================================================================
   5. CLOSING CTA  (forest, flows into footer)
   ========================================================================== */
.ta-closing {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-2xl) var(--space-3xl);
}
.ta-closing__inner { text-align: center; }
.ta-closing .eyebrow { color: var(--color-gold); }
.ta-closing__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw + 0.75rem, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  text-wrap: balance;
}
.ta-closing__line {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.7vw + 0.9rem, 1.2rem);
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-text-light) 70%, var(--color-text-muted-dark) 30%);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1000px) {
  .ta-grid { grid-template-columns: repeat(2, 1fr); }
  .ta-grid .ta-card.reveal:nth-child(n) { transition-delay: 0s; }
}
@media (max-width: 620px) {
  .ta-grid { grid-template-columns: 1fr; }
  .ta-stats__row { gap: var(--space-lg); }
  .ta-stat__sep { display: none; }
  .ta-linking__actions .btn { width: 100%; }
  .ta-closing__cta .btn { width: 100%; }
}
