/* ============================================================
   Sanctuary at Gilead — Mobile App-Style Hub
   Reuses the brand design system (css/style.css tokens) and adds
   app-style mobile shell + tool grid on top.
   ============================================================ */

/* ---------- App shell ---------- */
.m-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Compact app header (sticky) */
.m-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--blue-900);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-md);
}
.m-head .m-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-head .m-brand img { height: 38px; width: auto; flex: 0 0 auto; }
.m-head .m-wordmark { font-family: var(--font-display); color: #fff; font-size: .95rem; line-height: 1.05; }
.m-head .m-wordmark span { display: block; font-size: .58rem; letter-spacing: .16em; color: var(--gold-400); font-weight: 700; }
.m-head .m-spacer { flex: 1; }
.m-head .m-notif {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; font-size: 1.15rem; color: #fff; position: relative;
}
.m-head .m-notif .dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-500); box-shadow: 0 0 0 2px var(--blue-900);
}

/* ---------- Scrollable content ---------- */
.m-scroll { flex: 1; padding: 16px 16px 96px; }

/* Greeting */
.m-greet { padding: 8px 4px 16px; }
.m-greet .date { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); font-weight: 700; }
.m-greet h1 { font-family: var(--font-display); font-size: 1.6rem; color: var(--blue-900); margin-top: 2px; }
.m-greet p { color: var(--ink-600); font-size: .92rem; margin-top: 6px; }

/* Live hero banner */
.m-live {
  border-radius: 18px; overflow: hidden; margin: 4px 0 22px;
  background: linear-gradient(140deg, var(--blue-900), var(--blue-700));
  color: #fff; position: relative; padding: 18px;
  display: flex; align-items: center; gap: 14px;
}
.m-live .pulse {
  flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%;
  background: #ff3b30; box-shadow: 0 0 0 0 rgba(255,59,48,.6);
  animation: mPulse 1.6s infinite;
}
@keyframes mPulse { 0%{box-shadow:0 0 0 0 rgba(255,59,48,.55);} 70%{box-shadow:0 0 0 12px rgba(255,59,48,0);} 100%{box-shadow:0 0 0 0 rgba(255,59,48,0);} }
.m-live .m-live-txt { flex: 1; }
.m-live .m-live-txt .tag { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); font-weight: 700; }
.m-live .m-live-txt h2 { font-family: var(--font-display); font-size: 1.25rem; margin-top: 2px; }
.m-live .m-live-txt span { font-size: .82rem; opacity: .9; display: block; margin-top: 2px; }
.m-live .m-live-btn { flex: 0 0 auto; }

/* Quick tool grid */
.m-grid-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); font-weight: 700; padding: 0 4px 10px; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-tool {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 8px 12px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.m-tool:active { transform: scale(.96); box-shadow: var(--shadow-md); }
.m-tool .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 8px;
}
.m-tool .t { font-weight: 700; color: var(--blue-900); font-size: .84rem; line-height: 1.1; }
.m-tool .s { font-size: .72rem; color: var(--ink-600); margin-top: 3px; }
.m-tool.give .ico { background: linear-gradient(140deg, var(--gold-500), var(--gold-400)); }
.m-tool.watch .ico { background: linear-gradient(140deg, var(--blue-800), var(--blue-600)); }
.m-tool.sermon .ico { background: linear-gradient(140deg, var(--blue-700), var(--blue-600)); }
.m-tool.events .ico { background: linear-gradient(140deg, var(--blue-900), var(--blue-700)); }
.m-tool.visit .ico { background: linear-gradient(140deg, #0f9d58, #34d97b); }
.m-tool.prayer .ico { background: linear-gradient(140deg, var(--gold-700), var(--gold-500)); }
.m-tool.about .ico { background: linear-gradient(140deg, var(--blue-600), var(--blue-700)); }
.m-tool.ministry .ico { background: linear-gradient(140deg, var(--blue-800), var(--gold-700)); }

/* Section rows (next event / recent sermon) */
.m-section { margin-top: 26px; }
.m-section .m-section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 10px; }
.m-section .m-section-head h3 { font-family: var(--font-display); color: var(--blue-900); font-size: 1.15rem; }
.m-section .m-section-head a { font-size: .8rem; font-weight: 700; color: var(--blue-700); }
.m-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; box-shadow: var(--shadow-sm);
}
.m-row + .m-row { margin-top: 10px; }
.m-date { flex: 0 0 auto; text-align: center; background: var(--blue-900); color: #fff; border-radius: 12px; padding: 6px 10px; min-width: 56px; }
.m-date .mon { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-400); font-weight: 700; }
.m-date .day { font-family: var(--font-display); font-size: 1.25rem; line-height: 1; }
.m-row .m-info { flex: 1; min-width: 0; }
.m-row .m-info h4 { font-size: .95rem; color: var(--blue-900); }
.m-row .m-info span { font-size: .8rem; color: var(--ink-600); display: block; margin-top: 2px; }
.m-row .m-info p { font-size: .8rem; color: var(--ink-600); margin-top: 2px; }
.m-row .m-chev { flex: 0 0 auto; color: var(--blue-700); font-size: 1.2rem; }

/* Give quick band */
.m-give-band {
  margin-top: 22px; border-radius: 18px; padding: 18px;
  background: linear-gradient(150deg, var(--cream), var(--paper));
  border: 2px solid var(--gold-700); text-align: center;
}
.m-give-band h3 { font-family: var(--font-display); color: var(--blue-900); font-size: 1.2rem; }
.m-give-band p { color: var(--ink-600); font-size: .86rem; margin: 6px auto 14px; max-width: 42ch; }

/* ---------- Bottom dock (replaces site-footer on this app page) ---------- */
.m-dock {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(5,14,92,.97); backdrop-filter: blur(8px);
  border-top: 2px solid var(--gold-500);
  padding: 6px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
.m-dock .dock-row { display: flex; justify-content: space-around; }
.m-dock a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(255,255,255,.85); font-size: .62rem; font-weight: 600;
  padding: 4px 6px; border-radius: 8px; text-align: center;
}
.m-dock a .dock-ico { font-size: 1.15rem; line-height: 1; }
.m-dock a.give { color: var(--gold-400); font-weight: 700; }
.m-dock a.active { color: var(--gold-400); }

/* Hide desktop-only bits on app hub */
.m-page { display: block; }
body.m-app { padding-bottom: 0; }
body.m-app .site-header, body.m-app .mobile-dock { display: none; }

@media (max-width: 860px) { .m-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) {
  .m-head .m-wordmark { font-size: .82rem; }
  .m-tool { padding: 14px 6px 10px; }
  .m-tool .ico { width: 46px; height: 46px; font-size: 1.3rem; }
}
