/* ==========================================================================
   Grace Guide — marketing site
   Mobile-first, section-organized
   ========================================================================== */

:root {
  --gg-teal: #3ec9b9;
  --gg-teal-soft: #7dd3c8;
  --gg-teal-deep: #0f766e;
  --gg-mint: #b8ebe3;
  --gg-maroon: #c25585; /* lightened from app default #611240 for dark backgrounds */
  --gg-title-hue: 333;
  --gg-title-sat: 55%;
  --gg-title-light: 58%;
  --gg-ink: #0b1220;
  --gg-ink-soft: rgba(11, 18, 32, 0.86);
  --gg-snow: rgba(255, 255, 255, 0.94);
  --gg-muted: rgba(255, 255, 255, 0.72);
  --gg-line: rgba(255, 255, 255, 0.12);
  --gg-card: rgba(255, 255, 255, 0.07);
  --gg-card-strong: rgba(255, 255, 255, 0.1);
  --gg-shadow: 0 18px 50px rgba(5, 20, 30, 0.45);
  --gg-shadow-soft: 0 10px 30px rgba(5, 20, 30, 0.25);
  --gg-radius-lg: 22px;
  --gg-radius-md: 16px;
  --gg-radius-sm: 12px;
  --gg-header-h: 64px;
  --gg-max: 1120px;
  --gg-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Crimson Pro", "Times New Roman", Times, serif;
  /* One shared hue clock for the whole site */
  animation: title-hue-cycle 30s linear infinite;
}

@property --gg-title-hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 333;
}

@keyframes title-hue-cycle {
  to {
    --gg-title-hue: 693;
  }
}

/* Consumers only read --gg-title-hue; they do not run their own hue animations */
.feature__title,
.study-card__title,
.custom-card__title,
.journal-mockup__caption,
.eyebrow {
  color: hsl(var(--gg-title-hue) var(--gg-title-sat) var(--gg-title-light));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--gg-snow);
  background: #071018;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gg-teal-soft);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--gg-ink);
  color: var(--gg-snow);
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.75rem;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-bg__stack {
  position: absolute;
  inset: -8%;
  filter: blur(34px) saturate(1.05);
  transform: translateZ(0);
  will-change: filter;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-bg__stack {
    filter: blur(28px) saturate(1.02);
  }
}

.ambient-bg__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2.4s var(--gg-ease);
}

.ambient-bg__layer.is-active {
  opacity: 1;
}

.ambient-bg__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(62, 201, 185, 0.22), transparent 55%),
    radial-gradient(900px 600px at 85% 30%, rgba(125, 211, 200, 0.12), transparent 50%),
    linear-gradient(165deg, rgba(7, 16, 24, 0.2), rgba(7, 16, 24, 0.65));
  mix-blend-mode: multiply;
}

.ambient-bg__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 14, 22, 0.55), rgba(6, 14, 22, 0.82));
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7, 16, 24, 0.72), rgba(7, 16, 24, 0.35));
  border-bottom: 1px solid var(--gg-line);
}

.site-header__inner {
  max-width: var(--gg-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--gg-header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.brand__name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--gg-line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--gg-snow);
  border-radius: 2px;
  transition: transform 0.25s var(--gg-ease), opacity 0.25s var(--gg-ease);
}

.site-nav {
  position: fixed;
  inset: var(--gg-header-h) 0 auto 0;
  background: rgba(7, 16, 24, 0.96);
  border-bottom: 1px solid var(--gg-line);
  padding: 0.75rem 1.25rem 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--gg-ease), opacity 0.3s var(--gg-ease);
}

.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-nav__link {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--gg-muted);
  font-weight: 550;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--gg-snow);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 880px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    inset: auto;
    background: transparent;
    border: 0;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .site-nav__link {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   Layout shell & sections
   -------------------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
}

.shell {
  max-width: var(--gg-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.25rem 0;
  scroll-margin-top: calc(var(--gg-header-h) + 0.75rem);
}

.section--thesis {
  padding: 4.75rem 0 2.5rem;
}

.thesis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}

.thesis__title {
  margin: 0;
  font-size: clamp(2.00rem, 6vw, 3.00rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--gg-snow);
}

.section-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--gg-title-hue) 55% 50% / 0.12) 18%,
    hsl(var(--gg-title-hue) 55% 50% / 0.38) 50%,
    hsl(var(--gg-title-hue) 55% 50% / 0.12) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 10px hsl(var(--gg-title-hue) 55% 45% / 0.28),
    0 0 28px hsl(var(--gg-title-hue) 55% 50% / 0.14);
}

.section--hero {
  padding: 2.25rem 0 3.5rem;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
}

