/*
Theme Name: Watch the Spirit
Theme URI: https://watchthespirit.com
Author: Watch the Spirit
Description: Church of the Firstborn live stream network
Version: 1.1.2
License: Private
Text Domain: watchthespirit
*/

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-primary:       #0d1117;
  --bg-surface:       #161b22;
  --bg-surface-alt:   #1c2128;
  --bg-overlay:       #21262d;

  --gold:             #c9a84c;
  --gold-dim:         #c9a84c33;
  --gold-border:      #c9a84c55;

  --text-primary:     #e8e8e8;
  --text-secondary:   #aaaaaa;
  --text-muted:       #666666;
  --text-inverse:     #0d1117;

  --border:           rgba(255,255,255,0.08);
  --border-strong:    rgba(255,255,255,0.15);

  --pill-yt:          #ff6b6b;
  --pill-yt-bg:       rgba(255,68,68,0.12);
  --pill-bc:          #6ba3ff;
  --pill-bc-bg:       rgba(68,136,255,0.12);
  --pill-fb:          #7b93ff;
  --pill-fb-bg:       rgba(68,100,255,0.12);
  --pill-zm:          #5bb5ff;
  --pill-zm-bg:       rgba(91,181,255,0.12);
  --pill-ot:          #aaaaaa;
  --pill-ot-bg:       rgba(170,170,170,0.12);

  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-pill:      999px;

  --nav-height:       56px;
  --bottom-nav-height:60px;

  --font:             -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition:       0.18s ease;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

/* ─── Layout ─────────────────────────────────────────────────── */
.wts-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.wts-main {
  padding-top: var(--nav-height);
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  min-height: 100vh;
}

/* ─── Top Nav ────────────────────────────────────────────────── */
.wts-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.wts-nav__logo {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: #fff;
}
.wts-nav__logo span { color: var(--gold); }
.wts-nav__logo img { height: 32px; width: auto; }
.wts-nav__links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.wts-nav__links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.wts-nav__links a:hover,
.wts-nav__links a.active { color: var(--gold); }
.wts-nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  padding: 4px;
}

/* ─── Mobile Nav Drawer ──────────────────────────────────────── */
.wts-nav__drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 0.5px solid var(--border);
  padding: 12px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.wts-nav__drawer.open { display: flex; }
.wts-nav__drawer a {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  transition: color var(--transition);
}
.wts-nav__drawer a:last-child { border-bottom: none; }
.wts-nav__drawer a.active,
.wts-nav__drawer a:hover { color: var(--gold); }

/* ─── Bottom Nav (PWA) ───────────────────────────────────────── */
.wts-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-primary);
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.wts-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  text-decoration: none;
}
.wts-bottom-nav__item i { font-size: 22px; }
.wts-bottom-nav__item.active { color: var(--gold); }

/* ─── Page Hero ──────────────────────────────────────────────── */
.wts-hero {
  padding: 32px 20px 24px;
  text-align: center;
  border-bottom: 0.5px solid var(--border);
}
.wts-hero__eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.wts-hero__title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 300;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}
.wts-hero__title strong { font-weight: 500; }
.wts-hero__sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Day Tabs ───────────────────────────────────────────────── */
.wts-day-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px 20px 0;
}
.wts-day-tab {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  border: 0.5px solid var(--border-strong);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
}
.wts-day-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.wts-day-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-inverse);
  font-weight: 500;
}

/* ─── Section ────────────────────────────────────────────────── */
.wts-section {
  padding: 24px 20px;
}
.wts-section__label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.wts-divider {
  height: 0.5px;
  background: var(--border);
  margin: 0 20px;
}

