/* ============================================================================
   Hospice Apps — hospiceapps.com (family hub for hospice-branded tools)
   Light, warm, trustworthy: cream canvas, sage primary, muted coral accent.
   Shares the Volunteer Tracker token family (the first product) while keeping
   MortonApps structural conventions: full-screen hero (directive #15),
   two-tone wordmark in hero + headings only (#14), single sitewide chrome (#9).
   No frameworks, no build step.
   ============================================================================ */

:root {
  --ha-primary: #0F766E;        /* sage / deep teal */
  --ha-primary-dark: #0B5F58;
  --ha-primary-soft: #E2F0ED;
  --ha-navy: #102A43;
  --ha-accent: #B64932;         /* TEXT-SAFE coral (4.84:1 on cream) */
  --ha-accent-deco: #C24A2E;    /* decorative coral — never text */
  --ha-accent-soft: #F8E7DE;
  --ha-bg: #F8F5EE;             /* warm cream canvas */
  --ha-surface: #FFFFFF;
  --ha-surface-muted: #F3EFE7;
  --ha-border: #E3DDD2;
  --ha-ink: #17231F;            /* 14.87:1 on cream */
  --ha-ink-soft: #61736B;       /* 4.62:1 on cream — AA body */
  --ha-radius: 18px;
  --ha-radius-sm: 12px;
  --ha-shadow: 0 1px 2px rgba(28, 39, 35, .04), 0 16px 40px rgba(28, 39, 35, .07);
  --ha-font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ha-display: 'Manrope', 'Source Sans 3', system-ui, sans-serif;
  font-size: 17px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ha-font);
  background: var(--ha-bg);
  color: var(--ha-ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--ha-display); line-height: 1.18; margin: 0 0 .55rem; text-wrap: balance; }
a { color: var(--ha-primary); }

.balance { text-wrap: balance; }

/* honeypot field — visually hidden, still in the form for bots to find */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ---- shared layout -------------------------------------------------------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
section[id] { scroll-margin-top: 74px; }
.section { padding: 4.6rem 0; }
.section--alt { background: var(--ha-surface); border-top: 1px solid var(--ha-border); border-bottom: 1px solid var(--ha-border); }

.eyebrow {
  display: block;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ha-accent);
  margin-bottom: .7rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800; letter-spacing: -.03em;
  max-width: 26ch;
}
.section-lead {
  color: var(--ha-ink-soft);
  font-size: 1.06rem;
  max-width: 64ch;
  margin: 0 0 2.2rem;
}
.center { text-align: center; }
.center .section-title, .center .section-lead { margin-left: auto; margin-right: auto; }

