/* ============================================================
   careib.io — Care in a Box
   Shared stylesheet
   Clinical palette: navy + slate + clinical amber
   Same skeleton as memib.io for family resemblance
   ============================================================ */

:root {
  /* Color tokens — clinical, professional */
  --navy-900: #0F2C4D;
  --navy-700: #1E3A5F;
  --navy-500: #2C5282;
  --navy-100: #DBEAFE;
  --navy-50:  #EFF6FF;

  --amber-700: #B45309;
  --amber-500: #D97706;
  --amber-100: #FEF3C7;

  --paper:   #F8FAFC;
  --white:   #FFFFFF;
  --ink:     #0F172A;
  --slate:   #334155;
  --muted:   #94A3B8;
  --border:  #E2E8F0;
  --rose-100: #FFE4E6;
  --rose-700: #BE123C;
  --green-100: #D1FAE5;
  --green-700: #047857;

  /* Type */
  --serif: 'Fraunces', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --maxw: 1140px;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow:    0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--navy-900);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.2em; }
strong { color: var(--navy-900); }

a {
  color: var(--navy-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--amber-700); }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: 0.5em; }

img { max-width: 100%; height: auto; display: block; }
code { font-family: 'SF Mono', Menlo, monospace; font-size: 0.9em; background: var(--navy-50); padding: 1px 6px; border-radius: 4px; color: var(--navy-900); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.center { text-align: center; }
.muted { color: var(--slate); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--navy-900);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-700), var(--amber-500));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--sans);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav-links a:hover { color: var(--navy-700); }
.nav-cta { margin-left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn-primary { background: var(--navy-700); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-900); color: white; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: white; color: var(--navy-900); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--navy-500); }
.btn-amber { background: var(--amber-500); color: white; }
.btn-amber:hover { background: var(--amber-700); color: white; }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 56px;
  background: radial-gradient(ellipse at top right, var(--navy-50), var(--paper) 60%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { font-size: 1.2rem; color: var(--slate); margin-bottom: 1.6em; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-image {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.eyebrow {
  display: inline-block;
  background: var(--navy-100);
  color: var(--navy-700);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow.amber { background: var(--amber-100); color: var(--amber-700); }

/* ---------- Cards / Feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.1s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-top: 0.2em; }
.card-icon {
  width: 44px; height: 44px;
  background: var(--navy-50);
  color: var(--navy-700);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.card-icon.amber { background: var(--amber-100); color: var(--amber-700); }

/* ---------- Pipeline diagram ---------- */
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin: 36px 0; }
.step {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.step-num {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px;
  background: var(--navy-700);
  color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; font-family: var(--sans);
}
.step h4 { margin: 8px 0 6px; font-size: 0.92rem; }
.step p { font-size: 0.8rem; color: var(--slate); margin: 0; }
.step-icon { font-size: 1.5rem; margin-bottom: 4px; }

/* ---------- Sample report ---------- */
.report {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  font-family: var(--sans);
}
.report-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px; margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.report-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center;
}
.report-row:last-child { border-bottom: 0; }
.pill { font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-700); }
.pill.warn  { background: var(--amber-100); color: var(--amber-700); }
.pill.alert { background: var(--rose-100);  color: var(--rose-700); }
.pill.neutral { background: var(--navy-50); color: var(--navy-700); }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.tier {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column;
}
.tier.featured { border: 2px solid var(--navy-700); position: relative; box-shadow: var(--shadow-lg); }
.tier.featured::before {
  content: 'Most popular'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--navy-700); color: white; font-size: 0.78rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
}
.tier h3 { margin-top: 0; }
.price { font-family: var(--serif); font-size: 2.4rem; color: var(--navy-900); font-weight: 600; margin: 8px 0 4px; }
.price small { font-size: 0.95rem; color: var(--slate); font-family: var(--sans); }
.tier ul { list-style: none; padding: 0; margin: 22px 0; flex: 1; }
.tier li { padding: 7px 0 7px 28px; position: relative; }
.tier li::before { content: '✓'; position: absolute; left: 0; color: var(--navy-700); font-weight: 700; }

/* ---------- Form ---------- */
.form {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; max-width: 580px; margin: 0 auto; box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy-900); font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--sans);
  border: 1px solid var(--border); border-radius: 8px; background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--navy-500); outline-offset: 1px; border-color: var(--navy-500); background: white;
}
.field .hint { font-size: 0.85rem; color: var(--slate); margin-top: 4px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input { width: auto; margin-top: 6px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat-value { font-family: var(--serif); font-size: 2.1rem; color: var(--navy-900); font-weight: 600; margin: 0; line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: var(--slate); font-weight: 500; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Compliance stack ---------- */
.compliance-row {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--border); align-items: center;
}
.compliance-row:last-child { border-bottom: 0; }
.compliance-vendor { font-family: var(--serif); font-weight: 600; color: var(--navy-900); font-size: 1.1rem; }
.compliance-detail { color: var(--slate); font-size: 0.95rem; }

/* ---------- Callout ---------- */
.callout {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white;
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
}
.callout h2 { color: white; }
.callout p { color: rgba(255,255,255,0.9); max-width: 660px; margin: 0 auto 24px; }
.callout .btn-secondary { background: white; color: var(--navy-900); border-color: white; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.85); padding: 56px 0 32px; margin-top: 48px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-footer h5 { color: white; font-family: var(--serif); font-size: 1.05rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--amber-100); }
.footer-bottom {
  display: flex; justify-content: space-between; padding-top: 24px;
  font-size: 0.88rem; color: rgba(255,255,255,0.7);
  flex-wrap: wrap; gap: 12px;
}

/* ---------- Trust strip ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; align-items: center; padding: 18px 0; color: var(--slate); font-size: 0.92rem; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .tiers, .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .compliance-row { grid-template-columns: 1fr; gap: 8px; }
  .nav-links { display: none; }
  .nav-cta { display: inline-block; }
  section { padding: 56px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .grid-3, .tiers, .stat-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .report-row { grid-template-columns: 1fr; gap: 6px; }
  .callout { padding: 32px 20px; }
  .form { padding: 24px; }
}