.section--closing {
  padding-bottom: 2rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2.0rem, 6vw, 3.00rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.section-sub {
  margin: 0;
  font-size: 1.25rem;
  color: var(--gg-muted);
  max-width: 52ch;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__visual.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.hero__icon-card {
  position: relative;
  padding: 1.6rem;
  border-radius: 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  backdrop-filter: none;
}

/* Outer size (inside the stroke) — matches the earlier layout */
.hero__icon-zoom {
  width: min(200px, 44vw);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
}

/* Zoom inside the bitmap so the white G reads larger vs the baked-in gradient margin */
.hero__icon-zoom .hero__icon {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: scale(var(--hero-icon-zoom, 1.22));
  transform-origin: center center;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.00rem, 6vw, 3.00rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero__lede {
  margin: 0 0 1.5rem;
  color: var(--gg-muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3rem;
  }

  .hero__visual {
    order: 2;
  }

  .hero__copy {
    order: 1;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--gg-ease), box-shadow 0.2s var(--gg-ease), background 0.2s var(--gg-ease), border-color 0.2s var(--gg-ease);
}

.btn--primary {
  background: linear-gradient(
    135deg,
    hsl(var(--gg-title-hue) 60% 52%),
    hsl(var(--gg-title-hue) 55% 42%)
  );
  color: #041016;
  box-shadow: 0 12px 30px hsl(var(--gg-title-hue) 55% 40% / 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px hsl(var(--gg-title-hue) 55% 40% / 0.45);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--gg-snow);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  transition: transform 0.2s var(--gg-ease);
}

.store-badge::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  border-radius: 6px;
  background: hsl(var(--gg-title-hue) 68% 56%);
  pointer-events: none;
}

.store-badge__img {
  height: 2.75rem;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 0 5px hsl(var(--gg-title-hue) 70% 58% / 0.7))
    drop-shadow(0 0 14px hsl(var(--gg-title-hue) 65% 52% / 0.38));
  transition: filter 0.2s var(--gg-ease);
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge:hover .store-badge__img {
  filter:
    drop-shadow(0 0 7px hsl(var(--gg-title-hue) 70% 58% / 0.82))
    drop-shadow(0 0 18px hsl(var(--gg-title-hue) 65% 52% / 0.48));
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .store-badge:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Panels & cards
   -------------------------------------------------------------------------- */

.panel {
  border-radius: var(--gg-radius-lg);
  background: linear-gradient(180deg, var(--gg-card-strong), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--gg-line);
  box-shadow: var(--gg-shadow-soft);
  padding: 1.5rem;
}

.panel__grid--split {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 800px) {
  .panel--intro {
    padding: 2rem 2rem;
  }

  .panel__grid--split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.25rem;
  }
}

.device-shot {
  margin: 0;
  border-radius: var(--gg-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--gg-shadow);
  background: rgba(0, 0, 0, 0.2);
}

.device-shot__img {
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Feature rows (Guidance)
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--gg-radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gg-line);
  box-shadow: var(--gg-shadow-soft);
}

.feature__title {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}

.feature__text {
  margin: 0;
  color: var(--gg-muted);
}

/* --------------------------------------------------------------------------
   Journals & notes mockup
   -------------------------------------------------------------------------- */

.journal-mockup {
  max-width: 34rem;
  margin: 0 auto;
}

.journal-mockup__caption {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.5;
  text-wrap: balance;
}

.journal-mockup__caption--top {
  width: min(100%, 26rem);
  margin: 0 0 1rem 1.35rem;
}

.journal-mockup__stage {
  position: relative;
}

.journal-mockup__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--gg-radius-lg);
}

.journal-mockup__caption--bottom {
  width: min(100%, 17rem);
  margin: 1rem 20% 0 auto;
}

@media (max-width: 520px) {
  .journal-mockup__caption--top {
    width: 100%;
    margin-left: 0.75rem;
  }

  .journal-mockup__caption--bottom {
    width: min(100%, 15.5rem);
    margin-left: auto;
    margin-right: 2rem;
  }
}

