/*
 * Public website styles (spec 20.1, 21). Plain CSS served by Propshaft.
 *
 * Brand palette (spec 4, 21): brand green #9acd69, off-white canvas #f2f2f7.
 * Typeface (spec 21): Montserrat first, then system UI fallbacks.
 *
 * This is the guest-facing marketing site. The Capacitor app is Vue/Ionic and
 * never uses these styles.
 */

:root {
  --brand: #9acd69;
  --brand-ink: #1c2b12;
  --brand-dark: #6f9e43;
  --canvas: #f2f2f7;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --ink-muted: #6b6b70;
  --border: #e3e3e8;
  --badge-ink: #f5f5f7;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
  --max-width: 1040px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav__link {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav__link:hover {
  color: var(--ink);
  text-decoration: none;
  background: var(--canvas);
}

.site-nav__link.is-active {
  color: var(--brand-dark);
}

/* Main */
.site-main {
  min-height: calc(100vh - 64px - 60px);
}

/* Hero (landing) */
.hero {
  background: linear-gradient(160deg, #ffffff 0%, #eef4e6 100%);
  padding: 72px 0;
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--ink-muted);
  margin: 0 0 16px;
  font-weight: 500;
}

.hero__body {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Store badges (App Store / Play Store CTAs, spec 20.1) */
.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--ink);
  color: var(--badge-ink);
  padding: 10px 18px;
  border-radius: 12px;
  min-width: 168px;
  text-align: left;
  transition: transform 0.12s ease;
}

.store-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.store-badge__store {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.store-badge__name {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section__title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-card__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.feature-card__body {
  margin: 0 0 16px;
  color: var(--ink-muted);
}

.feature-card__link {
  font-weight: 600;
}

/* Prayer teaser (guest-safe, spec 3.2, 25) */
.prayer-teaser {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.prayer-teaser__message {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.prayer-teaser__cta {
  color: var(--ink-muted);
  margin: 0;
}

/* Page (media / events) */
.page {
  padding: 48px 0 72px;
}

.page__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.page__intro {
  color: var(--ink-muted);
  margin: 0 0 32px;
  max-width: 560px;
}

/* Media catalog */
.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.media-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.media-item__kind {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.media-item__series {
  font-weight: 600;
  color: var(--ink);
}

.media-item__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.media-item__speaker {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
}

.media-item__description {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.media-empty,
.events-empty {
  color: var(--ink-muted);
  font-size: 1.05rem;
  padding: 32px 0;
}

/* Events list */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.event__date-badge {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--brand-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.event__date-badge-month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event__date-badge-day {
  font-size: 1.5rem;
  font-weight: 800;
}

.event__body {
  flex: 1 1 auto;
  min-width: 0;
}

.event__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.event__time {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 500;
}

.event__location {
  margin: 0 0 4px;
  color: var(--ink-muted);
}

.event__description {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.site-footer__text {
  margin: 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero {
    padding: 48px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .event {
    flex-direction: column;
    gap: 12px;
  }

  .staff-snapshot__metrics {
    grid-template-columns: 1fr;
  }
}

/* Staff snapshot (issue #39, spec 20.2) */
.staff-snapshot {
  margin-top: 24px;
}

.staff-snapshot__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.staff-snapshot__metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.staff-snapshot__metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}

.staff-snapshot__metric-label {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.staff-snapshot__segments-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.staff-snapshot__segment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.staff-snapshot__segment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.staff-snapshot__segment:last-child {
  border-bottom: none;
}

.staff-snapshot__segment-name {
  color: var(--ink);
  font-size: 0.95rem;
}

.staff-snapshot__segment-count {
  font-weight: 600;
  color: var(--ink);
}
