/* Legacy Home & Respite Care Foundation — Caregiver Wellness & Resource Hub
   Demo site · X-Centric Managed Hosted Hub · DEMO DATA ONLY */

:root {
  --plum: #8b4f3b;
  --plum-dark: #5e3226;
  --plum-light: #8e4a37;
  --coral: #8b4f3b;
  --coral-dark: #6d3a2a;
  --cream: #faf6f1;
  --sand: #f3ece3;
  --ink: #2f2521;
  --ink-soft: #6d5a50;
  --white: #ffffff;
  --green: #3d8b64;
  --green-soft: #e3f2ea;
  --amber: #b07d2a;
  --amber-soft: #f9efdc;
  --blue-soft: #e7eef8;
  --blue: #3c6fb0;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(47, 37, 33, 0.08);
  --shadow-lg: 0 8px 30px rgba(47, 37, 33, 0.14);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--plum-light); }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--plum-dark); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--plum-dark);
  color: #ecd9cd;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 6px 16px;
}
.demo-banner strong { color: #fff; font-weight: 600; }

/* ---------- Header / nav ---------- */
header.site-header {
  background: var(--white);
  border-bottom: 1px solid #eee5da;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-size: 21px; font-weight: 700;
}
.brand-name { font-family: var(--font-display); font-size: 17px; color: var(--plum-dark); font-weight: 600; line-height: 1.2; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 11px; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }

nav.main-nav { display: flex; align-items: center; gap: 26px; }
nav.main-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 14.5px; font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
nav.main-nav a:hover { color: var(--plum); }
nav.main-nav a.active { color: var(--plum); border-bottom-color: var(--coral); }
.nav-cta {
  background: var(--coral); color: #fff !important; padding: 9px 18px !important;
  border-radius: 999px; font-weight: 600 !important; border-bottom: none !important;
  transition: background .15s;
}
.nav-cta:hover { background: var(--coral-dark); }
.nav-portal {
  border: 1.5px solid var(--plum-light) !important; border-radius: 999px;
  padding: 8px 16px !important; color: var(--plum) !important; border-bottom-width: 1.5px !important;
}
.nav-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--plum); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--plum-dark) 0%, var(--plum) 55%, var(--plum-light) 100%);
  color: #fff;
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; right: -120px; top: -80px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 190, 136, 0.32) 0%, transparent 70%);
}
.hero::before {
  content: '';
  position: absolute; left: -140px; bottom: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 191, 174, 0.18) 0%, transparent 70%);
}
/* On the dark hero, the primary CTA inverts to cream so it can't sink into the chestnut */
.hero .btn-coral { background: var(--cream); color: var(--plum-dark); }
.hero .btn-coral:hover { background: #fff; }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 54px); max-width: 640px; margin-bottom: 20px; }
.hero p.lede { font-size: 19px; max-width: 560px; color: #eeddd1; margin-bottom: 34px; }
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; transition: transform .12s, background .15s, box-shadow .15s;
  border: none; cursor: pointer; font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.6); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--plum-dark); }
.btn-outline { border: 1.5px solid var(--plum-light); color: var(--plum); background: transparent; }
.btn-outline:hover { background: #f3e6dc; }
.btn:focus-visible, a:focus-visible { outline: 2.5px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.section-head h2::after {
  content: '';
  display: block; width: 44px; height: 3.5px; border-radius: 999px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--plum) 100%);
}
.section-head p { color: var(--ink-soft); font-size: 16.5px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--coral-dark); margin-bottom: 10px;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid #f0e8dd;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
  background: linear-gradient(145deg, #f3e6dc 0%, var(--sand) 100%);
  border: 1px solid #efdfd3;
}
.card { border-top: 3px solid transparent; }
.card:hover { border-top-color: var(--amber); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 14px; }
.card a.more { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--coral-dark); }

/* ---------- Stats band ---------- */
.stats-band { background: var(--sand); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 42px; font-weight: 700; color: var(--plum); }
.stat .label { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }

