/* ---- 5. Hero -------------------------------------------------------------- */

.hero {
  margin-inline: calc(50% - 50vw);
  margin-bottom: 2.5rem;
  padding-inline: max(1.5rem, calc((100vw - var(--container-max)) / 2 + 1.5rem));
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
  background: linear-gradient(var(--ta-surface-2), var(--ta-surface));
  border-bottom: 1px solid var(--ta-border);
  text-align: center;
}

.hero h1 {
  max-width: 22ch;
  margin: 0 auto 0.6rem;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
}

.hero p {
  max-width: 56ch;
  margin: 0 auto;
  color: var(--ta-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * PARITY B07 — funeral-hero blocks (case/care/ashes/service mastheads,
 * service sheet, case journey). Ported from the reference's app.css
 * utilities that Tailwind cannot generate (the reference defines these as
 * `@utility`/plain rules of its own); the rest of each block uses the shared
 * Tailwind bundle verbatim.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── B07a. The reference type scale ────────────────────────────────────────
 * A page header is `text-large-title`, not a hand-typed `text-[1.75rem] …`.
 * Each sets size, weight, line-height and the SF Pro negative tracking
 * together — the four things that have to move as a unit for type to read as
 * one system. `text-mono-label` is the signature element: the mono label.
 * ── */
.text-hero {
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.text-large-title {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.026em;
}
.text-title {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.text-headline {
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.014em;
}
.text-body {
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}
.text-label {
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0;
}
.text-caption {
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 400;
}
.text-data {
  font-family: var(--ta-mono);
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.text-data-lg {
  font-family: var(--ta-mono);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.text-mono-label {
  font-family: var(--ta-mono);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ta-muted);
  font-variant-numeric: tabular-nums;
}

/* ── B07b. Control heights ─────────────────────────────────────────────────
 * The reference's control-height tokens (`--h-control: 34px`,
 * `--h-control-sm: 22px`), and the classes the mastheads' badges use so a
 * fact that shares a line with a control-sm control stays the same height.
 * ── */
:root {
  --h-control: 34px;
  --h-control-sm: 22px;
}
.hero-h-control {
  height: var(--h-control);
}
.hero-h-control-sm {
  height: var(--h-control-sm);
}

/* ── B07c. The state dot (path rails, the register thread) ────────────────
 * The 6px status dot the journey/custody rails stand on, and its live halo —
 * a ring that expands and fades rather than glowing in place (no blur, no
 * shadow); reduced motion collapses it via the global rule in motion.css.
 * ── */
.state-dot {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
}
.state-dot-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: inherit;
  pointer-events: none;
  animation: state-halo 2000ms ease-out infinite;
}
@keyframes state-halo {
  0% {
    opacity: 0.45;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.75);
  }
}

/* ── B07d. Masthead pane geometry ─────────────────────────────────────────
 * The reference's hero panes are `glass-panel` + `rounded-2xl` (18px). The
 * app's unlayered `.glass-panel` (vitrine.css) sets `--ta-r-lg` and beats the
 * layered Tailwind `rounded-2xl` utility, so the hero panes pin the radius
 * themselves (element+class specificity beats the layer order).
 * ── */
.glass-panel.hero-masthead {
  border-radius: var(--ta-r-2xl);
}

/* ── B07e. Path rails (journey / custody / ashes) ─────────────────────────
 * The reference's rails are `<ol class="flex …">` under a Tailwind preflight
 * that zeroes list indentation; this app's base.css gives `ol` 1.4em padding.
 * And each node is a `<button>` whose app-side base (buttons.css) paints its
 * own padding/background/font over the Tailwind utilities — the reference has
 * no such button base. So the rails carry `.hero-rail`, the node dots use the
 * `hero-dot` semantics below, and both are pinned here.
 * ── */
.hero-rail ol {
  padding-left: 0;
  margin: 0;
}
/* The reference's case-journey rail is a `glass-card rounded-xl px-5 py-4`
 * (14px radius, 16px/20px padding); the app's unlayered `.glass-card` wins
 * over the utilities otherwise. */
.hero-rail.glass-card {
  border-radius: var(--ta-r-xl);
  padding: 1rem 1.25rem;
}

.hero-rail button.hero-dot {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--ta-border);
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 24px;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: default;
  gap: normal;
  justify-content: normal;
  align-items: normal;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}
.hero-dot-edge-left {
  margin-right: 4px;
}
.hero-dot-edge-right {
  margin-left: 4px;
}
.hero-dot-center {
  margin-right: 4px;
  margin-left: 4px;
}
/* The state fills share the base's specificity so they sit on top of it.
 * Settled behind — the reference's `bg-primary/55`. */
.hero-rail button.hero-dot-done {
  background: color-mix(in oklch, var(--ta-accent) 55%, transparent);
}
/* The current node — `bg-primary ring-4 ring-primary/15`. */
.hero-rail button.hero-dot-now {
  background: var(--ta-accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--ta-accent) 15%, transparent);
}
/* The overdue first step on a custody path — `bg-warning ring-4 ring-warning/20`. */
.hero-rail button.hero-dot-due {
  background: var(--ta-warn);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--ta-warn) 20%, transparent);
}
.hero-rail button.hero-dot-next:hover {
  background: color-mix(in oklch, var(--ta-muted) 50%, transparent);
}
.hero-dot-click {
  cursor: pointer;
}
.hero-dot-click:focus-visible {
  outline: 2px solid var(--ta-accent);
  outline-offset: 2px;
}
/* The live halo — a state still moving. */
.hero-dot-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: inherit;
  pointer-events: none;
  animation: state-halo 2000ms ease-out infinite;
}