/* ---- two-tone wordmark (hero + headings only, per directive #14) ---------- */
.wordmark { font-family: var(--ha-display); font-weight: 800; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.wordmark .wm-a { color: var(--ha-primary); }
.wordmark .wm-b { color: var(--ha-accent); }
h1 .wm-a, h2 .wm-a, h3 .wm-a { color: var(--ha-primary); }
h1 .wm-b, h2 .wm-b, h3 .wm-b { color: var(--ha-accent); }

/* ---- buttons ---------------------------------------------------------------- */
.btn {
  font: inherit; font-weight: 600;
  border-radius: 12px;
  border: 1.5px solid transparent;
  padding: .62rem 1.35rem;
  min-height: 2.75rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s, color .12s;
}
.btn-primary {
  background: linear-gradient(180deg, #137C72 0%, #0B625B 100%);
  color: #fff;
  border: 1px solid rgba(8, 77, 71, .35);
  box-shadow: 0 10px 20px rgba(15, 118, 110, .20), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #0F756B 0%, #0A5750 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 118, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:active { transform: translateY(1px) scale(.99); }
.btn-ghost { background: #fff; border-color: var(--ha-border); color: var(--ha-ink); }
.btn-ghost:hover { color: var(--ha-primary-dark); border-color: var(--ha-primary); }
.btn-big { font-size: 1.05rem; padding: .8rem 1.7rem; min-height: 3.1rem; border-radius: 13px; }
.btn-cream { background: #FDFBF6; color: var(--ha-primary-dark); border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 12px 26px rgba(5, 32, 29, .35); }
.btn-cream:hover { background: #fff; transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .45);
  outline-offset: 2px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- sticky header ---------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(227, 221, 210, .65);
}
.site-head-in {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .65rem 28px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .wordmark { font-size: 1.18rem; }
.site-nav { display: flex; gap: .15rem; margin-left: .8rem; }
.site-nav a {
  text-decoration: none; color: var(--ha-ink-soft);
  font-weight: 600; font-size: .95rem;
  padding: .42rem .85rem; border-radius: 999px;
  transition: color .12s, background-color .12s;
}
.site-nav a:hover { color: var(--ha-primary-dark); background: rgba(23, 35, 31, .05); }
.head-cta { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.head-cta .btn { min-height: 2.5rem; padding: .45rem 1.1rem; font-size: .95rem; }

/* ---- hero — full-screen homepage treatment (directive #15) ------------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--ha-border);   /* clean divide at the fold */
  background:
    radial-gradient(circle at 16% 12%, rgba(15, 118, 110, .10), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(16, 42, 67, .07), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(194, 74, 46, .06), transparent 26%),
    linear-gradient(180deg, #FBF8F2 0%, var(--ha-bg) 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(16, 42, 67, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-copy { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; text-align: center; }
.hero-mark { display: inline-flex; margin-bottom: 1.2rem; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.04;
  margin: 0 0 1.05rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--ha-ink-soft);
  max-width: 56ch; margin: 0 auto 1.8rem;
  text-wrap: balance;
}
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-trust {
  display: flex; gap: .4rem 1.4rem; justify-content: center; flex-wrap: wrap;
  margin: 1.4rem 0 0; padding: 0; list-style: none;
  font-size: .9rem; font-weight: 600; color: var(--ha-ink-soft);
}
.hero-trust li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust svg { color: var(--ha-primary); flex: 0 0 auto; }
.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 1; color: var(--ha-ink-soft); opacity: .7;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll { animation: ha-bob 2.2s ease-in-out infinite; }
  @keyframes ha-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(7px); } }
}

/* ---- principle cards ---------------------------------------------------------- */
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.principle {
  background: var(--ha-surface);
  border: 1px solid var(--ha-border);
  border-radius: var(--ha-radius);
  box-shadow: var(--ha-shadow);
  padding: 1.35rem 1.45rem 1.25rem;
}
.principle .p-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--ha-primary-soft); color: var(--ha-primary);
  margin-bottom: .6rem;
}
.principle h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.015em; margin-bottom: .25rem; }
.principle p { margin: 0; font-size: .93rem; color: var(--ha-ink-soft); }

.phi-banner {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--ha-primary-soft);
  border: 1px solid rgba(15, 118, 110, .25);
  border-radius: var(--ha-radius);
  padding: 1.15rem 1.4rem;
  font-size: 1rem;
  margin-top: 1.6rem;
}
.phi-banner svg { flex: 0 0 auto; color: var(--ha-primary); margin-top: .15rem; }
.phi-banner strong { color: var(--ha-primary-dark); }

/* ---- product spotlight (Volunteer Tracker) ------------------------------------- */
.product-status {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ha-primary-dark);
  background: var(--ha-primary-soft);
  border: 1px solid rgba(15, 118, 110, .25);
  border-radius: 999px;
  padding: .22rem .8rem;
}
.product-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ha-primary); }

