/* Public look: calm, trustworthy sage/forest-green. Used by the landing page, the report form,
   and the thanks page. Tokens are overridden here (not in :root) so the staff admin area, which
   shares styles.css's base tokens/components, is unaffected. */
body.public {
  --bg: #f4f2ea;
  --surface: #ffffff;
  --text: #16261f;
  --muted: #58655d;
  --border: #dbe0d2;
  --primary: #1f3d37;
  --primary-hover: #16302b;
  --primary-text: #ffffff;
  --accent: #e7eadf;
  --link: #1f3d37;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
}

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.5rem;
}
.site-header .brand h1 { font-size: 1.4rem; letter-spacing: -.01em; }
.site-header-right { display: flex; align-items: center; gap: 2rem; }
.header-actions { display: flex; align-items: center; gap: 1.25rem; font-weight: 700; }
.header-actions a { text-decoration: none; color: var(--text); }
.header-actions a:hover { color: var(--primary-hover); }
#authLink, button#authLink {
  padding: .45rem 1rem; border-radius: 999px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 0;
  color: var(--primary-text); background: var(--primary);
}
.header-actions #authLink:hover { color: var(--primary-text); background: var(--primary-hover); }

/* Landing-page brand lockup: "HavenBound" + small caps tagline, no icon (matches the design). */
.brand-lockup { display: flex; flex-direction: column; gap: .15rem; text-decoration: none; line-height: 1.15; }
.brand-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.brand-sub { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; gap: 2rem; font-weight: 700; }
.site-nav a { color: var(--primary); text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: var(--primary-hover); }

main { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* Landing-page hero (the "coming soon" intro) */
.landing-hero { padding: 2.5rem 0 1rem; max-width: 46rem; }
.badge {
  display: inline-block; background: var(--accent); color: var(--primary);
  font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: .5rem 1.1rem; border-radius: 999px; margin: 0 0 1.75rem;
}
.landing-hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 1.5rem; color: var(--text); }
.landing-hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; margin: 0 0 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); }
.btn-small { padding: .45rem 1rem; font-size: .9rem; }

.notice {
  background: var(--accent); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; max-width: 54rem; margin: 0 0 3rem;
}
.notice p { margin: 0; color: var(--muted); }
.notice strong { color: var(--text); }

.steps { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding-bottom: 2rem; }
.step {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px;
  padding: .65rem 1.4rem; font-weight: 700; color: var(--text); font-size: .95rem;
}
.arrow { color: var(--muted); }

/* How-it-works / for-organizations page hero (badge + heading + lede, no CTA row) */
.page-hero { padding: 2.5rem 0 2rem; max-width: 50rem; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 1.5rem; color: var(--text); }
.page-hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 42rem; margin: 0; }

/* How-it-works: numbered step list */
.step-list { list-style: none; margin: 2rem 0 3rem; padding: 0; max-width: 54rem; }
.step-list li { display: flex; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.step-list li:last-child { border-bottom: 0; }
.step-num {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--primary); color: var(--primary-text);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.step-list h2 { margin: 0 0 .4rem; font-size: 1.3rem; font-weight: 600; color: var(--text); }
.step-list p { margin: 0; color: var(--muted); max-width: 42rem; }

/* For-organizations: three-card grid */
.org-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2rem 0 2.5rem; max-width: 60rem; }
/* Long-form prose: the privacy policy is the only page with headings and lists this deep, so it
   gets its own measure rather than the full page width. */
.policy { max-width: 46rem; }
.policy h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; color: var(--text); }
.policy h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; color: var(--text); }
.policy p, .policy li { color: var(--muted); line-height: 1.65; margin: 0 0 .8rem; }
.policy ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.policy li { margin-bottom: .35rem; }
.policy a { color: var(--link); text-decoration: underline; }
.policy .notice { margin-top: 2rem; }

.org-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.org-card h2 { margin: 0 0 .6rem; font-size: 1.2rem; font-weight: 600; color: var(--text); }
.org-card p { margin: 0; color: var(--muted); }

/* Report form page */
.hero {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem;
  padding: 2.5rem 0 2rem;
}
.hero h2 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .75rem; letter-spacing: -.02em; color: var(--text); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 0; }
.hero img { width: clamp(110px, 18vw, 190px); height: auto; }

.card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-width: 40rem;
}
.card h2 { margin: 0 0 .25rem; font-size: 1.35rem; color: var(--text); }
.card .hint { margin: 0 0 1.25rem; color: var(--muted); }

