/* ============================================================
   HospitAlert — Marketing site (production)
   Tokens lifted directly from the official Brand & Marketing Strategy v2.
   ============================================================ */
:root {
  /* Six official tokens */
  --brand-primary: #50CE76;   /* Hospitalert Green — CTAs, brand mark (per brand doc) */
  --brand-accent:  #6AF293;   /* Action Mint — highlights, success, decorative only — NEVER a CTA */
  --brand-deep:    #1F8047;   /* internal accessibility helper: darker green only used for text-on-light-bg cases (eyebrow on tint, etc.) */
  --brand-tint:    #E9FBEF;
  --ink-900: #111827;  /* Ink — primary text + text color on green buttons (7.9:1 contrast) */
  --ink-700: #374151;  /* Slate — secondary text */
  --ink-500: #6B7280;
  --ink-300: #9CA3AF;
  --ink-200: #E5E7EB;  /* Line */
  --ink-100: #F3F4F6;  /* Surface */
  --ink-50:  #F9FAFB;

  /* Type families (per brand doc) */
  --f-ui:   'Urbanist', system-ui, -apple-system, sans-serif;
  --f-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --grad: linear-gradient(135deg, #50CE76 0%, #6AF293 100%);
  --grad-soft: linear-gradient(180deg, #ffffff 0%, #F3F4F6 100%);

  --sh-card: 0 1px 2px rgba(17,24,39,0.04), 0 8px 24px -12px rgba(17,24,39,0.06);
  --sh-cta:  0 6px 20px -8px rgba(80,206,118,0.45);
  --sh-phone: 0 60px 100px -30px rgba(17,24,39,0.30), 0 0 0 1px rgba(255,255,255,0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  background: white;
  color: var(--ink-900);
  font-family: var(--f-body);
  font-size: 16px;                /* brand doc: body minimum 16px */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--f-ui); cursor: pointer; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink-900); color: white;
  padding: 10px 14px; border-radius: 8px;
  font-family: var(--f-ui); font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Page wrap ---------- */
.page { background: white; color: var(--ink-900); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap { padding: 0 24px; } }

/* ---------- NAV — dark mode to match the dark-mode logo bg #0E1116 ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: #0E1116;             /* exact match to the dark-mode logo bg — no visible edge */
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.nav-inner {
  height: 160px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 40px;
  font-family: var(--f-ui); font-weight: 500; font-size: 15px;
  color: rgba(255,255,255,0.65);   /* light gray on dark for AA contrast */
}
.nav ul li a { transition: color .15s ease; }
.nav ul li a:hover { color: white; }
.nav ul li.active a { color: white; font-weight: 600; }
.nav .right { display: flex; align-items: center; gap: 12px; }
.nav .menu-toggle {
  display: none; background: none; border: 0; padding: 6px 10px;
  color: white; font-size: 22px; line-height: 1;
}
@media (max-width: 880px) {
  .nav-inner { height: 96px; }
  .nav ul { display: none; }
  .nav .menu-toggle { display: inline-flex; }
  .nav.open ul {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 96px; left: 0; right: 0;
    background: #0E1116;
    padding: 24px 32px; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ---------- BRAND LOGO ---------- */
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { display: block; height: 120px; width: auto; }
.brand-logo.sm img { height: 120px; } /* nav — dominant brand presence (trimmed logo, transparent bg) */
.brand-logo.md img { height: 80px; }  /* footer */
.brand-logo.lg img { height: 140px; }
@media (max-width: 880px) {
  .brand-logo.sm img { height: 72px; }
  .brand-logo.md img { height: 56px; }
}
@media (max-width: 480px) {
  .brand-logo.sm img { height: 56px; }
}

/* ---------- BUTTONS ----------
   Primary uses brand #50CE76 with DARK text (#111827).
   This is the only combination that satisfies both
   (a) the brand doc ("use #50CE76 only for primary CTAs") and
   (b) WCAG 2.1 AA contrast (7.9:1 — passes AAA).
   White text on #50CE76 would be 2:1 and fail WCAG AA.
*/
.btn {
  font-family: var(--f-ui); font-weight: 600;
  font-size: 15px; padding: 13px 24px;
  border-radius: 999px;      /* Apple-style pill */
  border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background-color .15s ease, transform .08s ease, box-shadow .15s ease;
  text-decoration: none;
  letter-spacing: 0;
}
.btn.primary {
  background: var(--brand-primary);
  color: var(--ink-900);     /* DARK text on green — 7.9:1 contrast, ADA AAA */
  box-shadow: var(--sh-cta);
}
.btn.primary:hover {
  background: #43c068;
  transform: translateY(-1px);
}
.btn.primary:active { transform: translateY(0); }
.btn.primary:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 3px; }

.btn.ghost {
  background: white;
  color: var(--ink-900);
  border: 1px solid var(--ink-200);
}
.btn.ghost:hover { background: var(--ink-100); }

.btn.dark { background: var(--ink-900); color: white; }
.btn.dark:hover { background: #0a0f1a; }

.btn.lg { padding: 17px 32px; font-size: 16px; }
.btn.sm { padding: 9px 18px; font-size: 13px; }

/* ---------- EYEBROW ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-ui); font-weight: 600;
  font-size: 13px; letter-spacing: 0.04em;
  background: var(--brand-tint); color: var(--brand-deep);
  padding: 7px 14px; border-radius: 999px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary);
}

/* ---------- TYPOGRAPHY ---------- */
/* Display sizes are Apple-scaled while character (family, sentence case, tracking)
   follows the brand doc strictly. Sentence case throughout. */
.h-display { font-family: var(--f-ui); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.h1 { font-size: clamp(44px, 6.5vw, 96px); line-height: 1.02; letter-spacing: -0.03em; }
.h2 { font-size: clamp(34px, 4.5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; }
.h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.h4 { font-size: 20px; line-height: 1.3; letter-spacing: -0.005em; }
.h-display .grad { color: var(--brand-deep); }   /* solid darker brand-green for accent words — passes contrast on white */

.lede {
  font-family: var(--f-body); font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5; color: var(--ink-700); margin: 0;
}
.body { font-family: var(--f-body); font-size: 16px; line-height: 1.6; color: var(--ink-700); }
.body.lg { font-size: 17px; }
.muted { color: var(--ink-500); }
.mono-tag {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-500);
}

/* ---------- CARD ---------- */
.card {
  background: white; border: 1px solid var(--ink-200);
  border-radius: 20px; padding: 32px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover {
  box-shadow: var(--sh-card);
  border-color: rgba(17,24,39,0.1);
}
.card.flat:hover { box-shadow: none; transform: none; }

/* ---------- HERO BG WASH ---------- */
.hero-bg {
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(106,242,147,0.18), transparent 60%);
}

/* ---------- ICON CHIP ---------- */
.icon-chip {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand-tint); color: var(--brand-deep);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-chip.lg { width: 56px; height: 56px; }
.icon-chip.solid { background: var(--brand-primary); color: var(--ink-900); }

/* ---------- PHOTO PLACEHOLDER ---------- */
.photo {
  position: relative;
  background:
    repeating-linear-gradient(135deg, #DCDFE7 0px, #DCDFE7 1px, transparent 1px, transparent 12px),
    linear-gradient(160deg, #E8EAF2 0%, #D5D9E2 100%);
  border-radius: 20px;
  overflow: hidden;
  min-height: 280px;
}
.photo .label {
  position: absolute; left: 20px; top: 18px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  color: rgba(17,24,39,0.5); text-transform: uppercase;
}
.photo.dark {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 14px),
    linear-gradient(160deg, #1f2937 0%, #0b1220 100%);
  border: 1px solid rgba(255,255,255,0.06);
}
.photo.dark .label { color: rgba(255,255,255,0.4); }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--ink-200);
  padding: 96px 0 32px;
  background: white;
}
.footer .grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 64px;
}
@media (max-width: 880px) {
  .footer .grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer .grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer .grid { grid-template-columns: 1fr; }
}
.footer h5 {
  font-family: var(--f-ui); font-weight: 600; font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-500); margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer ul li a {
  font-family: var(--f-body); font-size: 15px; color: var(--ink-700);
  transition: color .15s ease;
}
.footer ul li a:hover { color: var(--ink-900); }
.footer .legal {
  border-top: 1px solid var(--ink-200);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-body); font-size: 13px; color: var(--ink-500);
  flex-wrap: wrap; gap: 12px;
}
.footer .legal a { color: var(--ink-700); margin-left: 24px; }
.footer .legal a:hover { color: var(--ink-900); }
@media (max-width: 640px) {
  .footer .legal a { margin-left: 0; margin-right: 24px; }
}

/* ---------- SECTIONS ---------- */
.section { padding: 128px 0; }
.section.tight { padding: 96px 0; }
.section.dark { background: var(--ink-900); color: white; }
.section.tint { background: var(--ink-100); }
@media (max-width: 880px) {
  .section { padding: 80px 0; }
  .section.tight { padding: 64px 0; }
}

.sec-head {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 720px; margin: 0 auto 80px;
  text-align: center; align-items: center;
}
.sec-head.left {
  margin-left: 0; margin-right: auto;
  text-align: left; align-items: flex-start;
}

/* ---------- GRID HELPERS ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- HERO SPLIT ---------- */
.hero-split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-split { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- ALTERNATING FEATURE BLOCK ---------- */
.alt-block {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px;
  align-items: center;
}
.alt-block.flip { grid-template-columns: 1fr 1.05fr; }
.alt-block.flip > :first-child { order: 2; }
@media (max-width: 980px) {
  .alt-block, .alt-block.flip { grid-template-columns: 1fr; gap: 40px; }
  .alt-block.flip > :first-child { order: 0; }
}

/* ---------- ACCESSIBILITY ---------- */
:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
