/* ==========================================================================
   Apex Evergreen Pharma — Global Styles
   --------------------------------------------------------------------------
   Reset, base typography, links, layout container, buttons, and shared
   utility classes (eyebrow labels, sections). Consumes tokens defined in
   design-system.css — always load that file FIRST.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--color-ink);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   2. BASE TYPOGRAPHY
   Headlines use the display serif; body uses the sans. Sentence case
   everywhere by default — we never force uppercase except the eyebrow.
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none; /* sentence case */
  color: inherit;
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
h3 { font-size: clamp(1.5rem, 2vw + 0.75rem, 2rem); }
h4 { font-size: clamp(1.25rem, 1vw + 0.75rem, 1.5rem); }

p {
  font-family: var(--font-body);
  max-width: 68ch;
}

/* Italic emphasis uses the mid sage green as an editorial accent */
em,
.italic-accent {
  font-style: italic;
  color: var(--color-sage);
}

strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. LINKS
   -------------------------------------------------------------------------- */
a {
  color: var(--color-gold-deep);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   4. LAYOUT — reusable container
   Centered, max-width capped, with responsive side padding.
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* Generic vertical rhythm for full-width page sections */
.section {
  padding-block: var(--space-3xl);
}

/* Dark surface helper — flips text colors for forest-background sections */
.surface-dark {
  background-color: var(--color-forest);
  color: var(--color-text-light);
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4 {
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   5. EYEBROW LABEL
   Small, letter-spaced, uppercase, gold — sits above headlines.
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-bottom: var(--space-md);
}

/* On dark surfaces the eyebrow uses the brighter gold */
.surface-dark .eyebrow {
  color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   6. BUTTONS
   .btn base + .btn-primary (solid gold) + .btn-secondary (gold outline).
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

/* Refined premium hover — a subtle lift; colour shifts live on the variants. */
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px);
}

/* Primary — solid gold */
.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-forest);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background-color: var(--color-gold-deep);
  border-color: var(--color-gold-deep);
  color: var(--color-text-light);
  box-shadow: var(--shadow-soft);
}

/* Secondary — gold outline */
.btn-secondary {
  background-color: transparent;
  color: var(--color-gold-deep);
  border-color: var(--color-gold);
}

.btn-secondary:hover {
  background-color: var(--color-gold);
  color: var(--color-forest);
}

/* On dark surfaces the outline button uses lighter gold text */
.surface-dark .btn-secondary {
  color: var(--color-gold);
}

.surface-dark .btn-secondary:hover {
  color: var(--color-forest);
}

/* --------------------------------------------------------------------------
   7. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   CONTEXTUAL ICON SET (.ae-ico)
   Shared thin-gold-line icon style. Child shapes inherit stroke/fill/width
   from the <svg>, and non-scaling-stroke keeps the line crisp and consistent
   at any icon size. Gold by default; light-background sections override the
   stroke to --color-gold-deep in their own CSS. (The orbital-node divider
   motif is intentionally NOT part of this set.)
   -------------------------------------------------------------------------- */
.ae-ico {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.ae-ico * {
  vector-effect: non-scaling-stroke;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
