/*
 * LA Churches theme. Layers on top of base.css, nav.css, footer.css,
 * theme-ubimissa.css, and page-specific CSS.
 *
 * Scoped to html.theme-lachurches so it is additive, not destructive.
 * Map and finder pages remain functional with original styling; this layer
 * re-skins typography, color, and the new homepage.
 *
 * Parish detail + adoration index live in theme-lachurches-parish.css.
 *
 * Authored 2026-04-18 per docs/DESIGN_SPEC.md.
 */

/* ── Document background and typography ─────────────────────────── */
html.theme-lachurches,
html.theme-lachurches body {
  background: var(--lac-bg);
  color: var(--lac-ink);
  font-family: var(--lac-serif);
  font-size: var(--lac-text-md);
  line-height: var(--lac-leading-normal);
  font-feature-settings: "liga", "kern";
  -webkit-font-smoothing: antialiased;
}

html.theme-lachurches body.loaded,
html.theme-lachurches body {
  opacity: 1;
}

html.theme-lachurches { background: var(--lac-bg) !important; }

html.theme-lachurches h1,
html.theme-lachurches h2,
html.theme-lachurches h3,
html.theme-lachurches .lac-display {
  font-family: var(--lac-display);
  font-weight: 700;
  color: var(--lac-ink);
  letter-spacing: 0.02em;
}

html.theme-lachurches a {
  color: var(--lac-pacific);
  text-decoration-color: var(--lac-rule);
  text-underline-offset: 2px;
}

html.theme-lachurches a:hover { color: var(--lac-gold-deep); }

html.theme-lachurches :focus-visible {
  outline: var(--lac-focus);
  outline-offset: 2px;
  border-radius: var(--lac-radius-sm);
}

/* ── Site nav shell (LA manuscript override of nav.css navy) ──────── */

html.theme-lachurches .top-nav {
  background: var(--lac-bg);
  border-bottom: 1px solid var(--lac-rule);
  padding-top: env(safe-area-inset-top);
}

html.theme-lachurches .nav-container {
  max-width: var(--lac-col-wide);
  padding: var(--lac-space-3) var(--lac-space-5);
}

html.theme-lachurches .logo {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: var(--lac-text-md);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lac-ink);
  gap: var(--lac-space-3);
}
html.theme-lachurches .logo:hover { color: var(--lac-gold-deep); }

.lac-logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--lac-gold);
  display: inline-block;
}
html.theme-lachurches .logo:hover .lac-logo-mark { color: var(--lac-gold-deep); }

/* Typographic small-caps links, gold underline on active */
html.theme-lachurches .nav-link,
html.theme-lachurches .nav-dropdown-toggle {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: var(--lac-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lac-ink-2);
  background: none;
  border: none;
  border-radius: 0;
  padding: var(--lac-space-2) var(--lac-space-2);
}
html.theme-lachurches .nav-link:hover,
html.theme-lachurches .nav-dropdown-toggle:hover,
html.theme-lachurches .nav-dropdown.open .nav-dropdown-toggle {
  color: var(--lac-ink);
  background: none;
}
html.theme-lachurches .nav-link.active,
html.theme-lachurches .nav-dropdown-toggle.active {
  color: var(--lac-ink);
  background: none;
  box-shadow: inset 0 -2px 0 var(--lac-gold);
}
html.theme-lachurches .nav-dropdown-arrow { color: var(--lac-gold); }

/* Dropdown menu on cream */
html.theme-lachurches .nav-dropdown-menu {
  background: var(--lac-bg);
  border: 1px solid var(--lac-rule);
  border-radius: var(--lac-radius-md);
  box-shadow: none;
}
html.theme-lachurches .nav-dropdown-item { font-family: var(--lac-serif); font-size: var(--lac-text-sm); color: var(--lac-ink); }
html.theme-lachurches .nav-dropdown-item:hover { background: var(--lac-bg-warm); color: var(--lac-gold-deep); }
html.theme-lachurches .nav-dropdown-item .dropdown-icon { display: none; }

/* Language switcher: small-caps, hairline, no fill */
html.theme-lachurches .lang-btn {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid var(--lac-rule);
  border-radius: var(--lac-radius-sm);
  color: var(--lac-ink-2);
}
html.theme-lachurches .lang-btn:hover { color: var(--lac-ink); border-color: var(--lac-gold); }
html.theme-lachurches .lang-btn.active {
  color: var(--lac-ink);
  background: none;
  border-color: var(--lac-gold);
}

