/**
 * Tiragena — Inner marketing pages premium layer
 * Applies to science, publications, blog, pipeline, patients, investors, careers, legal.
 * Complements redesign.css; preserves CMS selectors and i18n.
 */

html:not([data-theme="dark"]) body[data-page] {
  --page-navy: #0a1628;
  --page-ink: #0f172a;
  --page-muted: #475569;
  --page-line: rgba(15, 23, 42, 0.08);
  --page-teal: #0d9488;
  --page-surface: #ffffff;
  --page-band: #f4f7fa;
  --page-max: min(80rem, 100%);
  background: var(--page-surface);
  color: var(--page-ink);
}

html:not([data-theme="dark"]) body[data-page]::before,
html:not([data-theme="dark"]) body[data-page]::after {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Compact hero for archive / document pages */
html:not([data-theme="dark"]) .ix-hero--compact {
  min-height: auto !important;
  padding: clamp(3rem, 6vw, 4.5rem) 0 !important;
  border-bottom: 1px solid var(--page-line);
}

html:not([data-theme="dark"]) .ix-hero__grid--single {
  grid-template-columns: 1fr !important;
  max-width: var(--page-max);
}

html:not([data-theme="dark"]) .ix-hero--compact h1 {
  font-size: clamp(1.875rem, 3.5vw, 2.625rem) !important;
  max-width: none;
  hyphens: manual;
  overflow-wrap: break-word;
}

html:not([data-theme="dark"]) .ix-hero--compact .lede {
  max-width: 58ch !important;
}

/* Content blocks */
html:not([data-theme="dark"]) .content-block,
html:not([data-theme="dark"]) .science-page-content {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 2rem);
}

html:not([data-theme="dark"]) .content-block h2,
html:not([data-theme="dark"]) .science-page-content > h1 {
  font-family: "Sora", var(--font-sans, sans-serif);
  color: var(--page-ink) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

html:not([data-theme="dark"]) .science-links {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--page-muted);
}

html:not([data-theme="dark"]) .science-links a {
  color: var(--page-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 148, 136, 0.35);
}

html:not([data-theme="dark"]) .science-links a:hover {
  border-bottom-color: var(--page-teal);
}

/* Publications archive */
html:not([data-theme="dark"]) .science-archive {
  padding-top: 0;
}

html:not([data-theme="dark"]) .science-publications-filter__chip {
  background: var(--page-surface);
  border: 1px solid var(--page-line);
  color: var(--page-ink);
}

html:not([data-theme="dark"]) .science-publications-filter__chip.is-active,
html:not([data-theme="dark"]) .science-publications-filter__chip:hover {
  border-color: var(--page-teal);
  color: var(--page-teal);
  background: rgba(13, 148, 136, 0.06);
}

html:not([data-theme="dark"]) .science-publication-card {
  background: var(--page-surface) !important;
  border: 1px solid var(--page-line) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

html:not([data-theme="dark"]) .science-publication-card:hover {
  border-color: rgba(13, 148, 136, 0.35) !important;
  box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.18);
}

html:not([data-theme="dark"]) .science-publication-card__title,
html:not([data-theme="dark"]) .science-publication-card__year {
  color: var(--page-ink) !important;
}

html:not([data-theme="dark"]) .science-publication-card__date,
html:not([data-theme="dark"]) .science-publication-card__body {
  color: var(--page-muted) !important;
}

html:not([data-theme="dark"]) .science-publication-card__toggle {
  color: var(--page-ink) !important;
}

html:not([data-theme="dark"]) .science-publication-card__quicklink {
  color: var(--page-teal) !important;
}

/* Science overview sections on science.html */
html:not([data-theme="dark"]) .science-overview-section {
  border-top: 1px solid var(--page-line);
}

html:not([data-theme="dark"]) .science-overview-section h2 {
  color: var(--page-ink) !important;
}

html:not([data-theme="dark"]) .science-overview-section p {
  color: var(--page-muted);
}

/* Blog page hero alias */
html:not([data-theme="dark"]) .page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2rem);
  max-width: var(--page-max);
  margin-inline: auto;
  border-bottom: 1px solid var(--page-line);
}

html:not([data-theme="dark"]) .page-hero h1 {
  font-family: "Sora", var(--font-sans, sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--page-ink) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  margin-bottom: 1rem;
}

html:not([data-theme="dark"]) .page-hero .lede {
  font-size: 1.125rem;
  line-height: 1.62;
  color: var(--page-muted);
  max-width: 58ch;
}

/* Pipeline H1 word-break fix */
html:not([data-theme="dark"]) #pipeline-hero-heading {
  max-width: none;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 48rem) {
  html:not([data-theme="dark"]) .science-publication-card {
    padding: 1rem !important;
  }

  html:not([data-theme="dark"]) .content-block,
  html:not([data-theme="dark"]) .science-page-content {
    padding-inline: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="dark"]) .science-publication-card {
    transition: none !important;
  }
}