/* CSS-only product visual — program hours bars + report toast */
.vt-viz {
  max-width: 640px; margin: 2.2rem auto 2.6rem;
  background: var(--ha-surface);
  border: 1px solid var(--ha-border);
  border-radius: var(--ha-radius);
  box-shadow: var(--ha-shadow);
  padding: 1.3rem 1.5rem 1.4rem;
  position: relative;
}
.vt-viz-head {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--ha-display); font-weight: 700; font-size: .98rem;
  padding-bottom: .85rem; margin-bottom: .9rem;
  border-bottom: 1px solid var(--ha-border);
}
.vt-viz-head svg { color: var(--ha-primary); flex: 0 0 auto; }
.vt-viz-row {
  display: grid; grid-template-columns: 11rem 1fr 3rem; gap: .8rem; align-items: center;
  padding: .32rem 0; font-size: .92rem;
}
.vt-viz-name { color: var(--ha-ink); font-weight: 600; }
.vt-viz-track { height: 9px; border-radius: 99px; background: var(--ha-surface-muted); overflow: hidden; }
.vt-viz-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ha-primary), #2F968C); }
.vt-viz-row:nth-child(odd) .vt-viz-fill { background: linear-gradient(90deg, #C77450, var(--ha-accent-deco)); }
.vt-viz-hrs { text-align: right; font-variant-numeric: tabular-nums; color: var(--ha-ink-soft); font-weight: 600; }
.vt-viz-toast {
  position: absolute; right: -14px; bottom: -16px;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--ha-navy); color: #F4F9F7;
  font-size: .85rem; font-weight: 600;
  border-radius: 12px; padding: .5rem .9rem;
  box-shadow: 0 14px 30px rgba(16, 42, 67, .28);
}
.vt-viz-toast .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ED9CD; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 2.2rem; }
.feature {
  background: var(--ha-bg);
  border: 1px solid var(--ha-border);
  border-radius: 14px;
  padding: 1.05rem 1.1rem 1rem;
}
.section--alt .feature { background: var(--ha-bg); }
.feature .f-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ha-primary-soft); color: var(--ha-primary);
  margin-bottom: .55rem;
}
.feature h3 { font-size: .98rem; font-weight: 700; margin-bottom: .15rem; }
.feature p { margin: 0; font-size: .87rem; color: var(--ha-ink-soft); }

.product-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.product-note { font-size: .95rem; color: var(--ha-ink-soft); margin: 1.1rem 0 0; }

/* ---- roadmap teaser -------------------------------------------------------------- */
.roadmap-card {
  background: var(--ha-surface);
  border: 1px dashed #CFC8B9;
  border-radius: var(--ha-radius);
  padding: 1.6rem 1.8rem;
  display: flex; gap: 1.1rem; align-items: flex-start;
}
.roadmap-card .r-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--ha-accent-soft); color: var(--ha-accent);
}
.roadmap-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .3rem; }
.roadmap-card p { margin: 0 0 .35rem; color: var(--ha-ink-soft); font-size: .97rem; }
.roadmap-card p:last-child { margin-bottom: 0; }

/* ---- family strip ------------------------------------------------------------------ */
.family-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.8rem; }
.family-card {
  display: block; text-decoration: none;
  background: var(--ha-surface);
  border: 1px solid var(--ha-border);
  border-radius: var(--ha-radius);
  box-shadow: var(--ha-shadow);
  padding: 1.3rem 1.4rem 1.2rem;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
}
.family-card:hover { transform: translateY(-2px); border-color: rgba(15, 118, 110, .4); }
.family-card .fam-tag {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ha-ink-soft);
  background: var(--ha-surface-muted);
  border-radius: 99px; padding: .14rem .65rem;
  margin-bottom: .55rem;
}
.family-card h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.015em; margin-bottom: .2rem; color: var(--ha-ink); }
.family-card p { margin: 0 0 .6rem; font-size: .9rem; color: var(--ha-ink-soft); }
.family-card .fam-cta { font-size: .9rem; font-weight: 700; color: var(--ha-primary-dark); }

