/* Healthy360 — premium clinical design system.
 *
 * Palette, typography, and base components shared by the public site and
 * the admin portal. Loaded before page-specific stylesheets.
 */

:root {
  /* Palette */
  --navy:       #0a1e3a;
  --navy-2:     #152d4e;
  --navy-3:     #22406e;
  --paper:      #fafbfc;
  --surface:    #ffffff;
  --surface-2:  #f4f7fa;
  --sage:       #4a9b8e;
  --sage-dark:  #358373;
  --sage-tint:  #e9f4f1;
  --gold:       #c9a961;
  --gold-tint:  #f7f0dc;
  --ink:        #1a2332;
  --ink-2:      #2a3547;
  --muted:      #6b7280;
  --muted-2:    #9aa3b2;
  --border:     #e5e9ef;
  --border-2:   #d8deea;
  --ok:         #059669;
  --warn:       #c77f2a;
  --err:        #c0392f;

  /* Shape */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(10, 30, 58, 0.05);
  --shadow:    0 4px 14px rgba(10, 30, 58, 0.08);
  --shadow-lg: 0 20px 40px rgba(10, 30, 58, 0.14);

  /* Motion */
  --t: 200ms cubic-bezier(.2,.7,.2,1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sage-dark); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--navy); }

/* Typography */
.display, h1, h2, h3 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.6rem); line-height: 1.08; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 2.4vw + .5rem, 2.4rem); line-height: 1.15; margin: 0 0 .5em; }
h3 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 .4em; }
h4 { font-family: "Inter"; font-weight: 600; font-size: 1.05rem; margin: 0 0 .4em; color: var(--ink); }
.eyebrow {
  font-family: "Inter";
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 0.6em;
}
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-2); background: var(--surface-2); }
.btn:focus-visible {
  outline: 3px solid rgba(74,155,142,.35);
  outline-offset: 2px;
}
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 55%, var(--navy-2) 130%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(10,30,58,.18);
}
.btn.primary:hover {
  background: linear-gradient(135deg, var(--sage-dark) 0%, var(--navy-2) 90%, var(--navy) 130%);
  transform: translateY(-1px);
}
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.gold  { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn.gold:hover  { background: #b89848; border-color: #b89848; }
.btn.sm { padding: 8px 14px; font-size: 0.85rem; }
.btn.lg { padding: 16px 30px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card.elev { box-shadow: var(--shadow); }
.card.padded { padding: 28px; }

/* Inputs */
label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=time], input[type=url],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(74,155,142,.15);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }

/* Pills */
.pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.pill.sage { background: var(--sage-tint); color: var(--sage-dark); }
.pill.gold { background: var(--gold-tint); color: #8c6f2c; }
.pill.navy { background: rgba(10,30,58,.08); color: var(--navy); }
.pill.ok   { background: #e7f5ee; color: var(--ok); }
.pill.warn { background: #fbeed8; color: var(--warn); }
.pill.err  { background: #fbe3e2; color: var(--err); }

/* Divider */
hr.hr-soft { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
  z-index: 4000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Disclaimer stripe — reused at top + footer for not-HIPAA clarity */
.disclaimer {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--sage-tint);
  border-left: 3px solid var(--sage);
  padding: 10px 14px;
  border-radius: var(--r-sm);
}
