/* CoMission Beacon — matches the CoMission Beta app UI */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #FDFCF8;
  --surface: #F8F2E4;
  --surface-subtle: #E7DCC2;
  --text: #2E2114;
  --dim: #6E5B44;
  --border: #D8CBB2;
  --navy: #2E2114;
  --navy-strong: #1F160C;
  --accent: #D9A13B;
  --clay: #A34A28;
  --terracotta: #A34A28;
  --glow: #D9A13B;
  --good: #51563E;
  --deep-olive: #373A2A;
  --radius: 12px;
  font-family: 'Avenir Next', Avenir, 'Century Gothic', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
img { max-width: 100%; }

.page-intro {
  position: fixed; inset: 0; z-index: 200;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  animation: introOut .8s ease 3.2s forwards;
  pointer-events: none;
}
.page-intro img { width: clamp(120px, 22vw, 200px); height: auto; animation: introFlame 1.1s ease forwards; }
.page-intro p {
  font-family: "Josefin Sans", sans-serif; font-size: clamp(28px, 5vw, 44px); font-weight: 700;
  letter-spacing: -.02em; color: #2E2114; margin: 0;
  animation: introText 1.1s ease forwards;
}
@keyframes introFlame { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes introText { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }

/* UI Layer — separate fixed layer for nav bars, isolated from content */
.ui-layer {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
}
.ui-layer .app-menu-bar { margin: 0 auto; width: calc(100% - 24px); max-width: 600px; }
.ui-layer > * { pointer-events: auto; }

/* Header — in the UI layer, top of the layer */
.site-header {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: linear-gradient(135deg, #51563E 0%, #373A2A 100%);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 0; border-radius: 0;
  box-shadow: 0 6px 20px rgba(46, 33, 20, .25);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Josefin Sans", sans-serif; font-size: 25.5px; font-weight: 700;
  color: #F8F2E4; text-decoration: none; letter-spacing: -.02em; line-height: 1;
}
.wordmark img { width: auto; height: 54px; object-fit: contain; image-rendering: -webkit-optimize-contrast; }
.wordmark span { transform: translateY(0.1em); }
.wordmark { transition: opacity .2s; }
.wordmark:hover { opacity: .75; }

/* Hamburger menu toggle */
.menu-toggle {
  width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(248, 242, 228, .35); background: rgba(248, 242, 228, .12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0;
}
.menu-toggle { transition: background .2s, border-color .2s; }
.menu-toggle:hover { background: rgba(248, 242, 228, .22); border-color: #F8F2E4; }
.menu-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: #F8F2E4; transition: transform .25s, opacity .25s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu drawer — separate tile on the UI layer, just below the header, right side */
.menu-drawer {
  position: absolute !important; top: 84px !important; right: 12px !important; left: auto !important; z-index: 5;
  width: 280px !important; max-width: calc(100vw - 24px);
  max-height: 0; overflow: hidden; transition: max-height .35s ease, opacity .3s;
  opacity: 0;
  background: rgba(255, 253, 248, 0.96);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 0; border-radius: 24px;
  box-shadow: 0 12px 32px rgba(46, 33, 20, .16);
  pointer-events: none;
}
.menu-drawer.open {
  max-height: 400px; opacity: 1; pointer-events: auto;
}
.menu-drawer nav {
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.menu-drawer-item {
  display: block; padding: 14px 18px; border-radius: 16px; text-decoration: none;
  border: 1px solid transparent; transition: background .2s, border-color .2s;
  background: var(--surface);
}
.menu-drawer-item:hover { background: var(--surface-subtle); border-color: var(--border); }
.menu-drawer-item strong {
  display: block; font-family: "Josefin Sans", sans-serif; font-size: 17px;
  color: var(--navy); letter-spacing: -.01em;
}
.menu-drawer-item small { display: block; font-size: 13px; color: var(--dim); margin-top: 2px; }
.menu-scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(30, 35, 32, .35);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.menu-scrim.visible { opacity: 1; visibility: visible; }

/* Home sections — match Beta app */
.simple-hero, .home-statement, .home-opportunity {
  padding: 64px 22px; display: grid; justify-items: center; text-align: center;
}
.simple-hero {
  min-height: 92vh; place-content: center;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
}
.simple-hero h1, .home-statement h2, .home-opportunity h2 {
  font-family: "Josefin Sans", sans-serif; letter-spacing: -.035em; line-height: 1.32;
  margin: 4px 0 16px; color: var(--navy);
}
.simple-hero h1 { font-size: clamp(44px, 10vw, 78px); max-width: 840px; }
.home-statement h2, .home-opportunity h2 { font-size: clamp(30px, 5vw, 46px); max-width: 720px; }
.simple-hero > p:last-child, .home-statement > p:not(.eyebrow), .home-opportunity > p:not(.eyebrow) {
  max-width: 660px; margin: 0; color: var(--dim); font-size: clamp(15px, 2vw, 19px); line-height: 1.7;
}
.home-opportunity { border-top: 1px solid var(--border); }
.home-statement { background: var(--surface); }

.eyebrow {
  font-size: 12px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase;
  color: var(--clay); margin: 0 0 16px;
}
.home-welcome-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-family: "Josefin Sans", sans-serif; font-size: 24px; font-weight: 700; color: var(--navy);
}
.home-welcome-brand img { width: 52px; height: 47px; object-fit: contain; }

/* Scroll reveal */
[data-home-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-home-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-home-reveal] { opacity: 1; transform: none; transition: none; } }

/* Tile advance arrows */
.home-tile-advance {
  margin-top: 28px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: var(--clay);
  transition: transform .2s, background .2s;
}
.home-tile-advance:hover { transform: translateY(3px); background: var(--surface-subtle); }

/* Buttons */
.primary-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--clay); color: #fff; border: 0; border-radius: 28px;
  padding: 14px 28px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .2s;
}
.primary-button:hover { background: var(--accent); }
.text-link-button {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--clay); font-size: 15px; font-weight: 700; text-decoration: none;
  transition: color .2s;
}
.text-link-button:hover { color: var(--deep-olive); text-decoration: underline; }