/* ─── Live Badge ─────────────────────────────────────────────── */
.wts-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-dim);
  border: 0.5px solid var(--gold-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 16px;
}
.wts-live-badge__dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Service Cards ──────────────────────────────────────────── */
.wts-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.wts-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wts-card:hover { border-color: var(--border-strong); }
.wts-card--live {
  border-color: var(--gold) !important;
  background: rgba(201,168,76,0.08) !important;
  box-shadow: 0 0 0 1px var(--gold) !important;
}
.wts-card--soon {
  border-color: #4a9eff88 !important;
  background: rgba(74,158,255,0.06) !important;
  box-shadow: 0 0 0 1px #4a9eff55 !important;
}
.wts-live-indicator,
.wts-soon-indicator {
  display: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.wts-live-indicator { color: var(--text-inverse); background: var(--gold); }
.wts-soon-indicator { color: var(--text-inverse); background: #4a9eff; }
.wts-card--live .wts-live-indicator { display: inline-flex; }
.wts-card--soon .wts-soon-indicator { display: inline-flex; }
.wts-card__church {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px;
}
.wts-card--live .wts-card__church { color: var(--gold); }
.wts-card--soon .wts-card__church { color: #6ba3ff; }
.wts-card__location {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.wts-card__services { display: flex; flex-direction: column; gap: 8px; }
.wts-card__service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wts-card__service-info { flex: 1; }
.wts-card__service-type {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.wts-card__service-time {
  font-size: 12px;
  color: var(--text-secondary);
}
.wts-card__platforms { display: flex; gap: 4px; flex-wrap: wrap; }

/* ─── Platform Pills ─────────────────────────────────────────── */
.wts-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 0.5px solid transparent;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity var(--transition);
  text-decoration: none;
  display: inline-block;
}
.wts-pill:hover { opacity: 0.75; }
.wts-pill--yt  { color: var(--pill-yt); background: var(--pill-yt-bg); border-color: var(--pill-yt); }
.wts-pill--bc  { color: var(--pill-bc); background: var(--pill-bc-bg); border-color: var(--pill-bc); }
.wts-pill--fb  { color: var(--pill-fb); background: var(--pill-fb-bg); border-color: var(--pill-fb); }
.wts-pill--zm  { color: var(--pill-zm); background: var(--pill-zm-bg); border-color: var(--pill-zm); }
.wts-pill--ot  { color: var(--pill-ot); background: var(--pill-ot-bg); border-color: var(--pill-ot); }

/* ─── Meeting Rows ───────────────────────────────────────────── */
.wts-meetings { display: flex; flex-direction: column; gap: 8px; }
.wts-meeting {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}
.wts-meeting:hover { border-color: var(--border-strong); }
.wts-meeting__date { text-align: center; min-width: 44px; }
.wts-meeting__month {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
}
.wts-meeting__day {
  font-size: 24px;
  font-weight: 300;
  color: #fff;
  line-height: 1;
}
.wts-meeting__info { flex: 1; }
.wts-meeting__city {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.wts-meeting__meta {
  font-size: 11px;
  color: var(--text-muted);
}
.wts-meeting__type {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--gold-dim);
  border: 0.5px solid var(--gold-border);
  color: var(--gold);
  white-space: nowrap;
}

/* ─── Church Directory ───────────────────────────────────────── */
.wts-churches { display: flex; flex-direction: column; gap: 8px; }
.wts-church-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color var(--transition);
}
.wts-church-card:hover { border-color: var(--border-strong); }
.wts-church-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.wts-church-card__location { font-size: 11px; color: var(--text-muted); }
.wts-church-card__link {
  font-size: 11px;
  color: var(--gold);
  border: 0.5px solid var(--gold-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  white-space: nowrap;
  transition: background var(--transition);
}
.wts-church-card__link:hover { background: var(--gold-dim); }

/* ─── State Group ────────────────────────────────────────────── */
.wts-state-group { margin-bottom: 28px; }
.wts-state-group__heading {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--border);
}

/* ─── Empty State ────────────────────────────────────────────── */
.wts-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.wts-empty i { font-size: 32px; display: block; margin-bottom: 10px; opacity: 0.4; }

/* ─── History Content ────────────────────────────────────────── */
.wts-history-content p {
  color: var(--text-secondary) !important;
  font-size: 15px;
  line-height: 1.9 !important;
  margin-bottom: 20px !important;
}
.wts-history-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wts-history-content h2,
.wts-history-content h3 {
  color: var(--text-primary);
  font-weight: 400;
  margin: 28px 0 12px;
}

/* ─── Page Header ────────────────────────────────────────────── */
.wts-page-header {
  padding: 28px 20px 20px;
  border-bottom: 0.5px solid var(--border);
}
.wts-page-header__eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.wts-page-header__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 300;
  color: #fff;
}
.wts-page-header__title strong { font-weight: 500; }

/* ─── PWA Install Banner ─────────────────────────────────────── */
.wts-install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  border: 0.5px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 16px 20px 0;
  font-size: 13px;
}
.wts-install-banner.visible { display: flex; }
.wts-install-banner__text { color: var(--text-secondary); }
.wts-install-banner__text strong { color: var(--text-primary); display: block; font-size: 13px; }
.wts-install-banner__btn {
  background: var(--gold);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.wts-install-banner__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 2px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wts-nav__links { display: none; }
  .wts-nav__hamburger { display: none !important; }
  .wts-cards { grid-template-columns: 1fr; }
  .wts-section { padding: 20px 16px; }
  .wts-hero { padding: 24px 16px 20px; }
  .wts-day-tabs { padding: 16px 16px 0; gap: 5px; }
  .wts-day-tab { padding: 6px 12px; font-size: 11px; }
  .wts-install-banner { margin: 12px 16px 0; }
}

@media (min-width: 641px) {
  .wts-bottom-nav { display: none; }
  .wts-nav__hamburger { display: none !important; }
  .wts-main { padding-bottom: 24px; }
}

/* ─── Wind Hero Animation ────────────────────────────────────── */
.wts-wind-line1,
.wts-wind-line2 {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 1.4em;
}
.wts-wind-line1 { font-size: clamp(22px, 4vw, 32px); font-weight: 300; margin-bottom: 4px; }
.wts-wind-line2 { font-size: clamp(22px, 4vw, 32px); font-weight: 500; }
.wts-wind-word { display: inline-block; opacity: 0; will-change: transform, opacity, filter; }
@keyframes wts-tumble {
  0%   { opacity: 0; transform: translateX(var(--fx)) translateY(var(--fy)) rotate(var(--fr)) scale(0.5); filter: blur(8px); }
  25%  { opacity: 0.6; filter: blur(3px); }
  60%  { opacity: 1; transform: translateX(-4px) translateY(-3px) rotate(2deg) scale(1.06); filter: blur(0); }
  75%  { transform: translateX(2px) translateY(1px) rotate(-1deg) scale(0.98); }
  88%  { transform: translateX(-1px) translateY(0) rotate(0.5deg) scale(1.01); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes wts-gold-glow {
  0%,100% { color: #fff; text-shadow: none; }
  40%  { color: #f0d882; text-shadow: 0 0 30px #c9a84caa, 0 0 60px #c9a84c44; }
  70%  { color: #c9a84c; text-shadow: 0 0 20px #c9a84c88; }
}
.wts-wind-word.wts-land { animation: wts-tumble 0.9s cubic-bezier(0.18,0.89,0.32,1.28) forwards; }
.wts-wind-word.wts-glow { animation: wts-tumble 0.9s cubic-bezier(0.18,0.89,0.32,1.28) forwards, wts-gold-glow 3s ease-in-out 0.9s 1; }
.wts-wind-leaf { position: fixed; pointer-events: none; opacity: 0; animation: wts-leaf-fly var(--dur) var(--delay) ease-in-out forwards; z-index: 9999; }
@keyframes wts-leaf-fly {
  0%   { opacity: 0; transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(1); }
  8%   { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(var(--ex), var(--ey)) rotate(var(--rot)) scale(0.15); }
}
.wts-wind-streak { position: fixed; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, transparent, #c9a84c66, #c9a84c33, transparent); opacity: 0; animation: wts-streak var(--sdur) var(--sdelay) ease-out forwards; pointer-events: none; z-index: 9999; }
@keyframes wts-streak { 0%{opacity:0;transform:translateX(-120%)} 20%{opacity:1} 100%{opacity:0;transform:translateX(130%)} }

/* ─── Return to Top ──────────────────────────────────────────── */
.wts-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), border-color var(--transition);
  z-index: 99;
}
.wts-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.wts-top-btn:hover { border-color: var(--gold); }
@media (min-width: 641px) {
  .wts-top-btn { bottom: 24px; }
}

/* ─── Gold Particle Burst ────────────────────────────────────── */
.wts-particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  animation: wts-particle-fly 0.6s ease-out forwards;
}
@keyframes wts-particle-fly {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.3); }
}