/* Faithful Games landing — matches Scripture Crosswords for Kids palette */
:root {
  --bg: #fff6eb;
  --bg-elevated: #ffffff;
  --bg-subtle: #ffe8cc;
  --fg: #1e293b;
  --fg-muted: #5b6b7c;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --success: #059669;
  --border: #f0d9b8;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 2px 0 rgb(37 99 235 / 0.08), 0 14px 36px rgb(30 41 59 / 0.08);
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }

.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  /* ALWAYS sticky — do not unstick for signed-in */
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 40px;
}
.brand-mark:not(.brand-mark-fallback) {
  background: transparent;
  padding: 0;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.brand-mark-fallback {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
}
.nav-cta:hover { background: var(--primary-dark); }

.hero { padding: 2.5rem 0 3rem; }
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 840px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: #c2410c;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
  color: var(--fg);
}
.hero-lead {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin: 0 0 1.5rem;
  max-width: 36rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff !important;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--primary) !important;
  border-color: var(--border);
}
.hero-note {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin: 0;
}
.hero-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}
.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.section { padding: 2.5rem 0; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 0.4rem;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--fg-muted);
  margin: 0 0 1.75rem;
}

.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 1.25rem 1.15rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.feature h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.feature p { margin: 0; font-size: 0.92rem; color: var(--fg-muted); }

.collections {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 720px) {
  .collections { grid-template-columns: repeat(3, 1fr); }
}
.collection {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 140px;
  box-shadow: var(--shadow);
  border: 2px solid #fff;
  text-decoration: none;
  color: #fff;
  display: block;
}
.collection img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.collection .label {
  position: relative;
  z-index: 2;
  padding: 1rem;
  background: transparent;
  color: #fff;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-weight: 700;
  font-size: 1rem;
}
.collection .label span {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #fff;
  opacity: 0.95;
  margin-top: 0.2rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 1rem 0 2.5rem;
  box-shadow: var(--shadow);
}
.cta-band h2 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}
.cta-band p {
  margin: 0 auto 1.25rem;
  opacity: 0.92;
  max-width: 32rem;
}
.cta-band .btn-primary {
  background: #fff;
  color: var(--primary) !important;
}

.site-footer {
  border-top: 1px solid var(--border);
  /* Extra bottom pad so sticky Share+Moroni FAB never covers footer/footnote */
  padding: 1.5rem 0 max(7rem, calc(6.25rem + env(safe-area-inset-bottom, 0px)));
  color: var(--fg-muted);
  font-size: 0.88rem;
  text-align: center;
}
.site-footer strong { color: var(--primary); }
/* Keep full "* With purchase…" line clear of fixed Share FAB (do not move FAB) */
.site-footer .footer-footnote {
  text-align: right;
  padding-right: max(8rem, calc(7rem + env(safe-area-inset-right, 0px)));
  box-sizing: border-box;
  max-width: 100%;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.nav-link:hover, .nav-link:focus-visible {
  border-color: var(--primary);
  outline: none;
}
a.collection {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}
a.collection:hover .label,
a.collection:focus-visible .label {
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
}
.collection:focus-visible {
  outline: 2px solid #fdba74;
  outline-offset: 2px;
}
.share-fab {
  pointer-events: auto;
  position: relative;
  z-index: 35;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  background: #f97316;
  color: #fff;
  box-shadow: 0 6px 18px rgb(15 23 42 / 0.28);
  cursor: pointer;
}
.share-fab:hover, .share-fab:focus-visible {
  filter: brightness(1.05);
  outline: 2px solid #fdba74;
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .header-inner { gap: 0.5rem; }
  .nav-cta { padding: 0.45rem 0.75rem; font-size: 0.9rem; }
  .share-fab { padding: 0.75rem 1.05rem; font-size: 0.95rem; }
  .collections { grid-template-columns: 1fr 1fr; }
}

/* Sticky Share FAB + Moroni perch (apex-share-fab-moroni-20260913a) */
.share-fab-wrap {
  overflow: visible;
  position: fixed;
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
}
.share-fab-perch {
  display: block;
  line-height: 0;
  margin-bottom: -6px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgb(15 23 42 / 0.25));
}
.share-fab-moroni {
  display: block;
  width: 48px;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* === HARD CONTRAST apex-overlay-contrast-20260913a — full-card 60% dark overlay + white titles (apex only) === */
a.collection,
a.collection:visited,
a.collection:hover,
a.collection:focus,
a.collection:active {
  color: #ffffff !important;
  text-decoration: none !important;
}
a.collection {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
}
a.collection > img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 140px !important;
  object-fit: cover !important;
}
/* Full-card dark overlay ON the photo — alpha 0.6 */
a.collection::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  pointer-events: none !important;
}
a.collection .label {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important; /* overlay is ::after */
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65) !important;
  min-height: 140px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}