/* Cards — fit like Beta app tiles */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  max-width: 1000px; width: 100%; margin-top: 32px;
}
.cards article {
  padding: 30px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); text-align: left;
  box-shadow: 0 12px 32px rgba(46, 33, 20, .08);
  display: flex; flex-direction: column; min-width: 0;
}
.card-number { color: var(--clay); font-size: 12px; letter-spacing: .12em; font-weight: 700; }
.cards h3 {
  font-family: "Josefin Sans", sans-serif; font-size: 23px; letter-spacing: -.025em;
  margin: 14px 0 10px; color: var(--navy);
}
.cards p { color: var(--dim); font-size: 15px; margin: 0; }

/* Belief pages (mission / vision / story) */
.belief-page, .story-page { background: var(--bg); }
.belief-hero, .story-hero {
  padding: 80px 22px 60px; display: grid; justify-items: center; text-align: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
}
.belief-hero h1, .story-hero h1 {
  font-family: "Josefin Sans", sans-serif; font-size: clamp(36px, 7vw, 58px);
  letter-spacing: -.03em; line-height: 1.35; color: var(--navy); max-width: 800px; margin: 4px 0 16px;
}
.belief-hero > div > p:last-child, .story-hero > div > p:last-child {
  max-width: 640px; color: var(--dim); font-size: 18px; line-height: 1.7; margin: 0;
}
.belief-body, .story-chapters { max-width: 860px; margin: 0 auto; padding: 56px 22px; text-align: center; }
.belief-body p { text-align: center; }
.belief-principles article { text-align: center; }
.belief-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.belief-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 40px 0; }
.belief-principles article {
  padding: 28px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  box-shadow: 0 12px 32px rgba(46, 33, 20, .08);
}
.belief-principles h3 {
  font-family: "Josefin Sans", sans-serif; color: var(--navy); font-size: 19px; margin: 12px 0 8px;
}
.belief-principles p { color: var(--dim); font-size: 14px; margin: 0; }
.belief-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.story-chapter { display: grid; grid-template-columns: 72px 1fr; gap: 20px; margin-bottom: 48px; }
.story-number {
  font-family: "Josefin Sans", sans-serif; font-size: 40px; font-weight: 700; color: var(--accent);
}
.story-chapter h2 {
  font-family: "Josefin Sans", sans-serif; color: var(--navy); font-size: 28px;
  letter-spacing: -.02em; margin: 0 0 12px;
}
.story-chapter p { color: var(--dim); line-height: 1.75; margin: 0 0 14px; }
.story-promise {
  text-align: center; padding: 64px 22px;
  background: var(--navy); color: #fff;
}
.story-promise blockquote {
  font-family: "Josefin Sans", sans-serif; font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 16px; color: #fff; letter-spacing: -.02em;
}
.story-promise p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto; }