/* ---- contact band -------------------------------------------------------------------- */
.contact-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, .07), transparent 40%),
    radial-gradient(circle at 88% 86%, rgba(194, 74, 46, .22), transparent 42%),
    linear-gradient(135deg, #0C5B54 0%, #0F766E 52%, #113E47 100%);
  border-radius: 26px;
  color: #F4F9F7;
  padding: 3.4rem 3.2rem;
  box-shadow: 0 30px 70px rgba(11, 64, 58, .35);
}
.contact-band .eyebrow { color: #F8C9B4; }
.contact-band h2 {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.08;
  max-width: 22ch;
  margin-bottom: .8rem;
  color: #fff;
}
.contact-band .contact-lead {
  font-size: 1.08rem; line-height: 1.6;
  color: rgba(244, 249, 247, .92);
  max-width: 56ch;
  margin: 0 0 1.8rem;
}
.contact-form { display: grid; gap: .8rem; max-width: 560px; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; color: var(--ha-ink);
  background: #FDFBF6;
  border: 1.5px solid rgba(255, 255, 255, .45);
  border-radius: var(--ha-radius-sm);
  padding: .65rem .8rem; min-height: 2.8rem;
}
.contact-form textarea { min-height: 7rem; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: 3px solid rgba(255, 255, 255, .45); outline-offset: 1px;
}
.contact-form .btn { justify-self: start; }
.contact-result { margin: .2rem 0 0; font-weight: 600; color: #CDEAE3; min-height: 1.4em; }
.contact-alt { margin: 1.4rem 0 0; font-size: .95rem; color: rgba(244, 249, 247, .8); }
.contact-alt a { color: #CDEAE3; }

/* ---- footer ----------------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--ha-border); background: var(--ha-surface); padding: 2.8rem 0 1.8rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; align-items: flex-start; }
.foot-brand .wordmark { font-size: 1.25rem; }
.foot-brand p { margin: .5rem 0 0; color: var(--ha-ink-soft); font-size: .9rem; max-width: 36ch; }
.foot-col h3 {
  font-family: var(--ha-display);
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ha-ink-soft);
  margin: 0 0 .7rem;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-col a { color: var(--ha-ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.foot-col a:hover { color: var(--ha-primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem;
  border-top: 1px solid var(--ha-border);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-size: .85rem; color: var(--ha-ink-soft);
}
.ma-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--ha-border);
  color: var(--ha-ink-soft);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(23, 35, 31, .05);
  transition: color .12s, border-color .12s, background-color .12s;
}
.ma-badge:hover { color: var(--ha-primary-dark); border-color: #D5CEC0; background: rgba(255, 255, 255, .85); }
.ma-badge .ma-dot { display: inline-flex; flex: 0 0 auto; }

/* ---- legal pages -------------------------------------------------------------------------- */
.legal { max-width: 820px; margin: 0 auto; padding: 4.5rem 28px 5rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.03em; margin-bottom: .4rem; }
.legal .legal-updated { color: var(--ha-ink-soft); font-size: .9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.2rem; margin: 2.25rem 0 .7rem; }
.legal p, .legal li { color: var(--ha-ink-soft); line-height: 1.75; font-size: 1rem; }
.legal ul { margin: .5rem 0 1rem 1.25rem; padding: 0 0 0 .4rem; }
.legal a { color: var(--ha-primary-dark); text-underline-offset: 3px; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.legal th, .legal td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--ha-border); font-size: .92rem; color: var(--ha-ink-soft); }
.legal th { color: var(--ha-ink); }

/* ---- 404 ------------------------------------------------------------------------------------ */
.nf { min-height: 72vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 5rem 1.5rem; }
.nf h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.035em; }
.nf p { color: var(--ha-ink-soft); max-width: 46ch; margin: 0 auto 1.8rem; }

/* ---- reveal-on-scroll (motion-gated) ------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .rv { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
  .rv.in { opacity: 1; transform: none; }
}

/* ---- responsive --------------------------------------------------------------------- */
@media (max-width: 980px) {
  .principle-grid, .family-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-band { padding: 2.6rem 2rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
}
@media (max-width: 720px) {
  .site-head-in { padding: .6rem 18px; gap: .6rem; }
  .wrap { padding: 0 18px; }
  .section { padding: 3.2rem 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .vt-viz { padding: 1.1rem 1rem 1.2rem; }
  .vt-viz-row { grid-template-columns: 8.2rem 1fr 2.6rem; gap: .55rem; font-size: .85rem; }
  .vt-viz-toast { right: 8px; }
  .contact-band { border-radius: 18px; padding: 2.2rem 1.4rem; }
  .roadmap-card { flex-direction: column; }
  .foot-grid { grid-template-columns: 1fr; }
}
