/* ===================================================================
   Trinity — marketing site
   Theme mirrors the app's AppTheme (gold palette) + AppTypography
   (serif display + system sans). Light theme.
   =================================================================== */

:root {
  /* Colors (from AppTheme.light / GoldPalette) */
  --bg: #f9f9f4;
  --bg-alt: #f3f2ea;
  --text: #1a1a19;
  --muted: #6b6b6b;
  --gold: #efb804;        /* Primary Gold (shade500) */
  --gold-dark: #b17d02;   /* shade700 — hover */
  --gold-600: #d99f03;
  --gold-soft: #fef3c7;   /* shade100 */
  --gold-50: #fffbeb;
  --card: #ffffff;
  --border: #e0ded8;

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1140px;
  --container-narrow: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(26, 26, 25, 0.08);
  --shadow-soft: 0 8px 24px rgba(26, 26, 25, 0.06);
  --nav-h: 72px;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }

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

/* ---------- Buttons / badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn--gold { background: var(--gold); color: #1a1a19; box-shadow: 0 6px 16px rgba(239, 184, 4, .28); }
.btn--gold:hover { background: var(--gold-600); transform: translateY(-1px); }
.btn--sm { padding: 9px 18px; font-size: 14px; }

/* App Store badge */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1a1a19;
  color: #fff;
  border-radius: 14px;
  padding: 11px 20px 11px 18px;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-soft);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-badge__icon {
  width: 26px; height: 26px; flex: none;
  background: currentColor;
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268c-.2-37 16.8-65 50.9-86-19-27-48-42-86-45-36-3-76 21-90 21-15 0-49-20-77-19-40 .6-77 23-97 59-42 72-11 178 29 237 20 29 43 61 74 60 30-1 41-19 77-19 36 0 46 19 77 18 32-.5 52-29 71-58 23-33 32-65 33-67-1-.4-63-24-64-96zM260 116c16-20 27-47 24-74-23 1-52 16-69 35-15 17-28 45-25 71 26 2 53-13 70-32z'/%3E%3C/svg%3E");
          mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268c-.2-37 16.8-65 50.9-86-19-27-48-42-86-45-36-3-76 21-90 21-15 0-49-20-77-19-40 .6-77 23-97 59-42 72-11 178 29 237 20 29 43 61 74 60 30-1 41-19 77-19 36 0 46 19 77 18 32-.5 52-29 71-58 23-33 32-65 33-67-1-.4-63-24-64-96zM260 116c16-20 27-47 24-74-23 1-52 16-69 35-15 17-28 45-25 71 26 2 53-13 70-32z'/%3E%3C/svg%3E");
}
.store-badge__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge__text small { font-size: 11px; opacity: .85; }
.store-badge__text strong { font-size: 18px; font-weight: 600; letter-spacing: .2px; }
.store-badge--lg { padding: 14px 26px 14px 22px; }
.store-badge--lg .store-badge__icon { width: 30px; height: 30px; }
.store-badge--lg .store-badge__text strong { font-size: 20px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); }
.brand__logo { height: 40px; width: auto; filter: drop-shadow(0 2px 5px rgba(26, 26, 25, .28)); }
.brand__name { font-size: 26px; font-weight: 700; letter-spacing: .3px; }
.brand--light .brand__name { color: var(--bg); }
.brand--light .brand__logo { height: 36px; filter: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(249, 249, 244, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--text); transition: color .2s ease; }
.nav__links a:hover { color: var(--gold-dark); }
.nav__links .btn--gold:hover { color: #1a1a19; }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (full-screen) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px); padding-bottom: 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("../images/og-image.jpg") center center / cover no-repeat;
  opacity: 1;
}
/* Localized left scrim only — keeps the church (right) fully vivid */
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(249,249,244,.96) 0%, rgba(249,249,244,.88) 30%, rgba(249,249,244,.6) 48%, rgba(249,249,244,.18) 62%, rgba(249,249,244,0) 74%),
    linear-gradient(180deg, rgba(249,249,244,0) 78%, rgba(249,249,244,.55) 100%);
}
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__copy { max-width: 560px; }
.hero__title { font-size: clamp(38px, 6vw, 72px); text-shadow: 0 1px 10px rgba(249,249,244,.7); }
.hero__sub { font-size: clamp(17px, 2vw, 20px); color: #2a2a26; font-weight: 500; margin: 22px 0 28px; max-width: 460px; text-shadow: 0 1px 6px rgba(249,249,244,.9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Scroll-down indicator */
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(26,26,25,.45);
  border-radius: 16px; display: flex; justify-content: center; padding-top: 7px;
}
.hero__scroll span { width: 4px; height: 9px; border-radius: 4px; background: var(--gold-dark); animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(8px); opacity: .3; } }