/* ---------- Event cards ---------- */
.event-card { display: flex; gap: 20px; align-items: flex-start; }
.event-date {
  flex-shrink: 0; width: 64px; text-align: center; background: var(--plum);
  color: #fff; border-radius: 12px; padding: 10px 6px;
}
.event-date .month { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.event-date .day { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.event-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; letter-spacing: .02em;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-plum { background: #f3e6dc; color: var(--plum); }

/* ---------- Resource hub ---------- */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-chip {
  border: 1.5px solid #ddd0c2; background: var(--white); color: var(--ink-soft);
  padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: var(--font-body);
}
.filter-chip:hover { border-color: var(--plum-light); color: var(--plum); }
.filter-chip.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.resource-search {
  width: 100%; max-width: 420px; padding: 12px 18px; border-radius: 999px;
  border: 1.5px solid #ddd0c2; font-size: 15px; margin-bottom: 18px; font-family: var(--font-body);
  background: var(--white);
}
.resource-search:focus { outline: 2px solid var(--plum-light); border-color: var(--plum-light); }
.resource-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--coral-dark); margin-bottom: 8px; display: block; }

/* ---------- Split / feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .visual {
  background: linear-gradient(150deg, var(--sand), #fff);
  border: 1px solid #eee2d4; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}

/* ---------- Portal / app UI mock ---------- */
.app-shell { background: #f7eee7; border-radius: var(--radius); overflow: hidden; border: 1px solid #e9d5c7; box-shadow: var(--shadow-lg); }
.app-topbar {
  background: var(--plum-dark); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; font-size: 13.5px;
}
.app-topbar .dot { display: inline-block; width: 8px; height: 8px; background: #7ee2a8; border-radius: 50%; margin-right: 7px; }
.app-body { padding: 24px; }
.panel { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #efdfd3; margin-bottom: 16px; }
.panel h4 { font-size: 15px; color: var(--plum-dark); margin-bottom: 12px; font-family: var(--font-body); font-weight: 700; }
.kv-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #efdfd3; font-size: 14px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--ink-soft); }
.kv-row .v { font-weight: 600; }

.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #efdfd3; font-size: 13.5px; }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); margin-top: 6px; flex-shrink: 0; }
.timeline-item .when { color: var(--ink-soft); font-size: 12px; }

/* ---------- Login mock ---------- */
.login-wrap { max-width: 430px; margin: 0 auto; }
.login-card { background: #fff; border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow-lg); border: 1px solid #efdfd3; }
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid #ddd0c2; border-radius: 10px;
  font-size: 15px; font-family: var(--font-body); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--plum-light); border-color: var(--plum-light); }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Chat agent mock ---------- */
.chat-shell { background: #fff; border-radius: 12px; border: 1px solid #e9d5c7; overflow: hidden; }
.chat-head { background: var(--plum); color: #fff; padding: 12px 18px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.chat-head .bot-dot { width: 9px; height: 9px; background: #7ee2a8; border-radius: 50%; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 14px; font-size: 13.8px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--plum); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--sand); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.bot .preview {
  background: #fff; border: 1px solid #e5d9cb; border-radius: 10px; padding: 12px; margin-top: 10px; font-size: 13px;
}
.msg.bot .preview .p-title { font-weight: 700; color: var(--plum-dark); margin-bottom: 4px; }
.msg .confirm-row { display: flex; gap: 8px; margin-top: 10px; }
.chip-btn {
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--font-body);
}
.chip-confirm { background: var(--green); color: #fff; }
.chip-cancel { background: #eee; color: var(--ink-soft); }
.chat-input-row { display: flex; border-top: 1px solid #efdfd3; }
.chat-input-row input { flex: 1; border: none; padding: 14px 18px; font-size: 14px; font-family: var(--font-body); }
.chat-input-row input:focus { outline: none; background: #fcf7f3; }
.chat-input-row button { background: var(--coral); border: none; color: #fff; padding: 0 22px; font-weight: 700; cursor: pointer; }

/* ---------- Tables (staff console) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.8px; background: #fff; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); padding: 10px 14px; border-bottom: 2px solid #efdfd3; font-weight: 700;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid #f4ede4; vertical-align: middle; }
table.data tr:hover td { background: #fcf7f3; }

/* ---------- Footer ---------- */
footer {
  background: var(--plum-dark); color: #d9bfae; padding: 54px 0 30px; margin-top: 40px; font-size: 14px;
}
footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; font-family: var(--font-body); }
footer a { color: #d9bfae; text-decoration: none; display: block; padding: 3px 0; }
footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43,35,51,0.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 520px; width: 100%;
  padding: 34px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 23px; margin-bottom: 6px; }
.modal .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.modal-close { float: right; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink-soft); }
.success-note {
  background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 14px 18px;
  font-size: 14px; font-weight: 600; display: none; margin-top: 6px;
}
.error-note {
  background: #fff2ef; color: var(--coral-dark); border-radius: 10px; padding: 14px 18px;
  font-size: 14px; font-weight: 600; display: none; margin-top: 8px;
}
.routing-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; display: none; }
.privacy-line { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; margin: 4px 0 14px; }

/* ---------- Utility ---------- */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

@media (max-width: 860px) {
  nav.main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 18px 24px; gap: 14px;
    border-bottom: 1px solid #eee5da; box-shadow: var(--shadow);
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
