/* =========================================================================
   Direct Providers Care — Global styles
   Client-First structure: tokens > base > layout > typography > utilities
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --navy: #10284a;
  --navy-deep: #0b1d37;
  --navy-soft: #1b3a66;
  --ink: #0d1b2e;
  --steel: #5b6b82;
  --steel-light: #8794a8;
  --porcelain: #eef2f7;
  --mist: #e1e8f1;
  --line: #d6dfea;
  --white: #ffffff;
  --cobalt: #2e63a8;
  --cobalt-dark: #234f88;
  --sky: #cfddee;
  --sage: #4f7d45;
  --sage-tint: #e6efe2;
  --danger: #b4372f;
  --on-navy: #ffffff;
  --on-navy-muted: rgba(255, 255, 255, 0.72);
  --on-navy-line: rgba(255, 255, 255, 0.16);

  /* Type */
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;

  /* Radius hierarchy */
  --radius-panel: 28px;
  --radius-card: 16px;
  --radius-field: 10px;
  --radius-pill: 999px;

  /* Elevation (used sparingly) */
  --shadow-dock: 0 24px 60px -28px rgba(16, 40, 74, 0.45);
  --shadow-float: 0 10px 30px -18px rgba(16, 40, 74, 0.5);

  /* Layout */
  --frame: 14px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

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

::selection { background: var(--sky); color: var(--ink); }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--white);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout (Client-First) ---------- */
.page-wrapper { overflow-x: clip; }
.main-wrapper { display: block; }

.padding-global { padding-left: 2.5rem; padding-right: 2.5rem; }

.container-large,
.container-medium,
.container-small {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.container-large { max-width: 80rem; }
.container-medium { max-width: 64rem; }
.container-small { max-width: 48rem; }

.padding-section-small { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.padding-section-medium { padding-top: 5.5rem; padding-bottom: 5.5rem; }
.padding-section-large { padding-top: 7.5rem; padding-bottom: 7.5rem; }

.frame { padding-left: var(--frame); padding-right: var(--frame); }

/* ---------- Typography ---------- */
.heading-style-display,
.heading-style-h1,
.heading-style-h2,
.heading-style-h3,
.heading-style-h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: inherit;
  text-wrap: balance;
}
.heading-style-display { font-size: clamp(3.25rem, 7vw, 6.5rem); line-height: 0.98; letter-spacing: -0.015em; }
.heading-style-h1 { font-size: clamp(2.8rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.012em; }
.heading-style-h2 { font-size: clamp(2.25rem, 3.9vw, 3.4rem); line-height: 1.06; letter-spacing: -0.01em; }
.heading-style-h3 { font-size: clamp(1.65rem, 2.4vw, 2.05rem); line-height: 1.14; letter-spacing: -0.005em; }
.heading-style-h4 { font-size: 1.5rem; line-height: 1.2; }
.heading-style-h5 { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.35; font-weight: 500; }
.heading-style-h6 { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.4; font-weight: 500; }

.text-size-large { font-size: 1.25rem; line-height: 1.55; }
.text-size-medium { font-size: 1.0625rem; line-height: 1.65; }
.text-size-regular { font-size: 1rem; }
.text-size-small { font-size: 0.875rem; line-height: 1.55; }
.text-size-tiny { font-size: 0.78125rem; line-height: 1.55; }

.text-weight-light { font-weight: 300; }
.text-weight-normal { font-weight: 400; }
.text-weight-medium { font-weight: 500; }
.text-weight-bold { font-weight: 700; }

.text-color-primary { color: var(--ink); }
.text-color-secondary { color: var(--steel); }
.text-color-white { color: var(--white); }
.text-color-white-muted { color: var(--on-navy-muted); }
.text-color-cobalt { color: var(--cobalt); }

.text-align-center { text-align: center; }
.text-align-left { text-align: left; }

.text-style-link {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.text-style-link:hover { color: var(--cobalt-dark); }
.text-style-nowrap { white-space: nowrap; }

.max-width-small { max-width: 30rem; }
.max-width-medium { max-width: 38rem; }
.max-width-large { max-width: 48rem; }
.max-width-full { max-width: none; }
.align-center { margin-left: auto; margin-right: auto; }

/* ---------- Spacing utilities (Client-First) ---------- */
.margin-0 { margin: 0; }
.margin-top { margin-right: 0 !important; margin-bottom: 0 !important; margin-left: 0 !important; }
.margin-bottom { margin-top: 0 !important; margin-right: 0 !important; margin-left: 0 !important; }
.margin-tiny { margin: 0.25rem; }
.margin-xxsmall { margin: 0.5rem; }
.margin-xsmall { margin: 0.75rem; }
.margin-small { margin: 1rem; }
.margin-medium { margin: 1.5rem; }
.margin-large { margin: 2.5rem; }
.margin-xlarge { margin: 3.5rem; }
.margin-xxlarge { margin: 5rem; }

.spacer-small { height: 1rem; }
.spacer-medium { height: 2rem; }
.spacer-large { height: 3rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.45rem 0.4rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid var(--navy);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.button:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
.button .button_icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease);
}
.button .button_icon .icon { width: 1.05rem; height: 1.05rem; }
.button:hover .button_icon { transform: rotate(-45deg); }
.button.is-plain { padding-right: 1.5rem; }

.button.is-light { background: var(--white); color: var(--navy); border-color: var(--white); }
.button.is-light .button_icon { background: var(--navy); color: var(--white); }
.button.is-light:hover { background: var(--mist); border-color: var(--mist); }

.button.is-secondary { background: transparent; color: var(--navy); border-color: var(--line); }
.button.is-secondary .button_icon { background: var(--navy); color: var(--white); }
.button.is-secondary:hover { border-color: var(--navy); background: transparent; }

.button.is-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.button.is-ghost-light .button_icon { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.button.is-ghost-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); }

.button.is-small { min-height: 2.75rem; font-size: 0.875rem; padding-left: 1.15rem; }
.button.is-small .button_icon { width: 2rem; height: 2rem; }
.button.is-full { width: 100%; justify-content: space-between; }
.button[disabled] { opacity: 0.5; pointer-events: none; }

.button-group { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.button-group.is-center { justify-content: center; }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cobalt);
  font-weight: 500;
  font-size: 0.9375rem;
}
.text-button .icon { width: 1.05rem; height: 1.05rem; transition: transform 0.25s var(--ease); }
.text-button:hover .icon { transform: translateX(3px); }

/* ---------- Background utilities ---------- */
.background-color-white { background: var(--white); }
.background-color-porcelain { background: var(--porcelain); }
.background-color-navy { background: var(--navy); color: var(--white); }

/* ---------- Visibility ---------- */
.hide { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .padding-global { padding-left: 1.75rem; padding-right: 1.75rem; }
  .padding-section-large { padding-top: 5.5rem; padding-bottom: 5.5rem; }
  .padding-section-medium { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .hide-tablet { display: none !important; }
}
@media (max-width: 767px) {
  :root { --frame: 8px; }
  .padding-global { padding-left: 1.25rem; padding-right: 1.25rem; }
  .padding-section-large { padding-top: 4.25rem; padding-bottom: 4.25rem; }
  .padding-section-medium { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .padding-section-small { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .text-size-large { font-size: 1.125rem; }
  .hide-mobile { display: none !important; }
  .button { white-space: normal; text-align: left; }
}

@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;
  }
}

/* Inline icon sprite (kept out of layout, still renderable) */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