/* ---------- Showcase — Apple-style sticky scroll ---------- */
/* The section is tall; the inner .scrolly__sticky pins to the viewport while
   the heading (top) and copy (left) crossfade and the screenshot swaps inside
   a phone that stays in place on the right. JS drives the progress. */
.scrolly {
  position: relative;
  background:
    radial-gradient(120% 80% at 80% 0%, var(--gold-50) 0%, rgba(255,251,235,0) 55%),
    var(--bg);
  /* total scroll height: one viewport to settle + one step per extra slide */
  height: calc(100svh + (var(--count) - 1) * 80svh);
}
.scrolly__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.scrolly__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "top    top"
    "copy   device";
  align-items: center;
  width: 100%;
  padding-top: calc(var(--nav-h) + 16px);
  padding-bottom: 40px;
  column-gap: 48px;
}

/* TOP — persistent eyebrow + stacked headings */
.scrolly__top { grid-area: top; text-align: center; margin-bottom: 8px; }
.scrolly__titles {
  position: relative;
  height: clamp(56px, 8vw, 96px); /* reserve room for the tallest heading line */
}
.scrolly__title {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(28px, 4.4vw, 46px);
  opacity: 0;
  will-change: opacity, transform;
}
.scrolly__title[data-i="0"] { opacity: 1; } /* no-JS / first paint */

/* LEFT — stacked copy panels */
.scrolly__copies {
  grid-area: copy;
  position: relative;
  min-height: 240px;
  max-width: 460px;
}
.scrolly__copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0;
  will-change: opacity, transform;
}
.scrolly__copy[data-i="0"] { opacity: 1; }
.scrolly__tag {
  display: inline-block; align-self: flex-start;
  background: var(--gold-soft); color: var(--gold-dark);
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.scrolly__copy p { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); margin: 0; }

/* progress dots — anchored under the stacked copy panels */
.scrolly__dots { position: absolute; left: 0; bottom: 0; display: flex; gap: 10px; }
.scrolly__dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--border);
  transition: background .3s ease, transform .3s ease, width .3s ease;
}
.scrolly__dot.is-active { background: var(--gold); width: 26px; }

/* RIGHT — persistent phone with stacked screenshots */
.scrolly__device { grid-area: device; display: flex; justify-content: center; align-items: center; }
.scrolly__device .phone { width: clamp(210px, 21vw, 255px); }
.scrolly__shots {
  position: absolute; inset: 10px;
  border-radius: 28px; overflow: hidden;
}
.scrolly__shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: opacity, transform;
}
.scrolly__shot[data-i="0"] { opacity: 1; }
/* keep the broken-image placeholder look from .phone img.phone__placeholder */
.scrolly__shot.phone__placeholder { border-radius: 28px; }

/* ---------- Phone mockup ---------- */
.phone {
  width: 260px;
  aspect-ratio: 9 / 19.5;
  background: #1a1a19;
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative;
}
.phone::before { /* notch */
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 22px; background: #1a1a19; border-radius: 0 0 14px 14px; z-index: 4;
}
.phone img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--gold-soft), #fff);
}
/* branded fallback when screenshot is missing */
.phone img.phone__placeholder {
  display: flex;
  background: linear-gradient(160deg, var(--gold-soft) 0%, #fff 70%);
  border: 1px dashed var(--gold);
  position: relative;
}
.phone img.phone__placeholder::after {
  content: "Screenshot";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 18px; color: var(--gold-dark);
}

/* ---------- Section heads ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: 13px; font-weight: 700;
  color: var(--gold-dark); margin: 0 0 12px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head__sub { color: var(--muted); font-size: 17px; margin: 16px 0 0; }

/* ---------- Verse band ---------- */
.verse-band {
  background: linear-gradient(135deg, var(--gold-50), var(--gold-soft));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 80px 0; text-align: center;
}
.verse-band__cross { color: var(--gold); display: block; width: auto; height: 66px; margin: 0 auto 24px; }
.verse-band__quote {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 40px); font-weight: 600;
  line-height: 1.3; margin: 0 auto; max-width: 760px; color: var(--text);
}
.verse-band__cite { display: block; margin-top: 20px; color: var(--gold-dark); font-weight: 600; letter-spacing: .04em; font-style: normal; }