/* ── B07f. The side columns (portrait / tag / casket / venue panes) ───────
 * The reference tints these with `bg-muted/25` — the app's muted token
 * (a solid gray for text) isn't the reference's muted WASH, so the columns
 * pin the reference's own faint wash here.
 * ── */
.hero-side {
  background-color: oklch(0.3 0.015 260 / 0.0125);
}
@media (prefers-color-scheme: dark) {
  .hero-side {
    background-color: oklch(1 0 0 / 0.015);
  }
}

/* ── B07g. Case-hero portrait ─────────────────────────────────────────────
 * The reference's portrait is a bare button with `grid place-items-center
 * bg-muted`; the app's button base (padding, inline-flex, background:none)
 * would otherwise fight it.
 * ── */
button.hero-portrait {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: oklch(0.3 0.015 260 / 0.05);
  cursor: pointer;
  gap: 0;
  justify-content: normal;
  align-items: normal;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* ── B07h. Service sheet ──────────────────────────────────────────────────
 * The reference's sheet is `glass-card` + `px-6 py-10` (cover) / `py-8`
 * (panels) + `text-3xl` title + a plain donation link. The app's unlayered
 * `.glass-card` padding, `h1` base and `p` margins beat the layered
 * utilities, so the sheet pins its own padding, type and spacing.
 * ── */
.hero-sheet .hero-sheet-cover {
  padding: 2.5rem 1.5rem;
}
.hero-sheet .hero-sheet-body {
  padding: 2rem 1.5rem;
}
.hero-sheet h1 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.hero-sheet p {
  margin: 0;
}
/* The reference's margin utilities (the app's `p` base zeroes them). */
.hero-sheet .mt-2 {
  margin-top: 8px;
}
.hero-sheet .mt-6 {
  margin-top: 24px;
}
.hero-sheet .mt-0\.5 {
  margin-top: 2px;
}
.hero-sheet .mt-4 {
  margin-top: 16px;
}
.hero-sheet .space-y-5 > * + * {
  margin-top: 20px;
}
.hero-sheet a.hero-donate {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--ta-accent);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.hero-sheet a.hero-donate:hover {
  opacity: 0.9;
}


