/*  Hyacinth MSO's public home page (/). Loaded by home.html only.

    Built on app.css's tokens and nothing else: no colour here that app.css does
    not already define. Every class is home- prefixed. In particular this page
    must never use .nav (app.css turns any .nav into a fixed bottom tab bar at
    760px) or .cal-* (app.css owns that namespace).

    The one place gold is a call-to-action is the navy hero band, which is the
    rule app.css states for it: gold is 2.19:1 on cream, so on a light section
    the readable --gold-ink carries the eyebrows and step numbers instead. */

.home { display: block; }

.home-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Anchor targets clear the sticky header instead of hiding under it. */
.home [id] { scroll-margin-top: 76px; }

/* ---------- Header ---------- */
.home-top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.home-top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.home-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.home-brand:hover { text-decoration: none; }
.home-brand img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong); object-fit: cover;
}
.home-brand strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.home-links { display: flex; gap: 2px; margin-left: auto; }
.home-links a { padding: 8px 12px; color: var(--text-muted); font-size: 14px; }
.home-links a:hover { color: var(--text); text-decoration: none; box-shadow: inset 0 -2px 0 var(--gold); }
.home-signin { white-space: nowrap; }

/* ---------- Shared type ---------- */
.home-eyebrow, .home-tag {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-ink);
}
.home-rule { width: 2.5rem; height: 0.125rem; background: var(--gold); margin: 24px 0; }

/* ---------- Hero (the navy band) ---------- */
.home-hero { background: var(--accent); color: #fff; padding: 96px 0 104px; }
.home-hero .home-eyebrow { color: var(--gold); }
.home-hero h1 {
  margin: 0; max-width: 17ch;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.1;
  color: #fff;
}
.home-hero h1 em { font-style: italic; color: var(--gold); }
.home-lead {
  margin: 0 0 32px; max-width: 60ch;
  font-size: 18px; line-height: 1.6;
  color: color-mix(in srgb, #fff 82%, var(--accent));
}
.home-btn-on-navy { background: transparent; border-color: var(--gold); color: var(--gold); padding: 12px 22px; }
.home-btn-on-navy:hover { background: color-mix(in srgb, #fff 10%, transparent); color: #fff; }

/* ---------- Stats ---------- */
.home-stats { background: var(--surface); border-bottom: 1px solid var(--border); }
.home-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-stat { padding: 36px 28px; }
.home-stat + .home-stat { border-left: 1px solid var(--border); }
.home-stat-value {
  font-family: var(--font-display); font-size: 40px; font-weight: 500;
  line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text);
}
.home-stat p { margin: 8px 0 0; color: var(--text-muted); font-size: 14px; max-width: 30ch; }

/* ---------- Sections ---------- */
.home-section { padding: 88px 0; border-bottom: 1px solid var(--border); }
.home-section-alt { background: var(--surface-alt); }
.home-head { margin-bottom: 40px; }
.home-head h2 { margin: 0; max-width: 30ch; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2; }
.home-head h2 + p { margin: 14px 0 0; max-width: 62ch; color: var(--text-muted); font-size: 16px; }

.home-grid { display: grid; gap: 20px; }
.home-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* app.css spaces stacked cards with .card + .card; a grid spaces them itself. */
.home-grid > .card + .card, .home-people > .card + .card { margin-top: 0; }

.home-card { padding: 28px; }
.home-card h3 { margin: 0 0 14px; font-size: 20px; }
.home-card p { margin: 0; color: var(--text-muted); }
.home-card p.home-tag { margin-bottom: 8px; color: var(--gold-ink); }
.home-grid-3 .home-card h3::before {
  content: ""; display: block; width: 2.5rem; height: 0.125rem;
  background: var(--gold); margin-bottom: 14px;
}

.home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.home-list li { position: relative; padding-left: 18px; }
.home-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}

.home-flagship {
  display: flex; align-items: center; gap: 24px;
  margin-top: 28px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.home-flagship img { width: 168px; height: auto; flex: none; }
.home-flagship p { margin: 0; font-style: italic; color: var(--text-muted); font-size: 16px; }

.home-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
}
.home-steps li { border-top: 2px solid var(--gold); padding-top: 20px; }
.home-step-num {
  display: block; margin-bottom: 10px;
  font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--gold-ink);
}
.home-steps h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.home-steps p { margin: 0; color: var(--text-muted); }

.home-people { display: grid; gap: 20px; }
.home-person { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; padding: 28px; }
.home-person img {
  width: 160px; height: 160px; object-fit: cover; object-position: top;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.home-person h3 { margin: 0 0 4px; font-size: 22px; }
.home-person p { margin: 0 0 12px; }
.home-person p:last-child { margin-bottom: 0; }

/* ---------- Footer (navy band) ---------- */
.home-foot { background: var(--accent); color: color-mix(in srgb, #fff 78%, var(--accent)); padding: 48px 0 32px; }
.home-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-brand-foot { color: #fff; }
.home-brand-foot img { width: 40px; height: 40px; border-color: color-mix(in srgb, #fff 30%, transparent); }
.home-foot-signin { color: var(--gold); font-weight: 600; font-size: 14px; }
.home-foot-signin:hover { color: #fff; }
.home-disclaimer { margin: 24px 0; max-width: 80ch; font-size: 13.5px; line-height: 1.6; }
.home-foot-base {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid color-mix(in srgb, #fff 16%, transparent);
  font-size: 13px;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .home-grid-3 { grid-template-columns: 1fr; }
  .home-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-links { display: none; }
  .home-signin { margin-left: auto; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .home-wrap { padding: 0 16px; }
  .home-top-row { height: 58px; gap: 12px; }
  .home-brand strong { font-size: 16px; }
  .home-hero { padding: 56px 0 64px; }
  .home-lead { font-size: 16px; }
  .home-stats-grid { grid-template-columns: 1fr; }
  .home-stat { padding: 22px 0; }
  .home-stat + .home-stat { border-left: 0; border-top: 1px solid var(--border); }
  .home-section { padding: 56px 0; }
  .home-grid-2, .home-steps { grid-template-columns: 1fr; }
  .home-card { padding: 22px 20px; }
  .home-flagship { flex-direction: column; align-items: flex-start; }
  .home-person { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; }
  .home-person img { width: 112px; height: 112px; }
  .home-foot-row { flex-direction: column; align-items: flex-start; }
}
