/* ============================================================
   COMMA COPYWRITERS — DESIGN TOKENS
   Source: brand style guide, Nov 2025
   Direction: healthcare-storyteller, editorial-magazine
   ============================================================ */

:root {
  /* ---- COLOR ---- */
  --c-navy:        #1F3A5F;   /* primary structural */
  --c-navy-deep:   #142844;   /* footer, deep stops */
  --c-navy-ink:    #0C1A2E;   /* hero overlays */
  --c-magenta:     #D6286E;   /* CTA + accent */
  --c-magenta-soft:#F25A8A;   /* hover, gradient mid */
  --c-rose-tint:   #FCE6EF;   /* magenta wash */

  --c-bg:          #FAF8F5;   /* off-white surface */
  --c-bg-warm:     #F3EFE7;   /* warmer band */
  --c-paper:       #FFFFFF;
  --c-ink:         #141414;   /* body */
  --c-ink-soft:    #2A2F38;
  --c-muted:       #5C6B7A;
  --c-hairline:    #E5E1D8;
  --c-hairline-cool: #E5E8EC;

  /* ---- TYPE ---- */
  --f-serif: "Playfair Display", "Lora", "Cormorant Garamond", Georgia, serif;
  --f-sans:  "Inter", "Source Sans Pro", system-ui, -apple-system, sans-serif;
  --f-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* fluid type scale, mobile→desktop */
  --t-display: clamp(3.25rem, 8vw + 0.5rem, 8.5rem);  /* hero */
  --t-h1:      clamp(2.5rem, 4.5vw + 0.5rem, 5rem);
  --t-h2:      clamp(2rem, 3.2vw + 0.5rem, 3.5rem);
  --t-h3:      clamp(1.375rem, 1.4vw + 1rem, 2rem);
  --t-eyebrow: 0.78rem;
  --t-body-lg: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
  --t-body:    1rem;
  --t-meta:    0.825rem;

  /* ---- SPACING ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  --section-y: clamp(5rem, 8vw, 9rem);
  --container:    1280px;
  --container-wide: 1440px;
  --gutter:    clamp(1.25rem, 3vw, 2.5rem);

  /* ---- MISC ---- */
  --radius-1: 4px;
  --radius-2: 10px;
  --radius-3: 18px;
  --shadow-card: 0 1px 2px rgba(20,40,68,0.04), 0 10px 40px -20px rgba(20,40,68,0.25);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.2, 1);
  --dur-1: 240ms;
  --dur-2: 480ms;
  --dur-3: 900ms;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4, h5, p { margin: 0; }

::selection { background: var(--c-magenta); color: white; }

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- TYPOGRAPHY UTILS ---------- */
.eyebrow {
  font-family: var(--f-sans);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-magenta);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.on-dark { color: var(--c-magenta-soft); }

.serif { font-family: var(--f-serif); font-weight: 600; letter-spacing: -0.015em; }
.lowercase { text-transform: lowercase; }
.text-muted { color: var(--c-muted); }
.text-magenta { color: var(--c-magenta); }
.text-navy { color: var(--c-navy); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  border-radius: var(--radius-1);
  transition: transform var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              box-shadow var(--dur-1) var(--ease-out);
  will-change: transform;
}
.btn--primary {
  background: var(--c-magenta);
  color: white;
}
.btn--primary:hover {
  background: #B8175A;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(214,40,110,0.5);
}
.btn--ghost-light {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn--ghost-light:hover { border-color: white; }
.btn--ghost-dark {
  background: transparent;
  color: var(--c-navy);
  border: 1px solid var(--c-navy);
}
.btn--ghost-dark:hover { background: var(--c-navy); color: white; }

.btn .arrow {
  display: inline-block;
  transition: transform var(--dur-1) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- REVEAL ANIMATIONS ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
