/* RhemaClips: phone-first column. Vestment indigo and gold; sermon quotes set in serif italic; WhatsApp green only on the share action. */
:root {
  --ink: #1d1640; --ink-2: #4a4470; --muted: #7a7597;
  --bg: #f4f2f9; --surface: #ffffff; --line: #e3dff0;
  --gold: #d99a2b; --indigo: #3b2bb5; --share: #1a9e52;
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--display);
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left)); }
a { color: var(--indigo); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.bar, main, .foot { max-width: 560px; margin: 0 auto; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 8px; }
.brand { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--gold); }
.loading { color: var(--muted); padding: 40px 0; }

/* home */
.hero { padding: 28px 0 22px; }
.hero h1 { font: 800 clamp(34px, 9vw, 46px)/1.02 var(--display); letter-spacing: -0.03em; margin: 0 0 12px; text-wrap: balance; }
.hero p { color: var(--ink-2); margin: 0; max-width: 34ch; }
.search { position: relative; margin: 20px 0 8px; }
.search input { width: 100%; font: 500 17px var(--display); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 15px 16px; }
.search input:focus { border-color: var(--indigo); outline: none; }
.churches { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.churches a { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.mono { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.churches .name { font-weight: 700; font-size: 18px; line-height: 1.2; }
.churches .sub { color: var(--muted); font-size: 14px; }
.churches .when { color: var(--muted); font-size: 13px; text-align: right; }
.churches .when b { display: block; color: var(--gold); font-weight: 700; }
.empty { color: var(--ink-2); padding: 18px 4px; }

/* church */
.church-head { padding: 22px 0 6px; }
.back { font-size: 15px; text-decoration: none; }
.church-head h1 { font: 800 clamp(30px, 8vw, 40px)/1.05 var(--display); letter-spacing: -0.025em; margin: 14px 0 4px; }
.church-head .pastor { color: var(--ink-2); margin: 0; }
.service { margin: 22px 0 6px; padding-top: 14px; border-top: 2px solid var(--ink); }
.service h2 { font: 700 17px/1.3 var(--display); margin: 0; }
.service .meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.moments { display: flex; flex-direction: column; gap: 26px; margin: 20px 0 10px; }
.moment { background: var(--surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.moment .card-img { aspect-ratio: 1 / 1; background: var(--ink); width: 100%; object-fit: cover; }
.moment .body { padding: 16px 18px 18px; }
.quote { font: italic 600 22px/1.35 var(--serif); margin: 0 0 10px; text-wrap: pretty; }
.why { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.why strong { color: var(--gold); font-weight: 700; }
.actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn { font: 700 16px var(--display); border: 0; border-radius: 12px; padding: 14px 16px; cursor: pointer; text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.share { background: var(--share); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn:active { transform: translateY(1px); }
.unofficial { font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* moment page */
.moment-page { padding: 18px 0 0; }
.moment-page .status-img { border-radius: 18px; width: 100%; max-width: 380px; margin: 0 auto 18px; box-shadow: 0 20px 40px -24px rgba(29, 22, 64, .6); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin: 18px 0; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cta { background: var(--ink); color: #fff; border-radius: 18px; padding: 20px; margin: 26px 0 8px; }
.cta p { margin: 0 0 12px; }
.cta .btn { background: var(--gold); color: var(--ink); width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 700; max-width: calc(100% - 32px); z-index: 10; }

/* report */
.report textarea, .report input { width: 100%; font: 500 16px var(--display); padding: 12px; border: 2px solid var(--line); border-radius: 12px; margin: 6px 0 14px; }

.foot { color: var(--muted); font-size: 13px; padding: 34px 0 40px; border-top: 1px solid var(--line); margin-top: 30px; }
.foot p { margin: 0 0 8px; max-width: 60ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- v1.1: ideas taken from the Lovable draft ---------- */
/* dark hero with a tilted collage of real cards */
.hero-dark { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 24px; margin: 6px 0 4px; padding: 0 22px 26px; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.collage { position: absolute; inset: -40px -60px auto -60px; height: 360px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; transform: rotate(-8deg); opacity: .55; z-index: -1; }
.collage img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.collage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29,22,64,0) 30%, var(--ink) 92%); }
.hero-dark h1 { font: 800 clamp(34px, 9vw, 46px)/1.02 var(--display); letter-spacing: -0.03em; margin: 220px 0 10px; text-wrap: balance; }
.hero-dark h1 em { font-style: normal; color: var(--gold); }
.hero-dark p { color: #cfc9ea; margin: 0; max-width: 34ch; }
.trending { margin: 26px 0 6px; }
.trending h2, .section-title { font: 700 17px/1.3 var(--display); margin: 0 0 12px; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding-left: max(16px, env(safe-area-inset-left)); padding-right: 16px; }
.strip a { flex: 0 0 148px; scroll-snap-align: start; text-decoration: none; color: var(--ink); }
.strip img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; }
.strip span { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* church header */
.church-id { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; }
.church-id .mono { width: 56px; height: 56px; font-size: 20px; }
.church-id h1 { margin: 0; }
.chips { display: flex; gap: 8px; margin: 18px 0 0; }
.chip { font: 700 14px var(--display); padding: 10px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* compact action row */
.row-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.opens { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 999px; background: var(--bg); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.play { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; color: var(--ink); text-decoration: none; }
.play svg, .btn svg { width: 18px; height: 18px; }

/* text card used when a moment has no image yet */
.text-card { aspect-ratio: 1; background: radial-gradient(120% 90% at 85% 0%, #5b3a8a 0%, var(--ink) 55%); color: #fff; padding: 26px; display: flex; flex-direction: column; justify-content: center; }
.text-card .tc-church { font-weight: 800; font-size: 13px; color: var(--gold); margin-bottom: auto; }
.text-card .tc-q { font: italic 600 clamp(24px, 7vw, 32px)/1.2 var(--serif); margin: 0 0 12px; }
.text-card .tc-p { color: #cfc9ea; font-size: 14px; margin-bottom: auto; }

/* share sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 15, 45, .55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 10px max(18px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); max-height: 92vh; overflow: auto; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet h2 { font: 800 22px/1.2 var(--display); margin: 0 0 4px; }
.sheet .hint { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.fmt { border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 700 14px var(--display); color: var(--ink); }
.fmt[aria-pressed="true"] { border-color: var(--gold); background: #fdf3e2; }
.fmt img { border-radius: 8px; height: 120px; width: auto; object-fit: cover; }
.sheet label { font-weight: 700; font-size: 14px; display: block; margin-bottom: 6px; }
.sheet textarea { width: 100%; font: 500 15px/1.4 var(--display); color: var(--ink); padding: 12px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 14px; resize: vertical; }
.sheet .btn { width: 100%; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn.outline { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.opens svg { width: 16px; height: 16px; }
.collage { opacity: .4; }
.collage::after { background: linear-gradient(180deg, rgba(29,22,64,.15) 0%, rgba(29,22,64,.55) 45%, var(--ink) 85%); }
