/* ==========================================================================
   Coreo — base.css
   Design tokens, reset, typography, and scroll-reveal primitives.
   Brand colors are used at their exact values only. Transparency (rgba) is
   used for tinted panels so no brand hex is ever lightened or substituted.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — exact values, do not alter */
  --teal: #13A99E;   /* primary   */
  --plum: #8C236E;   /* secondary */
  --navy: #2A439D;   /* small accent only */

  /* Brand tints, produced by transparency rather than substitution */
  --teal-wash: rgba(19, 169, 158, 0.07);
  --teal-edge: rgba(19, 169, 158, 0.22);
  --plum-wash: rgba(140, 35, 110, 0.06);
  --plum-edge: rgba(140, 35, 110, 0.20);

  /* Neutrals */
  --ink:        #12262E;
  --ink-mid:    #3D525C;
  --ink-soft:   #5E747E;
  --line:       #E3EAEC;
  --surface:    #FFFFFF;
  --surface-alt:#F6F9FA;
  --shadow-sm:  0 1px 2px rgba(18, 38, 46, 0.05), 0 4px 12px rgba(18, 38, 46, 0.05);
  --shadow-md:  0 2px 4px rgba(18, 38, 46, 0.05), 0 12px 32px rgba(18, 38, 46, 0.08);
  --shadow-lg:  0 4px 8px rgba(18, 38, 46, 0.06), 0 24px 60px rgba(18, 38, 46, 0.12);

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Spacing + rhythm */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: 24px;
  --section-y: 112px;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* `clip` rather than `hidden`: it contains any stray horizontal overflow
     without creating a scroll container, which would break the sticky header. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-mid);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.021em;
}

h1 { font-size: clamp(2.05rem, 1.35rem + 2.6vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 1.20rem + 1.9vw, 2.55rem); }
h3 { font-size: clamp(1.18rem, 1.02rem + 0.6vw, 1.45rem); letter-spacing: -0.014em; }
h4 { font-size: 1.0625rem; letter-spacing: -0.008em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--plum); }

strong { color: var(--ink); font-weight: 650; }

/* Section eyebrow — the small uppercase label above each H2 */
.eyebrow {
  display: block;
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Lead paragraph — larger intro copy directly beneath a heading */
.lead {
  font-size: clamp(1.075rem, 1.00rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-mid);
}

/* Footnote reference superscript — the one place navy carries text */
.ref-mark {
  color: var(--navy);
  font-size: 0.7em;
  font-weight: 700;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
}
a.ref-mark:hover { color: var(--plum); }

/* Accessible skip link + screen-reader-only utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--plum);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   4. Scroll reveal
   Elements marked [data-reveal] start offset and fade up once they enter the
   viewport. reveal.js adds .is-visible; groups marked [data-stagger] have a
   per-child delay applied inline.
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Alternate reveal directions for lateral content */
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.965); }
[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible,
[data-reveal="scale"].is-visible { transform: none; }

/* Anything before JS runs stays visible if scripting is unavailable */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* On narrow screens a horizontal offset can push past the viewport edge before
   the element is revealed. Fall back to the vertical fade there. */
@media (max-width: 900px) {
  [data-reveal="left"],
  [data-reveal="right"] { transform: translateY(28px); }
}

/* --------------------------------------------------------------------------
   5. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
