/* ==========================================================================
   Homepage (index.php) — Phase 16 layout A "ประกาศรับสมัคร" (dev/home-layouts.html, ha-/wz- → home-).
   Builds on public.css (.letter*, .how) and the shared components; tokens only, so the pearl scroll
   (components.css §23) switches the letter to dark ink automatically. No new backdrop-filter.
   ========================================================================== */

/* ---------- hero ---------- */
.home-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 0;
  font-family: var(--font-display);           /* English only */
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 1rem);
  font-weight: var(--fw-medium);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.home-tagline::before,
.home-tagline::after {
  content: "";
  width: clamp(1.25rem, 6vw, 3.5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.home-tagline::after { transform: scaleX(-1); }
.home-hero .hero__lead { margin-top: var(--sp-5); }
.nw { white-space: nowrap; }

/* ---------- status lines under the lead (one line of text, not a banner) ---------- */
.home-status { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); }
.home-status__line {
  --st: var(--success);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1) var(--sp-2);
  max-width: 100%;
  min-height: var(--tap);
  margin: 0;
  padding: 0.35rem var(--sp-5);
  border: 1px solid color-mix(in srgb, var(--st) 40%, transparent);
  border-radius: var(--r-full);
  background: rgba(12, 10, 18, 0.7);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
}
.home-status__line--closed { --st: var(--danger); }
.home-status__line strong { color: color-mix(in srgb, var(--st) 65%, #FFFFFF); font-weight: var(--fw-semibold); }
.home-status__line .home-cd { color: var(--numeral); font-size: 1.05em; }
.home-status__sep { color: var(--text-subtle); }
.home-status__server { display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-xs); color: var(--text-muted); text-align: center; }
@media (max-width: 39.99rem) {
  .home-status__line { border-radius: var(--r-lg); padding-inline: var(--sp-4); }
  .home-status__sep { display: none; }
  .home-status__line > span:last-child { flex-basis: 100%; }
  .home-status__server { max-width: 22rem; }
}

.home-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, transparent) 22%, transparent);
}
.home-dot--ok { --dot: var(--success); }
.home-dot--off { --dot: var(--danger); }
.home-dot--live { animation: pulse 1.8s var(--ease-in-out) infinite; }
@media (prefers-reduced-motion: reduce) { .home-dot--live { animation: none; } }
.home-cd { font-family: var(--font-numeric); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }

/* ---------- the proclamation ---------- */
.home-main { padding-bottom: var(--sp-10); }
.home-letter .letter__body { gap: var(--sp-5); }
.letter__body > .home-salute { font-family: var(--font-serif); color: var(--heading); }

.letter__body > .home-terms__title {
  padding-top: var(--sp-5);                   /* hairline keeps the intro / terms rhythm the role block used to give */
  border-top: 1px solid var(--hairline-strong);
  font-family: var(--font-serif);
  font-weight: var(--fw-medium);
  color: var(--heading);
}
.home-terms { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.home-terms li { display: flex; gap: var(--sp-3); line-height: 1.75; color: var(--text-muted); }
.home-terms svg.lucide { flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: 0.3rem; color: var(--primary); }

.home-signrow { justify-content: space-between; flex-wrap: wrap; row-gap: var(--sp-4); }
.home-date { margin: 0; font-size: var(--fs-sm); color: var(--text-subtle); }
.home-sign { display: flex; align-items: center; gap: var(--sp-4); margin-inline-start: auto; }

.home-closed-note { margin: 0; font-size: var(--fs-sm); color: var(--danger-text); }
.home-resubmit { margin: var(--sp-4) 0 0; font-size: var(--fs-sm); text-align: center; color: var(--text-muted); }