html.theme-lachurches .nav-menu-toggle { color: var(--lac-ink); }

@media (max-width: 768px) {
  html.theme-lachurches .nav-links { background: var(--lac-bg) !important; }
  html.theme-lachurches .nav-link,
  html.theme-lachurches .nav-dropdown-item { color: var(--lac-ink) !important; border-bottom-color: var(--lac-rule) !important; }
  html.theme-lachurches .nav-link.active { color: var(--lac-ink) !important; box-shadow: none; }
}

/* ── LA Homepage: the finder ────────────────────────────────────── */

.lac-home {
  background: var(--lac-bg);
  min-height: 100vh;
  padding: 0 var(--lac-space-5);
}

/* First viewport: ichthys + one headline + location button + search */
.lac-finder {
  max-width: var(--lac-col-prose);
  margin: 0 auto;
  padding: calc(var(--lac-space-8) + 32px) 0 var(--lac-space-7);
  text-align: center;
}

.lac-finder-mark {
  width: 44px;
  height: 44px;
  color: var(--lac-red);
  margin: 0 auto var(--lac-space-5);
  display: block;
}

.lac-finder-title {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--lac-ink);
  margin: 0 0 var(--lac-space-4);
}

.lac-finder-sub {
  font-family: var(--lac-serif);
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--lac-ink-2);
  max-width: 30em;
  margin: 0 auto var(--lac-space-6);
  line-height: var(--lac-leading-normal);
}

.lac-finder-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--lac-space-3);
  max-width: 30rem;
  margin: 0 auto;
}

.lac-locate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lac-space-3);
  min-height: 52px;
  padding: 14px 28px;
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: var(--lac-text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--lac-ink);
  color: var(--lac-bg);
  border: 1px solid var(--lac-ink);
  border-radius: var(--lac-radius-sm);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.lac-locate:hover {
  background: var(--lac-gold-deep);
  border-color: var(--lac-gold-deep);
}
.lac-locate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lac-gold);
  box-shadow: 0 0 0 3px rgba(160, 128, 48, 0.25);
}
.lac-locate:hover .lac-locate-dot { background: var(--lac-bg); box-shadow: none; }

.lac-finder-input {
  width: 100%;
  min-height: 52px;
  padding: 12px var(--lac-space-4);
  font-family: var(--lac-serif);
  font-size: var(--lac-text-md);
  color: var(--lac-ink);
  background: var(--lac-bg);
  border: 1px solid var(--lac-rule);
  border-radius: var(--lac-radius-sm);
  text-align: center;
}
.lac-finder-input::placeholder { color: var(--lac-ink-2); font-style: italic; }
.lac-finder-input:focus {
  outline: var(--lac-focus);
  outline-offset: 1px;
  border-color: var(--lac-gold);
}

.lac-finder-status {
  font-family: var(--lac-serif);
  font-style: italic;
  font-size: var(--lac-text-sm);
  color: var(--lac-ink-2);
  margin: var(--lac-space-5) auto 0;
  max-width: 28em;
}

/* ── Section divider: the ichthys, gold ─────────────────────────── */
.lac-fish-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lac-space-4);
  max-width: var(--lac-col-prose);
  margin: 0 auto;
  padding: var(--lac-space-2) 0 var(--lac-space-6);
  color: var(--lac-gold);
}
.lac-fish-divider svg { width: 22px; height: 22px; display: block; }
.lac-fish-divider::before,
.lac-fish-divider::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--lac-rule);
}

/* ── Quiet wayfinding row ────────────────────────────────────────── */
.lac-wayfind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--lac-space-3);
  max-width: var(--lac-col-prose);
  margin: 0 auto;
  padding: var(--lac-space-6) 0 var(--lac-space-8);
}
.lac-wayfind a {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: var(--lac-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lac-ink-2);
  text-decoration: none;
}
.lac-wayfind a:hover { color: var(--lac-gold-deep); }
.lac-wayfind .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lac-gold);
}

.lac-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--lac-space-2);
  padding: 14px 28px;
  font-family: var(--lac-display);
  font-size: var(--lac-text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--lac-ink);
  color: var(--lac-bg);
  text-decoration: none;
  border: 1px solid var(--lac-ink);
  border-radius: var(--lac-radius-sm);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.lac-btn:hover {
  background: var(--lac-gold-deep);
  color: var(--lac-bg);
  border-color: var(--lac-gold-deep);
}

