/*
 * parkwestcares.org — styles for the public "Share a care need" page.
 *
 * WHY it looks like this: the page is used by people at a hard moment, often
 * on a phone in a hospital corridor. So: one column (max 560px), the system
 * font, big tap targets (56px choices, 52px buttons), 16px+ inputs so iOS
 * does not zoom, and no request leaves the origin (no web fonts, no icons
 * from a CDN). Brand: primary black #0C0C0C, accent red #C8080F spent on
 * emphasis only (progress, focus, the crisis phone), neutral grey #C4C4C4
 * for lines, page background #F5F4F0. Every text/background pairing is
 * 4.5:1 or better.
 */

:root {
  --bg: #F5F4F0;
  --card: #FFFFFF;
  --line: #C4C4C4;
  --line-soft: #E4E2DC;
  --text: #141414;
  --muted: #5F5E5A;          /* 5.9:1 on --bg */
  --black: #0C0C0C;
  --red: #C8080F;            /* 5.4:1 on --bg, 6.0:1 on white */
  --red-soft: #FBE9E9;
  --error: #A32222;
  --focus: #C8080F;
  --radius: 12px;
  --radius-lg: 16px;
  --col: 560px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

p { margin: 0 0 1em; }

/* Focus is always visible, and the same everywhere. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  background: var(--black);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

.column {
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ─────────────────────────────────────────────── header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
}
.brand-mark { width: 24px; height: 40px; }
.brand-name { font-size: 15px; }

.header-phone {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  color: var(--text);
  line-height: 1.2;
  border-radius: 8px;
  min-height: 44px;
  justify-content: center;
}
.header-phone-label { font-size: 12px; color: var(--muted); }
.header-phone-number { font-size: 16px; font-weight: 700; color: var(--red); white-space: nowrap; }
.header-phone:hover .header-phone-number { text-decoration: underline; }

@media (max-width: 359px) {
  .brand-name { display: none; }
}

/* ─────────────────────────────────────────────── main */

main { flex: 1; padding-top: 24px; padding-bottom: 40px; }

.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }

.landing { text-align: center; padding-top: 8px; }
.lockup { width: 128px; margin: 0 auto 20px; }
.lead { font-size: 18px; color: var(--text); max-width: 34em; margin-left: auto; margin-right: auto; }
.phone-line { font-size: 17px; margin-bottom: 24px; }
.phone-line a { font-weight: 700; }
/* A phone number is never split across two lines. */
[data-phone], .header-phone-number, .callout-phone { white-space: nowrap; }
.fine-print { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* ─────────────────────────────────────────────── buttons */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--black);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: #262626; border-color: #262626; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: var(--card); color: var(--black); }
.btn-secondary:hover { background: #F0EEE9; }
.btn-wide { width: 100%; max-width: 360px; }

.btn-link {
  font: inherit;
  font-size: 16px;
  background: none;
  border: 0;
  padding: 10px 4px;
  min-height: 44px;
  color: var(--red);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 6px;
}

/* ─────────────────────────────────────────────── the flow */

.flow[hidden] { display: none; }

.progress {
  height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--red);
  border-radius: 2px;
  transition: width 200ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
}

.flow-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 18px;
  min-height: 44px;
}
.step-count { color: var(--muted); font-size: 14px; }

.step { margin: 0; }
.step[hidden] { display: none; }

.step-title {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.step-title:focus { outline: none; }
.step-title:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.label-title { cursor: text; }
.step-lead { font-size: 17px; margin-bottom: 18px; }

.ack {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
}
.choice {
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  min-height: 56px;
  padding: 14px 18px;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--black); }
.choice[aria-pressed="true"] {
  border-color: var(--black);
  box-shadow: inset 0 0 0 2px var(--black);
}
.choice[aria-pressed="true"]::after {
  content: " \2713";          /* a tick, so the selection is not colour alone */
  float: right;
  color: var(--red);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.optional { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: 15px; margin: -2px 0 8px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea {
  font: inherit;
  font-size: 17px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"] { min-height: 52px; }
textarea { resize: vertical; min-height: 140px; line-height: 1.45; }
input:focus-visible, textarea:focus-visible { border-color: var(--black); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }

.counter { color: var(--muted); font-size: 14px; text-align: right; margin: 6px 0 0; }
.counter.over { color: var(--error); }

.field-error {
  color: var(--error);
  font-weight: 600;
  font-size: 15px;
  margin: 8px 0 0;
}
.field-error[hidden] { display: none; }

.actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* The crisis line: front and centre on the loss branch, and at the top of the
   free-text step for every category but a new baby or prayer. */
.callout {
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 4px 0 20px;
}
.callout[hidden] { display: none; }
.callout:focus { outline: none; }
.callout:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.callout-text { margin: 0; font-size: 18px; font-weight: 600; }
.callout-phone { font-weight: 800; white-space: nowrap; }

.review {
  margin: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 6px 16px;
}
.review dt {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}
.review dd {
  margin: 2px 0 12px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.review dd.pre { white-space: pre-wrap; }
.review dt + dd { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
.review dd:last-child { border-bottom: 0; }

.consent { font-size: 15px; color: var(--muted); }

.flow-phone {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 15px;
}
.flow-phone a { font-weight: 700; }

/* Honeypot: off-screen, not hidden with display:none (some bots skip those). */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─────────────────────────────────────────────── footer */

.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
}
.footer-inner { padding-top: 16px; padding-bottom: 24px; }
.footer-inner p { margin: 0 0 6px; }

/* ─────────────────────────────────────────────── privacy page */

.prose h1 { margin-top: 8px; }
.prose h2 { font-size: 21px; margin: 28px 0 8px; line-height: 1.25; }
.prose p, .prose li { font-size: 17px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .effective { color: var(--muted); font-size: 14px; }

@media (min-width: 600px) {
  body { font-size: 18px; }
  h1 { font-size: 36px; }
  .step-title { font-size: 28px; }
  .lockup { width: 150px; }
  main { padding-top: 36px; }
}
