/* MooreLife public site — loaded after site.css on public pages only (the portal keeps site.css alone).
   Direction: ECG chart paper, the visit report as proof of care, type set for older readers. */
:root {
  --ink: #161a4a;          /* navy ink: headings and body */
  --navy: #1e2468;         /* logo navy */
  --navy-700: #141850;
  --red: #c1121f;          /* logo ECG red */
  --red-700: #9c0e18;
  --slate: #4c5270;        /* secondary text, 7:1 on white */
  --mist: #f1f2f8;         /* quiet section ground */
  --rule: #dcdfeb;
  --care: #1c7a52;         /* "reviewed" status */
  --muted: var(--slate);
  --line: var(--rule);
  --radius: 6px;
  --font: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --grid-fine: rgba(193, 18, 31, .04);
  --grid-bold: rgba(193, 18, 31, .08);
}

body.site { font-size: 1.0625rem; line-height: 1.6; color: var(--ink); }
.site h1, .site h2, .site h3, .site h4 { font-family: var(--display); color: var(--ink); font-optical-sizing: auto; }
.site h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 700; line-height: 1.02; letter-spacing: -.025em; margin-bottom: .45em; text-wrap: balance; }
.site h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.site h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
.site p { max-width: 66ch; }
.site a { text-underline-offset: .18em; }
.site :focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: .6em 1em; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.site .muted { color: var(--slate); }
.site .eyebrow { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 700; color: var(--red); margin-bottom: .5em; }

/* ECG chart paper: 1 mm and 5 mm squares */
.chart-paper, .site .page-hero {
  background-color: #fff;
  background-image:
    linear-gradient(var(--grid-bold) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px),
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}

