/* The Father's House — phone layer
   Everything here applies at phone width only (760px and below). Desktop is untouched.
   Patterns: thumb-zone tab bar, bottom sheet menu, story-style hero, swipe decks,
   live service chip, tap feedback. mobile.js adds html.is-phone and builds the extras. */

@media (max-width: 760px) {
  :root { --tabbar-h: 68px; --gutter: 20px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px); -webkit-tap-highlight-color: transparent; }

  /* header: logo + live chip; the menu moves to the bottom sheet */
  .site-header .wrap { min-height: 58px; }
  .is-phone .menu-toggle, .is-phone .site-header .nav { display: none !important; }
  .is-phone .timebar { display: none; }
  .logo img { height: 26px; }

  /* type tuned for a phone */
  h2 { font-size: clamp(2.1rem, 10vw, 2.9rem); }
  .band { padding-block: 64px; }
  .lead { font-size: 1.12rem; }
  .section-head { margin-bottom: 24px; }

  /* tap feedback */
  .btn, .path, .card, .stackcard, .tabbar a, .tabbar button, .sheet a, .faq summary { transition: transform .18s cubic-bezier(.2,.8,.2,1), background .15s, color .15s; }
  .btn:active, .path:active, .card:active, .stackcard:active, .sheet a:active { transform: scale(.965); }
  .btn { padding: 1.05em 1.6em; }
  .hero .btns, .page-hero .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero .btns .btn, .page-hero .btns .btn { justify-content: center; }
  .page-hero .btns .btn:only-child { grid-column: 1 / -1; }
  .hero .btns .btn { white-space: nowrap; padding-inline: 1em; }

  /* ---------- home hero: full-screen story ---------- */
  .hero--home { min-height: calc(100svh - 58px); align-items: end; }
  .hero--home .wrap { padding-block: 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 30px); gap: 16px; }
  .hero--home .eyebrow { display: none; }
  .hero-title { font-size: clamp(2.8rem, 13.5vw, 4.2rem); line-height: .9; }
  .hero--home .hero-meta span:nth-child(3) { display: none; }
  .hero-meta { gap: 8px; font-size: .9rem; }
  .hero-meta span { background: rgba(255,255,255,.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.14); padding: 7px 12px; border-radius: 999px; }
  .is-phone .hero .ph.hero-media.ph--photo { opacity: .62; }
  .hero--home::after { background: linear-gradient(180deg, rgba(17,17,16,.55) 0%, rgba(17,17,16,.1) 22%, rgba(17,17,16,.35) 55%, var(--ink) 100%); }
  .scroll-cue { display: none; }

  .story { position: absolute; inset: 0; overflow: hidden; }
  .story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity .9s ease; }
  .story img.on { opacity: 1; animation: kenburns 7s ease-out forwards; }
  @keyframes kenburns { from { transform: scale(1.18) translate3d(2%, 1%, 0); } to { transform: scale(1.02) translate3d(0, 0, 0); } }
  .story-bars { position: absolute; z-index: 2; top: 12px; left: var(--gutter); right: var(--gutter); display: flex; gap: 5px; }
  .story-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
  .story-bars i b { display: block; height: 100%; width: 0; background: #fff; }
  .story-bars i.done b { width: 100%; }
  .story-cap { position: absolute; z-index: 2; top: 26px; left: var(--gutter); font: 700 .68rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85); }
  .story-tap { position: absolute; inset: 0; z-index: 1; }
  .hero--home .wrap { z-index: 3; pointer-events: none; }
  .hero--home .wrap a, .hero--home .wrap button { pointer-events: auto; }

  /* ---------- swipe decks (start-here tiles, kids classes, give options) ---------- */
  .snap { display: flex !important; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .snap::-webkit-scrollbar { display: none; }
  .snap > * { flex: 0 0 78%; scroll-snap-align: start; }
  .grid--4.snap > * { flex-basis: 70%; }
  .snap .path { min-height: 220px; align-content: end; border-top-width: 6px; border-radius: 4px; }
  .snap .path h3 { font-size: 1.9rem; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--line); transition: width .3s, background .3s; }
  .dots i.on { width: 22px; background: var(--tangerine); }
  .band--ink .dots i { background: #3a3a37; }
  .band--ink .dots i.on { background: var(--tangerine); }

  /* ministry stack becomes a full-bleed swipe deck with photo cards */
  .stackcards.snap > * { flex-basis: 84%; }
  .stackcard { position: relative; display: block; min-height: 68svh; padding: 0; overflow: hidden; border-radius: 18px; top: auto; }
  .stackcard .ph { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
  .stackcard .ph img { transform: scale(1.18); will-change: transform; }
  .stackcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,17,16,0) 30%, rgba(17,17,16,.92) 100%); pointer-events: none; }
  .stackcard-text { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 22px; gap: 10px; }
  .stackcard h3 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .stackcard p { font-size: .98rem; }

  /* photo strip: smaller tiles */
  .strip .ph { width: 64vw; }

  /* events as cards */
  .event { grid-template-columns: auto 1fr; gap: 6px 16px; padding-block: 20px; }
  .event .btn { grid-column: 1 / -1; justify-content: center; }

  /* watch page: edge-to-edge video */
  .video-frame, .ph--wide { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }

  /* footer */
  .site-footer .big { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }

  /* ---------- scroll progress ---------- */
  .progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--tangerine), var(--teal)); z-index: 60; pointer-events: none; }

  /* ---------- live / next-service chip ---------- */
  .live-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; font: 700 .72rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
  .live-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; }
  .live-chip.is-live { background: var(--tangerine); border-color: var(--tangerine); color: var(--ink); }
  .live-chip.is-live i { background: var(--ink); animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .4; } }

  /* ---------- bottom tab bar ---------- */
  .tabbar { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 24px; background: rgba(17,17,16,.82); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 40px rgba(0,0,0,.35); transition: transform .4s cubic-bezier(.65,0,.35,1); }
  .tabbar.is-hidden { transform: translateY(calc(100% + 24px)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 4px; padding: 8px 0; background: none; border: 0; color: #a9a8a2; font: 600 .66rem/1 var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"] { color: #fff; }
  .tabbar a[aria-current="page"] svg { color: var(--teal); }
  .tabbar a:active, .tabbar button:active { transform: scale(.88); }
  .tabbar .tab-give { margin-top: -26px; }
  .tabbar .tab-give span.bubble { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--tangerine); color: var(--ink); box-shadow: 0 8px 24px rgba(247,134,42,.45), 0 0 0 5px rgba(17,17,16,.82); }
  .tabbar .tab-give { color: #fff; }

  /* ---------- bottom sheet ---------- */
  .sheet-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 88svh; overflow-y: auto; background: var(--ink); color: #fff; border-radius: 24px 24px 0 0; padding: 10px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateY(105%); transition: transform .45s cubic-bezier(.2,.9,.2,1); overscroll-behavior: contain; }
  .sheet-open .sheet { transform: translateY(0); }
  .sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }
  .sheet-handle { width: 44px; height: 5px; border-radius: 5px; background: #3a3a37; margin: 4px auto 18px; }
  .sheet-links { display: grid; }
  .sheet-links a { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border-bottom: 1px solid #2a2a28; font: 800 1.7rem/1 var(--display); font-stretch: 112%; letter-spacing: -.02em; text-transform: lowercase; text-decoration: none; }
  .sheet-links a::after { content: "→"; font-size: 1.1rem; color: var(--tangerine); }
  .sheet-links a[aria-current="page"] { color: var(--teal); }
  .sheet-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
  .sheet-actions a { display: grid; justify-items: center; gap: 8px; padding: 16px 6px; border-radius: 16px; background: #1d1d1b; text-decoration: none; font: 600 .78rem/1 var(--body); }
  .sheet-actions svg { width: 24px; height: 24px; color: var(--tangerine); }
  .sheet-social { display: flex; justify-content: center; gap: 22px; margin-top: 22px; font-size: .85rem; color: #a9a8a2; }
  .sheet-social a { text-decoration: none; }
  .sheet-open { overflow: hidden; }
}

/* prayer + gospel pages on phones */
@media (max-width: 760px) {
  .hero--photo { min-height: calc(92svh - 58px); }
  .hero--photo .wrap { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 28px); }
  .hero.hero--photo .btns { grid-template-columns: 1fr; }
  .hero--photo .btns .btn { justify-content: center; }
  .pray-card { font-size: 1.1rem; margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .pray-card .btns { display: grid; }
  .pray-card .btn, .form .btn { justify-content: center; justify-self: stretch; }
  .steps.snap .path { min-height: 260px; align-content: start; }
  .gospel { min-height: calc(100svh - 58px); }
  .gospel-top { position: static; padding-top: 16px; }
  .g-q { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .g-opt { padding: 17px 16px; font-size: 1.02rem; }
  .g-intro .btns { display: grid; }
  .g-intro .btn { justify-content: center; }
}

/* gospel guide on phones */
@media (max-width: 760px) {
  .g-body { font-size: 1.02rem; }
  .g-pray { margin-inline: calc(var(--gutter) * -1); }
  .g-nav { margin-top: 32px; padding-top: 18px; border-top: 1px solid #2a2a28; }
  .g-nav .btn { flex: 1; justify-content: center; }
  .g-nav :only-child.btn { margin-left: 0; }
}
@media (max-width: 760px) {
  .tabbar .tab-giving { color: var(--teal); }
  .footer-btns .btn { flex: 1 1 auto; }
}
