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

   Sections:
     1. Hero (vault)   2. Four accreditations   3. Quality philosophy
     4. Regulatory approvals   5. What it means for partners   6. 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; }
}

/* Shared orbital-node icon fills (used in the quality-pillar cards). */
.cap-icon__ring { stroke: var(--color-gold); stroke-width: 1.25; opacity: 0.8; }
.cap-icon__core,
.cap-icon__sats circle { fill: var(--color-gold); }
.cap-icon__sats circle { opacity: 0.9; }

/* ==========================================================================
   1. HERO  (deep forest, "vault")
   ========================================================================== */
.qc-hero {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: calc(var(--header-height) + var(--space-2xl)) var(--space-2xl);
}
.qc-hero__content { max-width: 60ch; }
.qc-hero .eyebrow { color: var(--color-gold); }
.qc-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 5vw + 1rem, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}
/* Signature italic-sage second line. */
.qc-hero__title-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--color-sage-light);
}
.qc-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;
  /* Brightened muted tone for readability on the dark backdrop. */
  color: color-mix(in srgb, var(--color-text-light) 72%, var(--color-text-muted-dark) 28%);
  max-width: 64ch;
}

/* ==========================================================================
   2. FOUR ACCREDITATIONS  (cream) — credential cards
   ========================================================================== */
.qc-creds {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: var(--space-lg) var(--space-2xl);
}
.qc-creds__header {
  max-width: 52ch;
  margin-bottom: var(--space-2xl);
}
.qc-creds__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);
}
.qc-creds__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.cred-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);
}
.cred-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 169, 74, 0.55);
  box-shadow: var(--shadow-soft);
}
.cred-card__rule {
  display: block;
  width: 32px;
  height: 2px;
  background-color: var(--color-gold);
  margin-bottom: var(--space-md);
  transition: width var(--transition);
}
.cred-card:hover .cred-card__rule { width: 48px; }
.cred-card__acronym {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.5vw + 1.25rem, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--color-gold-deep);
  margin-bottom: var(--space-xs);
}
.cred-card__subtitle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}
.cred-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;
}
.qc-creds__grid .cred-card.reveal:nth-child(1) { transition-delay: 0.00s; }
.qc-creds__grid .cred-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.qc-creds__grid .cred-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.qc-creds__grid .cred-card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ==========================================================================
   3. QUALITY PHILOSOPHY  (forest) — pillar card grid
   ========================================================================== */
.qc-approach {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.qc-approach .eyebrow { color: var(--color-gold); }
.qc-approach__header {
  max-width: 62ch;
  margin-bottom: var(--space-2xl);
}
.qc-approach__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);
}
.qc-approach__intro {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.15rem);
  line-height: 1.7;
  color: var(--color-text-muted-dark);
  max-width: 66ch;
}
.qc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.qc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius);
  background-color: rgba(30, 58, 42, 0.3);
  border: 1px solid rgba(201, 169, 74, 0.16);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition);
}
.qc-card:hover {
  transform: translateY(-6px);
  background-color: rgba(30, 58, 42, 0.5);
  border-color: rgba(201, 169, 74, 0.45);
  box-shadow: 0 18px 44px rgba(12, 26, 18, 0.5);
}
.qc-card__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-md);
}
.qc-card__icon svg { width: 100%; height: 100%; overflow: visible; }
.qc-card:hover .cap-icon__ring { opacity: 1; }
.qc-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}
.qc-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-muted-dark);
  margin-top: auto;
}
.qc-grid .qc-card.reveal:nth-child(3n + 1) { transition-delay: 0.00s; }
.qc-grid .qc-card.reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.qc-grid .qc-card.reveal:nth-child(3n + 3) { transition-delay: 0.16s; }

/* ==========================================================================
   4. REGULATORY APPROVALS  (cream)
   ========================================================================== */
.qc-approvals {
  background-color: var(--color-cream);
  color: var(--color-ink);
  padding-block: var(--space-lg) var(--space-2xl);
}
.qc-approvals__content { max-width: 68ch; }
.qc-approvals__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);
  margin-bottom: var(--space-md);
}
.qc-approvals__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-light);
  margin-bottom: var(--space-xl);
}
/* Mini stats accent band. */
.qc-mini-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-cream-dark);
  border-bottom: 1px solid var(--color-cream-dark);
  margin-bottom: var(--space-xl);
}
.qc-mini-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.qc-mini-stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 2vw + 1rem, 2.75rem);
  line-height: 1;
  color: var(--color-evergreen);
}
.qc-mini-stat__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted-light);
}
.qc-mini-stat__sep {
  width: 1px;
  align-self: stretch;
  background-color: var(--color-cream-dark);
}
.qc-approvals__cta { align-self: flex-start; }

/* ==========================================================================
   5. WHAT IT MEANS FOR PARTNERS  (forest)
   ========================================================================== */
.qc-partners {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-lg) var(--space-2xl);
}
.qc-partners .eyebrow { color: var(--color-gold); }
.qc-partners__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: center;
}
.qc-partners__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);
}
.qc-partners__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);
  max-width: 60ch;
}
.qc-partners__points {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.qc-point {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}
.qc-point__mark {
  position: relative;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background-color: var(--color-gold);
}
.qc-point__mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  opacity: 0.45;
}
.qc-point__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--color-text-light);
  margin-bottom: 0.15rem;
}
.qc-point__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text-muted-dark);
}

/* ==========================================================================
   6. CLOSING CTA  (forest, flows into footer)
   ========================================================================== */
.qc-closing {
  background-color: var(--color-forest);
  color: var(--color-text-light);
  padding-block: var(--space-2xl) var(--space-3xl);
}
.qc-closing__inner { text-align: center; }
.qc-closing .eyebrow { color: var(--color-gold); }
.qc-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;
}
.qc-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) {
  .qc-creds__grid { grid-template-columns: repeat(2, 1fr); }
  .qc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .qc-partners__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
}
@media (max-width: 620px) {
  .qc-creds__grid { grid-template-columns: 1fr; }
  .qc-grid { grid-template-columns: 1fr; }
  .qc-mini-stat__sep { display: none; }
  .qc-mini-stats { gap: var(--space-md); }
  .qc-approvals__cta,
  .qc-closing__cta .btn { width: 100%; }
}