a.collection .label,
a.collection .label * {
  color: #ffffff !important;
  opacity: 1 !important;
}
a.collection .label span {
  color: #ffffff !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}
a.collection:hover .label,
a.collection:focus-visible .label {
  color: #ffffff !important;
  background: transparent !important;
}
a.collection:hover::after,
a.collection:focus-visible::after {
  background: rgba(15, 23, 42, 0.68) !important;
}

/* Header pass sticky — Monthly/Yearly always visible (apex-header-auth-toggle-20260914a) */
.pass-buy { white-space: nowrap; font-size: 0.92rem; }
.header-actions .pass-buy { margin-right: 0.4rem; }
.pass-offer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
}
.pass-offer.pass-buy { white-space: normal; font-size: inherit; }
.btn-pass-stack {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  padding: 0.55rem 1.05rem;
  min-width: 0;
  font-size: 0.88rem;
  color: #fff !important;
}
.btn-pass-line1 { font-weight: 700; }
.btn-pass-price {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}
.btn-pass-line2 {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}
.btn-pass-annual .btn-pass-line2 { font-weight: 700; }
.btn-primary.btn-pass-annual,
.btn-pass-annual {
  background: #f97316;
  color: #fff !important;
}
.btn-primary.btn-pass-annual:hover,
.btn-pass-annual:hover {
  background: #ea580c;
  color: #fff !important;
}
.header-login {
  white-space: nowrap;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.header-login.header-login-hi {
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.55rem 1.15rem;
  background: var(--primary) !important;
  color: #fff !important;
  border: 2px solid var(--primary-dark) !important;
  box-shadow: 0 2px 8px rgb(37 99 235 / 0.35);
}
.header-login.header-login-hi:hover,
.header-login.header-login-hi:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
}
/* Phone: keep Monthly/Yearly VISIBLE — compact, ≥44px tappable (apex-header-auth-toggle-20260914a) */
.header-inner {
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 0.35rem;
}
.header-actions {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 0.35rem;
}
.brand {
  min-width: 0;
  flex: 0 1 auto;
}
.header-actions .btn-pass-stack {
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}
@media (max-width: 640px) {
  .header-actions .pass-offer.pass-buy {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: auto;
    max-width: 100%;
  }
  .header-actions .btn-pass-stack {
    min-width: 0;
    width: auto;
    min-height: 44px;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
  }
  .header-actions .btn-pass-line2 { display: none; }
  .header-actions .btn-pass-price { font-size: 0.72rem; }
  .header-actions { gap: 0.35rem; }
  .brand-text {
    max-width: 7.5rem;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-login.header-login-hi {
    flex: 0 0 auto;
    font-size: 0.95rem;
    padding: 0.48rem 0.85rem;
    min-height: 44px;
  }
}






/* apex-header-auth-toggle-20260914a — one row, logo only, menu holds pass */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner,
.header-inner.header-inner--one-row,
.header-inner.header-inner--two-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.header-row-brand,
.header-row-actions { display: contents; } /* neutralize leftover two-row if any */
.brand.brand-logo-only { gap: 0; }
.brand.brand-logo-only .brand-text { display: none !important; }
.header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  min-width: 0;
}
.header-actions .pass-buy,
.header-actions .pass-offer,
.header-actions .btn-pass-stack,
.header-actions .btn-pass-compact { display: none !important; }
.profile-chip { /* superseded by guest-compact */ display:inline-flex; height:36px; padding:0 0.7rem; }
.profile-chip .avatar {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #c45c26;
  flex: 0 0 auto;
}
#apex-profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.header-login { flex: 0 0 auto; }
.menu-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.apex-menu-sheet[hidden] { display: none !important; }
.apex-menu-sheet:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.apex-menu-sheet .sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}
.apex-menu-sheet .sheet-card {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(20rem, 92vw);
  background: #fffaf3;
  padding: 1.25rem 1rem 2rem;
  box-shadow: -8px 0 24px rgba(15,23,42,0.12);
  overflow: auto;
}
.apex-menu-sheet .menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.apex-menu-sheet .menu-list a,
.apex-menu-sheet .menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.apex-menu-sheet .menu-list a:hover,
.apex-menu-sheet .menu-list button:hover {
  background: rgba(15, 23, 42, 0.06);
}
@media (max-width: 520px) {
  .header-inner { flex-wrap: nowrap; }
  /* neutralized */ .profile-chip { max-width: none; }
}



/* apex-header-auth-toggle-20260914a — Guest same size as Login, flush left of Login */
.header-inner.header-inner--one-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}
.header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.profile-chip,
a.profile-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 0.7rem !important;
  margin: 0;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  align-self: center;
}
.profile-chip .avatar {
  width: 1.1rem !important;
  height: 1.1rem !important;
  min-width: 1.1rem;
  min-height: 1.1rem;
  flex: 0 0 auto;
}
#apex-profile-name {
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
.header-actions .header-login,
.header-actions #apex-header-login,
.header-actions #apex-header-signout {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 0.85rem;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.875rem;
  line-height: 1;
}
.header-actions .menu-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex: 0 0 auto;
  align-self: center;
}
@media (max-width: 520px) {
  .profile-chip,
  a.profile-chip {
    max-width: none !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 0.65rem !important;
  }
}



/* apex-header-auth-toggle-20260914a — guest Login/register vs signed-in Sign out */
#apex-header-login[hidden],
#apex-header-signout[hidden],
#apex-menu-login[hidden],
#apex-menu-signout[hidden],
.header-actions .header-login[hidden],
.apex-menu-sheet .menu-list a[hidden],
.apex-menu-sheet .menu-list button[hidden] {
  display: none !important;
}