.lac-btn-ghost {
  background: transparent;
  color: var(--lac-ink);
  border: 1px solid var(--lac-rule);
}
.lac-btn-ghost:hover {
  background: var(--lac-bg-warm);
  border-color: var(--lac-gold);
  color: var(--lac-ink);
}

/* ── Live Mass panel on home ──────────────────────────────────── */

.lac-live-panel {
  max-width: var(--lac-col-prose);
  margin: 0 auto;
  padding: 0 0 var(--lac-space-6);
}

.lac-live-panel h2 {
  font-family: var(--lac-display);
  font-size: var(--lac-text-xl);
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--lac-ink);
  margin: 0 0 var(--lac-space-2);
  font-weight: 700;
}

.lac-live-panel .lac-live-note {
  font-family: var(--lac-serif);
  font-style: italic;
  color: var(--lac-ink-2);
  text-align: center;
  margin: 0 0 var(--lac-space-5);
  font-size: var(--lac-text-sm);
}

.lac-live-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--lac-rule);
}

.lac-live-list > li {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--lac-space-4);
  align-items: baseline;
  padding: var(--lac-space-4) 0;
  border-bottom: 1px solid var(--lac-rule);
}

.lac-live-time {
  font-family: var(--lac-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: var(--lac-text-lg);
  color: var(--lac-ink);
}

.lac-live-parish {
  font-family: var(--lac-display);
  font-size: var(--lac-text-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lac-live-parish a { color: var(--lac-ink); text-decoration: none; }
.lac-live-parish a:hover { color: var(--lac-gold-deep); }

.lac-live-meta {
  display: block;
  font-family: var(--lac-serif);
  font-style: italic;
  font-size: var(--lac-text-sm);
  color: var(--lac-ink-2);
  margin-top: 2px;
}

.lac-live-badge {
  font-family: var(--lac-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lac-gold-deep);
  border: 1px solid var(--lac-gold);
  padding: 2px 6px;
  border-radius: var(--lac-radius-sm);
}

.lac-live-list > li.lac-live-empty {
  display: block;
  grid-template-columns: none;
  text-align: center;
  font-style: italic;
  color: var(--lac-ink-2);
  padding: var(--lac-space-6);
  border-bottom: none;
}
.lac-live-empty a { color: var(--lac-pacific); }

.lac-live-foot {
  text-align: center;
  margin: var(--lac-space-5) 0 0;
}
.lac-live-foot a {
  font-family: var(--lac-display);
  font-weight: 700;
  font-size: var(--lac-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lac-ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--lac-gold);
  padding-bottom: 2px;
}
.lac-live-foot a:hover { color: var(--lac-gold-deep); }

/* ── Hairline: universal .lac-hr ──────────────────────────────── */
.lac-hr {
  border: none;
  border-top: 1px solid var(--lac-gold);
  margin: var(--lac-space-6) 0;
  max-width: 120px;
}

/* ── Dark sepia mode (design spec 7) ───────────────────────────────
   tokens.css remaps bg/ink/rule/red. Gold is not, so brighten the
   decorative gold marks and active rules for legibility on sepia.
   The locate button inverts correctly via ink/bg tokens already. */
@media (prefers-color-scheme: dark) {
  html.theme-lachurches .lac-logo-mark,
  html.theme-lachurches .lac-fish-divider { color: var(--lac-gold-deep-dark); }
  html.theme-lachurches .lac-locate-dot,
  html.theme-lachurches .lac-wayfind .sep { background: var(--lac-gold-deep-dark); }
  html.theme-lachurches .nav-link.active,
  html.theme-lachurches .nav-dropdown-toggle.active { box-shadow: inset 0 -2px 0 var(--lac-gold-deep-dark); }
  html.theme-lachurches .lang-btn.active,
  html.theme-lachurches .lang-btn:hover { border-color: var(--lac-gold-deep-dark); }
  html.theme-lachurches .lac-live-foot a { box-shadow: inset 0 -1px 0 var(--lac-gold-deep-dark); }
}

/* ── Prefers-reduced-motion respect (design spec 7) ────────────── */
@media (prefers-reduced-motion: reduce) {
  html.theme-lachurches * {
    animation: none !important;
    transition: none !important;
  }
}