/* Buttons: squarer than pills, firm weight */
.site .btn { border-radius: var(--radius); font-weight: 700; font-size: 1rem; padding: .8em 1.3em; transition: background-color .15s, border-color .15s, color .15s; }
.site .btn-lg { font-size: 1.0625rem; padding: .95em 1.5em; }
.site .btn-ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.site .btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.site .btn-light { background: #fff; color: var(--ink); }
.site .btn-light:hover { background: var(--mist); }

/* Header */
.site .topbar { background: var(--ink); color: #c9ccec; font-size: .875rem; }
.site .topbar .wrap { justify-content: space-between; align-items: center; gap: 8px 20px; }
.site .tb-links { display: flex; gap: 20px; flex-wrap: wrap; }
.site .topbar a:hover { text-decoration: underline; }
.site .site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--rule); }
.site .site-header .wrap { height: 80px; }
.site .brand img { height: 60px; }
.site .nav a { color: var(--ink); font-weight: 700; font-size: .98rem; border-radius: var(--radius); }
.site .nav a:hover { color: var(--red); }
.site .nav a.active { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.site .nav .btn, .site .nav .btn:hover { color: #fff; box-shadow: none; border-radius: var(--radius); }
.site .nav-toggle span { background: var(--ink); }
@media (max-width: 900px) {
  .site .nav { top: 80px; }
  .site .nav a.active { box-shadow: inset 3px 0 0 var(--red); }
  .site .tb-hours { display: none; }
  .site .tb-links { justify-content: center; }
  .site .topbar .wrap { justify-content: center; }
}

/* Sections */
.site .section { padding: 96px 0; }
.site .section-mist { background: var(--mist); }
.site .section-soft { background: var(--mist); }
.site .section-navy { background: var(--navy); color: #d9dcf5; }
.site .section-navy h2, .site .section-navy h3 { color: #fff; }
.site .section-head { max-width: 680px; margin-bottom: 48px; }
.site .section-head p { font-size: 1.125rem; }
@media (max-width: 700px) { .site .section { padding: 64px 0; } }

/* ---------- Home hero ---------- */
.hero.chart-paper { padding: 72px 0 168px; position: relative; overflow: hidden; }
.hero .hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; align-items: center; position: relative; z-index: 1; }
.hero-copy .lead { font-size: 1.25rem; line-height: 1.55; color: var(--slate); max-width: 34em; }
.hero-copy .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 36px; }
.hero-lead-doc { font-size: .95rem; color: var(--slate); padding-left: 16px; border-left: 3px solid var(--red); max-width: 30em; }
.hero-lead-doc strong { color: var(--ink); }

.hero-trace { position: absolute; left: 0; right: 0; bottom: 24px; width: 100%; height: 120px; pointer-events: none; z-index: 0; }
.hero-trace polyline { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trace-base { opacity: .45; stroke-dasharray: 1; stroke-dashoffset: 0; }
/* A short bright signal that keeps travelling along the trace, like a bedside monitor */
.trace-pulse { stroke-width: 3.5; stroke-dasharray: .07 1; stroke-dashoffset: .07; opacity: 0; filter: drop-shadow(0 0 4px rgba(193, 18, 31, .55)); }

/* The visit report: the proof of care */
.report { margin: 0; }
.report-sheet { background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 22px 24px 20px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -18px rgba(22, 26, 74, .35); font-size: .95rem; transform: rotate(1.2deg); }
.report figcaption { font-size: .875rem; color: var(--slate); margin-top: 14px; padding-left: 4px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.report-title { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.report-meta { display: block; color: var(--slate); font-size: .9rem; }
.report-status { flex: none; font-size: .8rem; font-weight: 700; color: var(--care); background: #e5f4ec; padding: .3em .65em; border-radius: 4px; }
.report dl { margin: 0; }
.report dd { margin: 0; }
.report-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.report-times dt, .report-vitals dt { font-size: .8rem; color: var(--slate); }
.report-times dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.report-vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.report-vitals dd { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.report-care { list-style: none; margin: 0; padding: 14px 0 6px; }
.report-care li { position: relative; padding-left: 24px; margin-bottom: 6px; }
.report-care li::before { content: ''; position: absolute; left: 2px; top: .4em; width: 12px; height: 7px; border-left: 2.5px solid var(--care); border-bottom: 2.5px solid var(--care); transform: rotate(-45deg); }
.report-note { margin: 8px 0 0; font-style: italic; color: var(--slate); padding: 10px 12px; background: var(--mist); border-radius: 4px; }

/* One orchestrated moment on load: the trace draws, then the report settles in */
@media (prefers-reduced-motion: no-preference) {
  .trace-base { animation: ml-trace 2.2s cubic-bezier(.45, 0, .2, 1) .2s both; }
  .trace-pulse { animation: ml-pulse 4.8s linear 2.4s infinite; }
  .report { animation: ml-settle .7s ease-out .9s both; }
}
@keyframes ml-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ml-pulse { 0% { stroke-dashoffset: .07; opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 1; } }
@keyframes ml-settle { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .hero .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .report { max-width: 480px; }
  .hero.chart-paper { padding: 48px 0 160px; }
}
@media (max-width: 440px) {
  .report-vitals { grid-template-columns: 1fr 1fr; }
  .report-sheet { transform: none; padding: 18px; }
  .hero-copy .cta .btn { width: 100%; }
}

/* ---------- Services ---------- */
.svc-for { display: block; font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--red); letter-spacing: 0; margin-bottom: 4px; }
.svc-link { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .25em; white-space: nowrap; }
a:hover .svc-link { color: var(--red); }

.svc-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; text-decoration: none; color: inherit; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; margin-bottom: 8px; }
.svc-feature:hover { border-color: var(--ink); }
.svc-feature picture, .svc-feature img { display: block; width: 100%; height: 100%; }
.svc-feature img { object-fit: cover; min-height: 320px; }
.svc-feature-body { padding: 40px 44px; display: flex; flex-direction: column; align-items: flex-start; }
.svc-feature-body h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; margin-bottom: .4em; }
.svc-feature-body > p { color: var(--slate); }
.care-types { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; width: 100%; }
.care-types li { font-size: .95rem; color: var(--slate); border-top: 2px solid var(--red); padding-top: 8px; }
.care-types strong { display: block; color: var(--ink); }
.svc-feature-body .svc-link { margin-top: auto; }
@media (max-width: 860px) {
  .svc-feature { grid-template-columns: 1fr; }
  .svc-feature img { min-height: 0; aspect-ratio: 16 / 10; }
  .svc-feature-body { padding: 28px 22px; }
}
@media (max-width: 480px) { .care-types { grid-template-columns: 1fr; } }

/* Service flyers: one panel, swiped or stepped sideways */
.flyers { position: relative; }
.flyer-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.flyer-tabs button { font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius); padding: .5em 1em; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.flyer-tabs button:hover { border-color: var(--ink); }
.flyer-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.flyer-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.flyer-track::-webkit-scrollbar { display: none; }
.flyer { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.flyer:focus-visible { outline-offset: -3px; }
.flyer-nav { display: flex; align-items: center; justify-content: flex-start; gap: 14px; margin-top: 16px; }
.flyer-count { font-size: .95rem; color: var(--slate); font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; }
.flyer-arrow { width: 48px; height: 48px; display: grid; place-items: center; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 50%; cursor: pointer; transition: background-color .15s, color .15s; }
.flyer-arrow:hover { background: var(--ink); color: #fff; }
.flyer-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .flyer-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
  .flyer-tabs::-webkit-scrollbar { display: none; }
  .flyer-tabs button { flex: none; }
  .flyer-nav { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .flyer-track { scroll-behavior: auto; } }

.svc-rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.svc-feature + .svc-rows { border-top: 0; }
.svc-rows li { border-bottom: 1px solid var(--rule); }
.svc-rows a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 32px; align-items: baseline; padding: 30px 12px; text-decoration: none; color: inherit; transition: background-color .15s; }
.svc-rows a:hover { background: var(--mist); }
.svc-row-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.svc-row-desc { color: var(--slate); }
@media (max-width: 760px) {
  .svc-rows a { grid-template-columns: 1fr; gap: 10px; padding: 24px 4px; }
}

/* ---------- Journey: a real sequence, laid along the baseline ---------- */
.journey { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.journey::before { content: ''; position: absolute; left: 0; right: 0; top: 21px; height: 2px; background: var(--red); opacity: .35; }
.journey li { counter-increment: step; position: relative; padding-top: 64px; }
.journey li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--mist); border: 2px solid var(--red); color: var(--red); font-family: var(--display); font-weight: 700; font-size: 1.15rem; display: grid; place-items: center; }
.journey li:last-child::before { background: var(--red); color: #fff; }
.journey p { color: var(--slate); margin: 0; }
@media (max-width: 900px) {
  .journey { grid-template-columns: 1fr; gap: 28px; }
  .journey::before { top: 0; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; }
  .journey li { padding: 6px 0 0 68px; }
}

/* ---------- Trust ---------- */
.trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.trust-lead p { font-size: 1.125rem; margin-bottom: 1.6em; }
.values { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.values div { border-top: 1px solid rgba(255,255,255,.22); padding: 20px 0 24px; }
.values dt { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: 6px; }
.values dd { margin: 0; color: #c9ccec; font-size: .98rem; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }

/* ---------- Call to action ---------- */
.site .cta-section { padding-top: 0; }
.site .section-navy + .cta-section, .site .section-mist + .cta-section, .site .section-soft + .cta-section { padding-top: 96px; }
.site .cta-band { background: #fff; color: var(--ink); border-radius: 0; padding: 48px 0 0; border-top: 4px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; }
.site .cta-band h2 { color: var(--ink); margin-bottom: .3em; }
.site .cta-band p { color: var(--slate); opacity: 1; font-size: 1.125rem; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cta-phone { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.02em; color: var(--red); text-decoration: none; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cta-phone:hover { text-decoration: underline; text-decoration-thickness: 3px; }
@media (max-width: 860px) { .site .cta-band { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.site .page-hero { color: var(--ink); padding: 72px 0 104px; position: relative; border-bottom: 1px solid var(--rule); }
.site .page-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 18px; height: 60px; pointer-events: none;
  /* faint trace, with a bright signal swept across it (the trace shape is the mask) */
  background: linear-gradient(90deg, transparent, #e2172a 35%, #e2172a 65%, transparent) -320px 0 / 320px 100% no-repeat, rgba(193, 18, 31, .32);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' points='0,40 520,40 532,40 544,8 560,56 572,26 582,40 720,40'/%3E%3C/svg%3E") right bottom / 720px 60px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' points='0,40 520,40 532,40 544,8 560,56 572,26 582,40 720,40'/%3E%3C/svg%3E") right bottom / 720px 60px repeat-x; }
@media (prefers-reduced-motion: no-preference) {
  .site .page-hero::after { animation: ml-sweep 4.8s linear 1s infinite; }
}
@keyframes ml-sweep { from { background-position: -320px 0, 0 0; } to { background-position: calc(100% + 320px) 0, 0 0; } }
.site .page-hero .wrap { position: relative; z-index: 1; }
.site .page-hero h1 { color: var(--ink); max-width: 18ch; }
.site .page-hero p { font-size: 1.2rem; color: var(--slate); max-width: 38em; }
.site .page-hero .eyebrow { color: var(--red); }
.site .page-hero .actions, .site .page-hero > .wrap > .btn { margin-top: 12px; }
.site .page-hero-split h1 { max-width: none; }
.site .hero-photo img { border-radius: var(--radius); box-shadow: 0 24px 48px -20px rgba(22, 26, 74, .45); }
.site .hero-photo .ecg-line polyline { stroke: var(--red); }
@media (max-width: 700px) { .site .page-hero { padding: 48px 0 88px; } }

/* Cards: flat, ruled, no lift */
.site .card { border-radius: var(--radius); border-color: var(--rule); padding: 28px; box-shadow: none; }
.site .card.lift:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.site .section-soft .card { border-color: transparent; }
.site .icon { width: auto; height: auto; background: none; color: var(--red); border-radius: 0; margin-bottom: 14px; display: block; }
.site .icon svg { width: 30px; height: 30px; }
.site .icon.navy { background: none; color: var(--navy); }

.site .ticks li { padding-left: 28px; margin-bottom: .55em; }
.site .ticks li::before { width: 12px; height: 7px; left: 3px; top: .45em; border-radius: 0; background: none; border-left: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg); }
.site .pills li { background: #fff; border: 1px solid var(--rule); color: var(--ink); border-radius: 4px; font-weight: 400; font-size: .95rem; }
.site .pills.red li { background: #fff; border-color: rgba(193, 18, 31, .35); color: var(--red-700); }
.site .callout { background: var(--mist); border-left: 4px solid var(--red); border-radius: var(--radius); }
.site .note { background: #fff8eb; border-left-color: #b8731a; border-radius: var(--radius); }
.site .timeline { border-left-color: rgba(193, 18, 31, .35); padding-left: 24px; }
.site .timeline li { padding-bottom: 4px; }
.site .timeline li::before { left: -31px; top: 7px; width: 12px; height: 12px; background: #fff; border: 2px solid var(--red); }
.site .rate-group h3 { border-bottom-color: var(--red); }

/* Forms */
.site input, .site select, .site textarea { border-radius: var(--radius); border-color: #c9cddd; font-size: 1.0625rem; }
.site input:focus, .site select:focus, .site textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 26, 74, .15); }
.site label { font-weight: 700; }
.site fieldset { border-radius: var(--radius); }

/* Footer */
.site .site-footer { background: var(--ink); color: #c9ccec; padding: 72px 0 28px; }
.site .site-footer h4 { color: #fff; font-family: var(--display); font-size: 1.05rem; font-weight: 700; }
.site .site-footer a:hover { text-decoration: underline; }
.site .footer-logo { border-radius: var(--radius); }
.site .footer-bottom { border-top-color: rgba(255,255,255,.14); }
@media (max-width: 520px) { .site .tb-email { display: none; } }