.device-frame {
  margin: 0;
  border-radius: var(--gg-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: var(--gg-shadow);
}

.device-frame__img {
  width: 100%;
  height: auto;
}

.device-frame--compact {
  max-width: 420px;
  margin-inline: auto;
}

/* Guidance (People of the Bible) & Studies phone mockups use 1080×2200 assets (override per block).
   A fixed px/rem height shows a *different slice* on narrow vs wide layouts (image scales with
   width). aspect-ratio keeps the same vertical *fraction* of the asset on every device. */
.device-frame--crop-top {
  --crop-src-w: 1080;
  --crop-src-h: 2200;
  --crop-fraction: 0.6; /* default; overridden below for Studies each card */

  min-height: 0;
  width: 100%;
  overflow: hidden;
  align-self: center;
  aspect-ratio: var(--crop-src-w) / calc(var(--crop-src-h) * var(--crop-fraction));
}

/* Guidance — Themes: hide bottom 20% of the phone mockup */
.device-frame--crop-themes {
  --crop-fraction: 0.8;
}

/* Studies — adjust each card’s --crop-fraction (and optionally --crop-src-w / --crop-src-h if asset size differs) */
.device-frame--crop-study-start {
  --crop-fraction: 0.5;
}

.device-frame--crop-study-deeper {
  --crop-fraction: 0.62;
  /* Negative % moves the bitmap up inside the crop = show more of the lower screen */
  --crop-shift-y: -36%;
}

.device-frame--crop-study-timelines {
  --crop-fraction: 0.36;
  /* Negative % moves the bitmap up inside the crop = show more of the lower screen */
  --crop-shift-y: -46%;
}

.device-frame--crop-top .device-frame__img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(var(--crop-shift-y, 0));
}

.device-frame--flush {
  border-radius: var(--gg-radius-md);
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .feature--reverse .feature__content {
    order: 2;
  }

  .feature--reverse .device-frame {
    order: 1;
  }
}

/* --------------------------------------------------------------------------
   Studies
   -------------------------------------------------------------------------- */

.study-grid {
  display: grid;
  gap: 1.25rem;
}

.study-card {
  border-radius: var(--gg-radius-lg);
  border: 1px solid var(--gg-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  padding: 1.35rem;
  display: grid;
  gap: 1.1rem;
  transition: transform 0.25s var(--gg-ease), box-shadow 0.25s var(--gg-ease), border-color 0.25s var(--gg-ease);
}

.study-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gg-shadow);
  border-color: rgba(255, 255, 255, 0.2);
}

.study-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.study-card__text {
  margin: 0;
  color: var(--gg-muted);
}

.study-card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-card--wide {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .study-card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Bible feature
   -------------------------------------------------------------------------- */

@property --bible-reveal {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.bible-feature {
  max-width: 36rem;
  margin: 0 auto;
}

.bible-feature__stage {
  position: relative;
  margin: 0 auto;
  aspect-ratio: 1573 / 1345;
  overflow: hidden;
  --bible-reveal: 0;
  --bible-slide-distance: 300px;
}

.bible-feature__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bible-feature__img {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1573 / 1345;
  display: block;
  transform: translate3d(0, calc((1 - var(--bible-reveal)) * var(--bible-slide-distance)), 0);
  will-change: transform;
}

.bible-feature__divider {
  position: absolute;
  left: -1.35rem;
  right: -1.35rem;
  bottom: 0;
  z-index: 2;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--gg-title-hue) 60% 58% / 0.35) 10%,
    hsl(var(--gg-title-hue) 65% 62% / 0.95) 50%,
    hsl(var(--gg-title-hue) 60% 58% / 0.35) 90%,
    transparent 100%
  );
  box-shadow:
    0 0 8px hsl(var(--gg-title-hue) 60% 55% / 0.55),
    0 0 20px hsl(var(--gg-title-hue) 60% 55% / 0.35),
    0 0 36px hsl(var(--gg-title-hue) 55% 50% / 0.22);
}

.bible-feature__points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  text-align: center;
}

.bible-feature__points li {
  margin: 0;
  color: hsl(var(--gg-title-hue) var(--gg-title-sat) var(--gg-title-light));
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.45;
  text-wrap: balance;
}

@media (max-width: 520px) {
  .bible-feature__divider {
    left: -0.75rem;
    right: -0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bible-feature__stage {
    --bible-reveal: 1;
    animation: none !important;
  }

  .bible-feature__img {
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   Customization / cross preview
   -------------------------------------------------------------------------- */

.custom-grid {
  display: grid;
  gap: 1.25rem;
}

.custom-card {
  border-radius: var(--gg-radius-lg);
  border: 1px solid var(--gg-line);
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  box-shadow: var(--gg-shadow-soft);
  transition: transform 0.25s var(--gg-ease), box-shadow 0.25s var(--gg-ease);
}

.custom-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gg-shadow);
}

.custom-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.custom-card__text {
  margin: 0 0 1.1rem;
  color: var(--gg-muted);
}

.cross-preview {
  border-radius: var(--gg-radius-lg);
  padding: 1.5rem 1.25rem 1.25rem;
  background: radial-gradient(600px 240px at 50% 0%, rgba(62, 201, 185, 0.18), transparent 60%), rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cross-preview__inner {
  position: relative;
  width: min(220px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto 0.75rem;
}

.cross-preview__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
  filter: brightness(0) invert(1);
  opacity: 0;
  transition: opacity 0.55s var(--gg-ease);
}

.cross-preview__layer.is-visible {
  opacity: 1;
}

.cross-preview__caption {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gg-muted);
}

@media (min-width: 900px) {
  .custom-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-card:hover {
    transform: none;
  }

  .cross-preview__layer {
    transition: opacity 0.2s linear;
  }
}

/* --------------------------------------------------------------------------
   Standalone legal pages (privacy-policy.html, terms-of-service.html)
   -------------------------------------------------------------------------- */

.legal-page {
  position: relative;
  z-index: 1;
  padding: calc(var(--gg-header-h) + 1.5rem) 0 3.5rem;
}

.legal-doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.25rem;
  border-radius: var(--gg-radius-lg);
  border: 1px solid var(--gg-line);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--gg-shadow-soft);
}