/* ---------- FAQ ---------- */
.faq { padding: 100px 0; }
.faq__list { display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease;
}
.faq__item.is-open { box-shadow: var(--shadow-soft); border-color: var(--gold); }
.faq__q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--text);
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq__icon { position: relative; width: 18px; height: 18px; flex: none; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; background: var(--gold-dark); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.faq__icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq__icon::after { left: 8px; top: 0; width: 2px; height: 18px; }
.faq__item.is-open .faq__icon::after { transform: scaleY(0); opacity: 0; }
.faq__a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 24px;
}
.faq__item.is-open .faq__a { padding-bottom: 22px; }
.faq__a p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-600) 100%);
  padding: 96px 0; text-align: center;
}
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(30px, 4.4vw, 48px); color: #1a1a19; }
.cta p { color: #2c2400; font-size: 18px; margin: 16px 0 32px; max-width: 520px; }

/* ---------- Footer ---------- */
.footer { background: #1a1a19; color: #cfcdc6; padding: 56px 0 28px; }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__tagline { margin: 12px 0 0; font-size: 15px; color: #8f8d86; max-width: 320px; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { font-size: 15px; color: #cfcdc6; transition: color .2s ease; }
.footer__links a:hover { color: var(--gold); }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid #2e2d2b; }
.footer__bottom p { margin: 0; font-size: 13px; color: #7d7b74; }

/* ===================================================================
   Legal pages (Privacy Policy, Terms) — shared long-form document styles
   =================================================================== */
.legal {
  padding: calc(var(--nav-h) + 64px) 0 96px;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--gold-50) 0%, rgba(255,251,235,0) 55%),
    var(--bg);
}
.legal__head { text-align: center; margin-bottom: 48px; }
.legal__head h1 { font-size: clamp(34px, 5vw, 56px); }
.legal__updated { color: var(--muted); font-size: 15px; margin: 16px 0 0; }
.legal__body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(28px, 5vw, 56px);
}
.legal__intro { font-size: 18px; color: var(--text); margin: 0 0 8px; }
.legal__body h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 40px 0 14px;
  padding-top: 8px;
}
.legal__body h2:first-of-type { margin-top: 8px; }
.legal__body h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}
.legal__body p { color: var(--muted); font-size: 16px; margin: 0 0 16px; }
.legal__body ul { color: var(--muted); font-size: 16px; margin: 0 0 16px; padding-left: 22px; }
.legal__body li { margin-bottom: 8px; }
.legal__body a { color: var(--gold-dark); font-weight: 600; }
.legal__body a:hover { text-decoration: underline; }
.legal__body strong { color: var(--text); }
.legal__toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin: 0 0 36px;
}
.legal__toc h2 {
  margin: 0 0 12px !important;
  font-size: 15px !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--gold-dark);
  padding-top: 0;
}
.legal__toc ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; columns: 2; }
.legal__toc li { margin-bottom: 6px; break-inside: avoid; }
.legal__toc a { color: var(--text); font-weight: 500; }
.legal__toc a:hover { color: var(--gold-dark); }
.legal__placeholder {
  background: var(--gold-soft);
  color: var(--gold-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95em;
}
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (max-width: 560px) {
  .legal__toc ol { columns: 1; }
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 980px) {
  .hero { text-align: center; }
  .hero__copy { margin: 0 auto; }
  .hero__cta { justify-content: center; }
  /* Center scrim so the headline stays readable when centered */
  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(249,249,244,.4) 0%, rgba(249,249,244,.2) 45%, rgba(249,249,244,.55) 100%);
  }
}

@media (max-width: 820px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    box-shadow: var(--shadow-soft);
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav__links a:last-child { border-bottom: none; margin-top: 10px; }
  .nav__links .btn--gold { justify-content: center; }
  .nav__toggle { display: flex; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .faq { padding: 72px 0; }
  .verse-band, .cta { padding: 64px 0; }
  .footer__inner { flex-direction: column; gap: 28px; }
}

/* ---------- Scrolly: stacked fallback on narrow screens ----------
   Scroll-jacking feels awkward on phones, so below 820px the section
   reflows into a normal vertical narrative: device on top, then each
   slide's copy listed in flow. JS skips the scroll effect here. */
@media (max-width: 820px) {
  .scrolly { height: auto; }
  .scrolly__sticky { position: static; height: auto; overflow: visible; }
  .scrolly__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "device" "copy";
    padding: 96px 0 72px;
    row-gap: 32px;
  }
  .scrolly__top { margin-bottom: 0; }
  /* the rotating heading can't map to one screen in a stacked list — the
     eyebrow + each slide's tag carry it instead */
  .scrolly__titles { display: none; }

  .scrolly__device .phone { width: clamp(210px, 64vw, 260px); }
  /* show only the first screenshot in the static device */
  .scrolly__shots { position: absolute; }
  .scrolly__shot { opacity: 0; }
  .scrolly__shot[data-i="0"] { opacity: 1; }

  .scrolly__copies {
    position: static; min-height: 0; max-width: 520px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 28px; text-align: center;
  }
  .scrolly__copy { position: static; opacity: 1; align-items: center; text-align: center; }
  .scrolly__tag { align-self: center; }
  .scrolly__dots { display: none; }
}
