/* ============================================================
   Carebridge — Base layer
   Element defaults + a few brand utilities (eyebrow, container,
   heartbeat divider, globe texture). Tokens come from the
   imported token files.
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-snug);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; display: block; }

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

.cb-eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--teal-600);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.cb-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-heartbeat);
}

/* Heartbeat / ECG divider line — a calm brand motif */
.cb-heartbeat {
  width: 100%;
  height: 28px;
  color: var(--teal-500);
  opacity: 0.9;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 240px 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='28' viewBox='0 0 240 28'%3E%3Cpath d='M0 14h78l8-9 9 18 10-22 9 26 8-13h110' fill='none' stroke='%231CA89C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Soft globe / connectivity grid texture for dark panels */
.cb-globe-texture {
  background-image:
    radial-gradient(circle at 50% 50%, rgba(28,168,156,0.16), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 64px);
}

/* Subtle dot texture for light sunken areas */
.cb-dot-texture {
  background-image: radial-gradient(rgba(27,58,107,0.10) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
}

/* Scroll-reveal helper (opt-in; safe for print/reduced-motion) */
.cb-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.cb-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .cb-reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