#caseForm { display: flex; flex-direction: column; gap: .65rem; }
#caseForm button { margin-top: .4rem; padding: .85rem 1.1rem; font-size: 1.05rem; }
#caseForm textarea { min-height: 4.5rem; }

/* Urgency/Photos labels: text and control share one row instead of stacking, to keep the
   (already long) public form from growing taller than it needs to. */
#caseForm > label {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-weight: 700; color: var(--text);
}
#caseForm > label .hint {
  font-size: .8rem; font-weight: 400; color: var(--muted); margin: 0;
}
#caseForm > label > select,
#caseForm > label > input[type="file"] {
  flex: 1; min-width: 10rem; font-size: 1rem; font-weight: 400; color: var(--text);
}

.gps-field { display: flex; gap: .5rem; }
.gps-field input { flex: 1; min-width: 0; }
#caseForm .use-location-btn {
  margin-top: 0; padding: .5rem .8rem; font-size: .85rem; white-space: nowrap;
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
#caseForm .use-location-btn:hover { background: var(--accent); }
#caseForm .use-location-btn:disabled { opacity: .6; cursor: default; }
.gps-status { margin: -.4rem 0 0; font-size: .8rem; }

.thanks-card { margin: 3rem auto; text-align: center; }
.thanks-card dl { text-align: left; margin: 1.25rem 0; }
dt { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .8rem; }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.site-footer { background: var(--primary); margin-top: 2.5rem; }
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 1.75rem 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem;
}
.footer-brand .footer-name { font-weight: 800; color: #ffffff; margin: 0 0 .4rem; }
.footer-brand p { margin: 0 0 .3rem; color: #c7d2c3; }
.footer-brand .footer-copy { margin-top: .9rem; color: #93a090; font-size: .9rem; }
.footer-notes { max-width: 28rem; }
.footer-notes p { margin: 0 0 .6rem; color: #c7d2c3; }
.footer-notes p:last-child { margin-bottom: 0; }
.footer-notes a { color: #c7d2c3; text-decoration: underline; }
.footer-notes a:hover { color: #ffffff; }

/* Org sign-up modal (for-organizations page) -- same structure as admin.css's .modal-overlay/
   .modal/.modal-actions, duplicated here since this page only loads public.css. */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(22, 38, 31, .45);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 10;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem; width: 100%; max-width: 24rem;
}
.modal h2 { margin: 0 0 .9rem; font-size: 1.1rem; color: var(--text); }
.modal form { display: flex; flex-direction: column; gap: .75rem; }
.modal form > label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); font-weight: 700; }
.modal form input { font: inherit; }
.field-status { margin: -.4rem 0 0; font-size: .8rem; color: var(--danger, #b3261e); min-height: 1em; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .25rem; }
.modal-actions button { padding: .45rem 1rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.modal-actions button[type="submit"] { background: var(--primary); color: var(--primary-text); border: 0; }
.modal-actions button[type="submit"]:hover { background: var(--primary-hover); }
.modal-actions button[type="button"] { background: transparent; border: 1px solid var(--border); color: var(--text); }
.modal-actions button[type="button"]:hover { background: var(--accent); }

/* Login page */
.login-page { min-height: 100vh; display: flex; }
main.login-main { max-width: 26rem; margin: auto; padding: 1.25rem; }
.login-card {
  width: 100%; background: var(--surface); border-radius: calc(var(--radius) + 6px);
  padding: 2rem; box-shadow: var(--shadow); text-align: center;
}
.login-card .brand-lockup { align-items: center; margin: 0 auto 1.25rem; }
.login-card .sub { margin: 0 0 1.5rem; color: var(--muted); font-size: .95rem; }
.login-card form { display: flex; flex-direction: column; gap: .8rem; text-align: left; }
.login-card .remember-me { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.login-card button { padding: .85rem 1.1rem; font-size: 1.05rem; }
.login-card .back { display: block; margin-top: 1rem; text-align: center; }
.login-card .google-signin { display: flex; justify-content: center; margin-top: 1.25rem; }

@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero img { margin: 0 auto; order: -1; }
  .hero p { margin: 0 auto; }
  .site-header { flex-wrap: wrap; gap: .75rem; }
  .site-header-right { flex-wrap: wrap; gap: .75rem; }
  .site-nav { gap: 1.1rem; }
  .org-grid { grid-template-columns: 1fr; }
}