/* Footer — centered like the Beta app */
.site-footer {
  padding: 36px 22px; border-top: 1px solid #454b38;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  max-width: none; margin: 0;
  background: linear-gradient(160deg, #2b3325 0%, #373A2A 60%, #242b1f 100%);
  border-radius: 0;
}
.site-footer .wordmark { font-size: 18px; color: #F8F2E4; }
.site-footer p { font-size: 13px; color: #D8CBB2; margin: 0; }
.footer-nav { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { padding: 8px 12px; font-size: 13px; font-weight: 600; color: #D8CBB2; text-decoration: none; border-radius: 16px; transition: color .2s, background .2s; }
.footer-nav a:hover { color: #F8F2E4; background: rgba(248, 242, 228, .12); }

/* App tiles — full phone screen, stacked on desktop (no side-by-side), soft edges, clean */
.app-tile {
  min-height: 100vh; min-height: 100svh;
  padding: 64px 22px 96px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  border: 0;
  scroll-margin-top: 70px;
  border-radius: 28px; margin: 12px;
  box-shadow: 0 8px 24px rgba(46, 33, 20, .06);
  position: relative; overflow: hidden;
  background: var(--bg);
}
.app-tile:first-of-type {
  border: 0;
  margin: 12px 12px 12px; border-radius: 28px;
  min-height: calc(100vh - 24px); min-height: calc(100svh - 24px);
  padding-top: 96px;
}
.app-tile:nth-of-type(even):not(#home) { background: var(--surface); }
.app-tile h1, .app-tile h2 {
  font-family: "Josefin Sans", sans-serif; letter-spacing: -.035em; line-height: 1.32;
  margin: 4px 0 16px; color: var(--navy); max-width: 800px;
}
.app-tile h1 { font-size: clamp(44px, 10vw, 78px); }
.app-tile h2 { font-size: clamp(30px, 5vw, 46px); }
.app-tile > p:not(.eyebrow):not(.tile-note) {
  max-width: 660px; margin: 0 0 16px; color: var(--dim);
  font-size: clamp(15px, 2vw, 19px); line-height: 1.7;
}
.tile-subhead {
  font-family: "Josefin Sans", sans-serif; font-size: clamp(24px, 4vw, 34px);
  color: var(--navy); margin: 48px 0 16px !important; letter-spacing: -.02em;
}
.tile-note {
  max-width: 640px; margin: 32px 0 0 !important; padding: 16px 20px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 12px; font-size: 14px !important; color: var(--navy) !important;
  font-style: italic;
}

/* Feature lists — stacked, never side-by-side */
.feature-list {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 720px; width: 100%; margin: 32px 0 0; text-align: left;
}
.feature {
  padding: 24px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); box-shadow: 0 8px 24px rgba(46, 33, 20, .06);
  scroll-margin-top: 140px;
}
.app-tile:nth-of-type(even) .feature { background: var(--bg); }
.feature h3 {
  font-family: "Josefin Sans", sans-serif; font-size: 20px; letter-spacing: -.02em;
  margin: 0 0 10px; color: var(--navy);
}
.feature p { color: var(--dim); font-size: 15px; margin: 0; line-height: 1.65; }
.feature p + p { margin-top: 12px; }

/* Search demo */
.search-demo { margin-top: 16px; }
.search-demo input[type="search"] {
  width: 100%; padding: 14px 18px; border: 1px solid var(--border); border-radius: 24px;
  font-size: 15px; background: var(--surface); color: var(--text);
}
.search-demo input[type="search"]:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.search-hint { font-size: 13px !important; color: var(--dim); margin-top: 10px !important; font-style: italic; }
.search-results {
  margin-top: 12px; max-height: 280px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.search-results:empty { display: none; }
.search-result {
  padding: 12px 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; display: block;
}
.search-result:hover { background: var(--surface-subtle); }
.search-result strong {
  display: block; font-family: "Josefin Sans", sans-serif; font-size: 15px; color: var(--navy);
}
.search-result small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }

/* Mission — dark navy band */
#mission.app-tile {
  background: linear-gradient(160deg, #2b3325 0%, #373A2A 55%, #242b1f 100%);
  border-color: #454b38;
}
#mission.app-tile h2 { color: #F8F2E4; }
#mission.app-tile p { color: #F8F2E4; }
#mission.app-tile .eyebrow { color: #D9A13B; }
#mission.app-tile .text-link-button { color: #D9A13B; }
#mission.app-tile .text-link-button:hover { color: #e8bd6a; }
#mission.app-tile .home-tile-advance { color: #F8F2E4; border-color: rgba(248, 242, 228, .35); }
#mission.app-tile h2::after { background: #D9A13B; }

/* Cru-like whitespace — more air between tiles */
.app-tile { margin: 28px 12px; }

/* Who + Problem: same tile color, different accents */
#who.app-tile, #problem.app-tile {
  background: var(--surface);
  border-color: var(--border);
}
#who.app-tile h2::after { background: #D9A13B; }
#problem.app-tile h2::after { background: #51563E; }
#problem.app-tile .eyebrow { color: #51563E; }
/* Problem inner tiles in bark */
#problem .feature {
  background: #6E5B44; border-color: #5d4d39;
}
#problem .feature h3 { color: #F8F2E4; }
#problem .feature p { color: rgba(248, 242, 228, .85); }

/* Thin accent underline on tile headings — ties the tiles together */
.app-tile h2::after {
  content: ""; display: block; width: 52px; height: 3px; border-radius: 3px;
  background: var(--accent); margin: 18px auto 0;
}
#hope.app-tile h2::after { background: #D9A13B; }
#prayer.app-tile h2::after { background: #A34A28; }
#mission.app-tile h2::after { background: #D9A13B; }

/* Great Commission overlay — marigold, overlapping tiles above and below */
.commission-overlay {
  position: relative; z-index: 2;
  max-width: 900px; margin: -40px auto 24px; padding: 48px 40px;
  background: radial-gradient(ellipse at center, #eec27a 0%, #D9A13B 55%, #b57f28 100%);
  border-radius: 24px; text-align: center;
  box-shadow: 0 18px 44px rgba(46, 33, 20, .28);
}
.commission-overlay p {
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(22px, 3.4vw, 34px); line-height: 1.5; letter-spacing: -.01em;
  color: #2E2114; margin: 0 0 12px;
}
.commission-overlay p strong { color: #A34A28; font-weight: 700; }
.commission-overlay cite {
  font-size: 14px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(46, 33, 20, .7); font-style: normal;
}

/* Join tile: band above, bark-muted title */
#join.app-tile { position: relative; }
#join.app-tile::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 6px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #D9A13B, #A34A28, #51563E);
}
#join.app-tile h2 { color: #6E5B44; }

/* Search — embedded experience, no tile chrome, video with soft edges */
.search-embed {
  background: transparent; border: 0; box-shadow: none;
  padding-left: 0; padding-right: 0;
  text-align: center;
}
.search-embed .eyebrow, .search-embed h2, .search-embed p { text-align: center; }
.search-embed h2::after { left: 50%; transform: translateX(-50%); }
.search-embed p { max-width: 640px; margin-left: auto; margin-right: auto; }
.search-video {
  display: block; width: 100%; max-width: 460px; max-height: 78vh; height: auto;
  margin: 28px auto 8px; border-radius: 24px; object-fit: cover;
  box-shadow: 0 18px 44px rgba(46, 33, 20, .22);
  background: #000;
}
.search-embed .home-tile-advance { margin: 20px auto 0; }

/* Search — full width, only as tall as its text */
#search.app-tile {
  min-height: 0 !important; padding-top: 48px; padding-bottom: 48px;
  justify-content: flex-start;
}
/* Join — only as tall as its text */
#join.app-tile {
  min-height: 0 !important; padding-top: 48px; padding-bottom: 48px;
  width: fit-content; max-width: calc(100% - 24px);
  margin-left: auto; margin-right: auto;
  justify-content: flex-start;
}
#search.app-tile h2, #join.app-tile h2 { margin-bottom: 12px; }
#search.app-tile p, #join.app-tile p { margin-bottom: 12px; }

/* Desktop: paired tiles side by side, evenly separated */
@media (min-width: 900px) {
  .tile-pair {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
    max-width: 1400px; margin: 28px auto; padding: 0 24px;
    align-items: stretch;
  }
  .tile-pair .app-tile {
    margin: 0; min-height: 0; padding: 56px 36px;
    justify-content: flex-start;
  }
}

/* Hope — green backlighting from the Beta */
#hope.app-tile {
  background: linear-gradient(135deg, #51563E 0%, #373A2A 100%);
  border-color: #454b38;
}
#hope.app-tile h2 { color: #F8F2E4; }
#hope.app-tile p { color: #F8F2E4; }
#hope.app-tile .eyebrow { color: #D9A13B; }
#hope.app-tile h2::after { background: #D9A13B; }
#hope.app-tile .feature {
  background: rgba(248, 242, 228, .1); border-color: rgba(248, 242, 228, .25);
}
#hope.app-tile .feature h3 { color: #D9A13B; }
#hope.app-tile .feature p { color: rgba(248, 242, 228, .85); }
#hope.app-tile .home-tile-advance { color: #F8F2E4; border-color: rgba(248, 242, 228, .4); background: transparent; }
#hope.app-tile .home-tile-advance:hover { background: rgba(248, 242, 228, .12); }
#hope .eyebrow { color: #A34A28; }
#hope .feature { background: rgba(248, 242, 228, 0.7); border-color: #ddc491; }
#hope .feature h3 { color: #8a6a1f; }

/* Prayer — purple backlighting from the Beta */
#prayer.app-tile {
  background: linear-gradient(135deg, #e4dee2 0%, #f1edf0 50%, #e7e1e5 100%);
  border-color: #c4b6c1;
}
#prayer .eyebrow { color: #A34A28; }
#prayer .feature { background: rgba(255, 255, 255, 0.7); border-color: #c4b6c1; }
#prayer .feature h3 { color: var(--clay); }

/* Roles tabs */
.roles-tabs {
  display: flex; gap: 8px; margin: 20px 0 16px; padding: 6px;
  background: var(--surface-subtle); border-radius: 16px;
}
.role-tab {
  flex: 1 1 0; min-width: 0; padding: 12px 8px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: "Josefin Sans", sans-serif; font-size: 14px; font-weight: 600;
  color: var(--dim); background: transparent; transition: all .2s;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; line-height: 1.2; white-space: normal;
}
.role-tab[aria-selected="true"], .role-tab.is-active {
  background: var(--clay); color: #fff;
  box-shadow: 0 4px 14px rgba(46, 33, 20, .3);
}
.role-tab:hover { background: var(--clay); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(46, 33, 20, .25); }
.role-tab.is-active:hover { background: var(--accent); color: #fff; }
.roles-panel { min-height: 200px; width: 100%; max-width: 860px; }
.role-content { display: none; text-align: center; }
.role-content.is-active { display: block; animation: roleFade .35s ease; }
.role-content .tile-note { text-align: center; margin-left: auto !important; margin-right: auto !important; }
@keyframes roleFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .role-content.is-active { animation: none; }
}
.role-content h3 {
  font-family: "Josefin Sans", sans-serif; font-size: 20px; color: var(--navy); margin: 0 0 8px;
  text-align: center;
}
.role-tiles { display: grid; gap: 14px; margin: 28px 0 8px; }
.role-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 20px 16px; border-radius: 16px;
  border: 1px solid var(--border);
}
.role-tile > div { width: 100%; padding: 0 72px; box-sizing: border-box; }
.role-tile strong {
  display: block; font-family: "Josefin Sans", sans-serif; font-size: 16px; color: var(--navy);
}
.role-tile p { margin: 4px 0 0; font-size: 14px; color: var(--dim); }
.role-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
}
.role-icon svg { width: 24px; height: 24px; }
/* Access dots */
.dot { display: inline-block; width: 15px; height: 15px; border-radius: 50%; vertical-align: middle; }
.dot.full { background: #D9A13B; box-shadow: 0 0 8px rgba(217, 161, 59, .5); }
.dot.half { background: linear-gradient(90deg, #A34A28 50%, transparent 50%); border: 2px solid #A34A28; width: 11px; height: 11px; }
.dot.none { border: 2px solid var(--border); background: transparent; width: 11px; height: 11px; }
.access-key {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  margin: 20px 0 12px; font-size: 13px; font-weight: 600; color: var(--dim);
}
.access-key .dot { margin-right: 6px; }
.access-table th:nth-child(2) { color: #8a6a1f; }
.access-table th:nth-child(3) { color: #A34A28; }
.access-table th:nth-child(4) { color: #51563E; }
.access-table td:nth-child(2) .dot.full { background: #D9A13B; }
.access-table td:nth-child(3) .dot.full { background: #A34A28; box-shadow: 0 0 8px rgba(163, 74, 40, .5); }
.access-table td:nth-child(4) .dot.full { background: #51563E; box-shadow: 0 0 8px rgba(81, 86, 62, .5); }

@media (max-width: 560px) {
  .access-table { font-size: 12px; }
  .access-table th, .access-table td { padding: 8px 6px; }
  .access-table th:first-child, .access-table td:first-child { text-align: left; }
  .access-table-wrap { overflow-x: visible; }
  .dot { width: 12px; height: 12px; }
  .dot.half, .dot.none { width: 9px; height: 9px; }
}

/* Beta backlit colors */
.role-donor .role-tile { background: #D9A13B; border-color: #c08c2e; }
.role-donor .role-tile h3, .role-donor .role-tile p { color: #2E2114; }
.role-donor .role-icon { background: #2E2114; color: #D9A13B; }
.role-director .role-tile { background: #A34A28; border-color: #8a3d22; }
.role-director .role-tile h3, .role-director .role-tile p { color: #F8F2E4; }
.role-director .role-icon { background: #F8F2E4; color: #A34A28; }
.role-missionary .role-tile { background: #51563E; border-color: #43482f; }
.role-missionary .role-tile h3, .role-missionary .role-tile p { color: #F8F2E4; }
.role-missionary .role-icon { background: #F8F2E4; color: #51563E; }

/* Story flow — connected narrative like the PDF, not separate tiles */
.story-lead {
  max-width: 680px; margin: 0 0 8px !important;
  font-size: clamp(16px, 2vw, 19px) !important; line-height: 1.7;
}
.story-flow {
  max-width: 720px; width: 100%; margin: 24px 0 0; text-align: left;
  position: relative; padding-left: 8px;
}
.story-flow::before {
  content: ""; position: absolute; left: 31px; top: 12px; bottom: 12px; width: 2px;
  background: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 2px;
}
.story-step {
  position: relative; display: flex; gap: 20px; padding: 18px 0;
  align-items: flex-start;
}
.story-step + .story-step { border-top: 1px dashed color-mix(in srgb, var(--accent) 25%, var(--border)); }
.story-number, .story-symbol {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border: 2px solid var(--accent);
  font-family: "Josefin Sans", sans-serif; font-size: 20px; font-weight: 700; color: var(--navy);
}
.app-tile:nth-of-type(even) .story-number, .app-tile:nth-of-type(even) .story-symbol { background: var(--bg); }
.story-step h3 {
  font-family: "Josefin Sans", sans-serif; font-size: 19px; letter-spacing: -.02em;
  margin: 6px 0 8px; color: var(--navy);
}
.story-step p { color: var(--dim); font-size: 15px; margin: 0; line-height: 1.65; }

/* Video tile */
.video-tile {
  max-width: 720px; width: 100%; margin: 40px 0 0; padding: 28px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--navy);
  color: #fff; text-align: center;
}
.video-tile h3 {
  font-family: "Josefin Sans", sans-serif; font-size: 24px; margin: 0 0 8px; color: #fff;
}
.video-tile > p { color: rgba(255,255,255,.75) !important; font-size: 15px !important; margin: 0 0 20px !important; }
/* The CoMission Experience box — fired clay */
#experience .video-tile { background: #A34A28; border-color: #8a3d22; }
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px;
  background: #000; border: 1px solid rgba(255,255,255,.15);
  overflow: hidden;
}
.video-embed video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000; display: block;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { color: rgba(255,255,255,.6) !important; font-size: 14px !important; padding: 20px; margin: 0 !important; }

/* Feature access table */
.access-table-wrap { max-width: 860px; width: 100%; margin: 32px 0 0; overflow-x: auto; }
.access-table {
  width: 100%; border-collapse: collapse; font-size: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.access-table th, .access-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.access-table thead th {
  background: #D8CBB2;
}
.access-table th {
  font-family: "Josefin Sans", sans-serif; background: var(--navy); color: #fff;
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
}
.access-table tr:last-child td { border-bottom: 0; }
.access-table td:not(:first-child) { text-align: center; }
.access-table td:first-child { font-weight: 600; color: var(--navy); }

/* CTA tabs — never "donate to us" */
.cta-tabs {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin: 32px 0 0; max-width: 720px; width: 100%;
}
.cta-tab {
  flex: 1 1 180px; padding: 16px 24px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  font-family: "Josefin Sans", sans-serif; font-size: 17px; font-weight: 700; color: var(--navy);
  transition: background .2s, transform .15s;
}
.cta-tab:hover { background: var(--surface-subtle); transform: translateY(-2px); }
.cta-tab[aria-selected="true"] { background: var(--clay); color: #fff; border-color: var(--clay); }
.cta-panel {
  max-width: 720px; width: 100%; margin: 20px 0 0; padding: 28px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  min-height: 120px; display: grid; place-items: center;
}
.cta-panel p { margin: 0; color: var(--dim); font-size: 16px; line-height: 1.6; }
.cta-panel .cta-action {
  display: inline-block; margin-top: 16px; padding: 12px 28px; border-radius: 24px;
  background: var(--clay); color: #fff; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 700;
}
.cta-panel .cta-action:hover { background: color-mix(in srgb, var(--clay) 85%, #000); }
.cta-hint { font-style: italic; }
.cta-coming-soon {
  font-family: "Josefin Sans", sans-serif; font-size: 22px; color: var(--navy);
  font-weight: 700;
}

/* Bottom menu bar — in the UI layer, bottom of the layer */
.app-menu-bar {
  position: relative;
  display: flex; align-items: stretch; justify-content: space-around;
  padding: 10px; margin: 0 auto;
  width: 100%; max-width: 600px;
  background: rgba(255, 253, 248, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 0; border-radius: 28px;
  box-shadow: 0 14px 35px rgba(46, 33, 20, .16);
}
.menu-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; text-decoration: none; color: var(--dim);
  font-size: 11px; font-weight: 600; letter-spacing: .02em; border-radius: 18px;
  transition: color .2s, background .2s;
}
.menu-item svg { width: 24px; height: 24px; fill: currentColor; }
.menu-item:hover { color: var(--navy); background: var(--surface-subtle); }
.menu-item.active { color: var(--navy); }
/* Per-section accent on hover + active */
.menu-item[href="#home"]:hover, .menu-item[href="#home"].active {
  color: #8a6a1f; background: color-mix(in srgb, #D9A13B 18%, var(--surface)); }
.menu-item[href="#search"]:hover, .menu-item[href="#search"].active {
  color: #8a6a1f; background: color-mix(in srgb, #D9A13B 18%, var(--surface)); }
.menu-item[href="#hope"]:hover, .menu-item[href="#hope"].active {
  color: #8a6a1f; background: color-mix(in srgb, #D9A13B 18%, var(--surface)); }
.menu-item[href="#prayer"]:hover, .menu-item[href="#prayer"].active {
  color: #A34A28; background: color-mix(in srgb, #A34A28 14%, var(--surface)); }
.menu-item[href="#think-tanks"]:hover, .menu-item[href="#think-tanks"].active {
  color: #51563E; background: color-mix(in srgb, #51563E 14%, var(--surface)); }

/* Make room for the sticky menu bar */
.site-footer { margin-bottom: 0; padding-bottom: calc(64px + 96px); }

@media (max-width: 760px) {
  .app-tile { padding: 48px 18px 96px; }
  .menu-item span { font-size: 10px; }
  .menu-item svg { width: 22px; height: 22px; }
}

/* Reference profile page */
.profile-brand {
  display: flex; align-items: center; gap: 20px; margin: 24px 0;
  text-align: left;
}
.profile-brand img { width: 88px; height: 79px; object-fit: contain; flex-shrink: 0; }
.profile-brand h1 { margin: 0 !important; font-size: clamp(36px, 7vw, 54px) !important; }
.profile-tagline { color: var(--dim); font-size: 16px; margin: 4px 0 0 !important; }
.profile-verified {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--good) 15%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border));
  color: var(--good); font-size: 13px !important; font-weight: 700; margin: 0 0 20px !important;
}
.profile-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  max-width: 560px; width: 100%; margin: 28px 0 0; text-align: left;
}
.profile-meta div {
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.profile-meta strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 4px; }
.profile-meta span { font-size: 15px; color: var(--navy); font-weight: 600; }
@media (max-width: 560px) { .profile-meta { grid-template-columns: 1fr; } }

/* Subtle cross backlight — like the Beta app, present if you look */
body::before {
  content: ""; position: fixed; z-index: 0; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.9) 0 18%, rgba(250,246,238,.5) 38%, transparent 70%),
    transparent;
}
/* Cross backlight removed per brand direction */
main, .site-header, .app-menu-bar, .menu-drawer, .site-footer { position: relative; z-index: 1; }

/* Hero — first tile: warm gradient, thin top kicker, bold centered headlines */
.hero-tile {
  justify-content: flex-start;
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse at center, #FBF7EC 0%, #F4ECD6 50%, #E9DCBB 100%);
}
.hero-kicker {
  font-size: 13px; font-weight: 400; letter-spacing: .28em; text-transform: lowercase;
  color: var(--dim); margin: 0 !important; text-align: center;
  position: absolute; top: 88px; left: 0; right: 0;
  padding-left: .28em; box-sizing: border-box;
}
.hero-center {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  width: 100%;
}
.hero-center h1 {
  font-family: "Josefin Sans", sans-serif; font-weight: 700;
  font-size: clamp(40px, 9vw, 72px); letter-spacing: -.03em; line-height: 1.35;
  color: var(--navy); margin: 0 0 20px;
}
.hero-center > p {
  max-width: 620px; margin: 0; color: var(--dim);
  font-size: clamp(15px, 2vw, 18px); line-height: 1.7;
}
.hero-tile .home-tile-advance { margin-top: 32px; }
.hero-line { display: inline-block; }
@media (max-width: 480px) {
  .hero-line { white-space: normal; }
}
@media (min-width: 481px) {
  .hero-line { white-space: nowrap; }
}

/* Utilities */
.wrap { width: min(1160px, calc(100% - 44px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 200; top: 8px; left: 16px; padding: 10px 16px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 760px) {
  .cards, .belief-principles { grid-template-columns: 1fr; }
  .story-chapter { grid-template-columns: 1fr; gap: 8px; }
  .site-nav { display: none; }
  .simple-hero, .home-statement, .home-opportunity { padding: 48px 18px; }
}

/* Profile walkthrough — mirrors the Beta donor profile */
.profile-walk-card {
  margin-top: 20px; padding: 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
}
.profile-walk-head { display: flex; align-items: center; gap: 14px; }
.profile-avatar {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
  font-family: "Josefin Sans", sans-serif; font-size: 22px; font-weight: 700;
}
.profile-walk-head strong { display: block; font-size: 17px; color: var(--navy); }
.profile-walk-head small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.profile-pill {
  margin-left: auto; padding: 8px 16px; border-radius: 20px;
  background: var(--clay); color: #fff; font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.profile-updates { margin: 16px 0 0; font-size: 14px; color: var(--dim); }
.profile-updates strong { color: var(--navy); }
.profile-walk-list { display: grid; gap: 8px; margin: 16px 0; }
.profile-walk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
.profile-walk-row strong { display: block; font-size: 15px; color: var(--navy); }
.profile-walk-row p { margin: 2px 0 0; font-size: 13px; color: var(--dim); }
.profile-walk-row span {
  flex-shrink: 0; padding: 6px 12px; border-radius: 12px;
  background: var(--surface-subtle); font-size: 12px; font-weight: 600; color: var(--dim);
}
.profile-walk-invite { margin-top: 16px; }

/* Phone video tiles — full phone visible, looping */
.phone-video-tile {
  margin: 20px auto 0; max-width: 320px;
  border-radius: 24px; overflow: hidden;
}
.phone-video-tile video {
  width: 100%; height: auto; display: block;
  border-radius: 24px;
}