.legal-doc__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--gg-mint);
  text-decoration: none;
  transition: color 0.2s var(--gg-ease);
}

.legal-doc__back:hover {
  color: var(--gg-teal-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.legal-doc__meta {
  margin: 0 0 0.25rem;
  color: var(--gg-muted);
  font-size: 0.95rem;
}

.legal-doc__meta + p:not(.legal-doc__meta) {
  margin-top: 1.5rem;
}

.legal-doc h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gg-mint);
}

.legal-doc h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--gg-snow);
}

.legal-doc p {
  margin: 0 0 1rem;
  color: var(--gg-muted);
}

.legal-doc p:last-child {
  margin-bottom: 0;
}

.legal-doc ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  color: var(--gg-muted);
}

.legal-doc li {
  margin-bottom: 0.4rem;
}

.legal-doc li:last-child {
  margin-bottom: 0;
}

.legal-doc a {
  color: var(--gg-mint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc a:hover {
  color: var(--gg-teal-soft);
}

.legal-doc strong {
  color: var(--gg-snow);
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Closing & footer
   -------------------------------------------------------------------------- */

.section--closing {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.closing {
  text-align: center;
  padding: 2rem 1rem 1rem;
  border-radius: var(--gg-radius-lg);
  background: linear-gradient(
    180deg,
    hsl(var(--gg-title-hue) 55% 50% / 0.14),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--gg-shadow-soft);
}

.closing__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
}

.closing__text {
  margin: 0 auto 1.25rem;
  max-width: 52ch;
  color: var(--gg-muted);
}

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  justify-content: center;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gg-muted);
  font-size: 0.92rem;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.85rem;
  margin: 0 0 1.15rem;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  opacity: 0.92;
  transition: opacity 0.2s var(--gg-ease), transform 0.2s var(--gg-ease);
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.site-footer__social-link img {
  display: block;
  width: 22px;
  height: 22px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-footer__copy {
  margin: 0;
}

.site-footer__nav a {
  color: var(--gg-muted);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--gg-snow);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
}

.site-footer__dot {
  opacity: 0.45;
}

.site-footer__credits {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  opacity: 0.62;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Image fallback & reveal animations
   -------------------------------------------------------------------------- */

.img-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1.25rem;
  text-align: center;
  color: var(--gg-muted);
  font-size: 0.95rem;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.img-fallback.is-visible {
  display: flex;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--gg-ease), transform 0.7s var(--gg-ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .feature__title,
  .study-card__title,
  .custom-card__title,
  .journal-mockup__caption,
  .bible-feature__points li {
    color: var(--gg-maroon);
  }

  .eyebrow {
    color: var(--gg-mint);
  }

  .btn--primary {
    background: linear-gradient(135deg, var(--gg-teal), #2fb8a8);
    box-shadow: 0 12px 30px rgba(47, 184, 168, 0.35);
  }

  .btn--primary:hover {
    box-shadow: 0 16px 36px rgba(47, 184, 168, 0.45);
  }

  .store-badge::before {
    background: var(--gg-teal);
  }

  .store-badge__img {
    filter:
      drop-shadow(0 0 5px rgba(47, 184, 168, 0.7))
      drop-shadow(0 0 14px rgba(62, 201, 185, 0.35));
  }

  .section-rule {
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(62, 201, 185, 0.12) 18%,
      rgba(62, 201, 185, 0.38) 50%,
      rgba(62, 201, 185, 0.12) 82%,
      transparent 100%
    );
    box-shadow:
      0 0 10px rgba(47, 184, 168, 0.28),
      0 0 28px rgba(62, 201, 185, 0.14);
  }

  .closing {
    background: linear-gradient(180deg, rgba(62, 201, 185, 0.12), rgba(255, 255, 255, 0.03));
  }
}
