/* Sanctuary mode – hide global chrome on Online Retreat */
.retreat-online-shell .site-header,
.retreat-online-shell .nav-backdrop,
.retreat-online-shell .nav-overlay,
.retreat-online-shell .nav-panel,
.retreat-online-shell .site-footer {
  display: none !important;
}
/* Sanctuary mode – rooms fill full viewport */
.retreat-online-shell .retreat-room {
  inset: 0;
}
.retreat-online-shell {
  background: #050506;
}

/* === Online Retreat – immersive, one-room-at-a-time === */

.retreat-online-page {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, #262224 0, #111013 45%, #050506 100%);
  color: #f4ecd8;
  display: flex;
  align-items: stretch;
}

/* Rooms: one visible at a time */
.retreat-room {
  position: fixed;
  inset: var(--header-clear, 4.5rem) 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 700ms ease-out,
    transform 700ms ease-out;
  z-index: 1;
}

.retreat-room.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Inner container */
.retreat-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(233,196,119,0.06), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(233,196,119,0.04), transparent 50%),
    #121212;
  border: 1px solid rgba(233,196,119,0.14);
  box-shadow: 0 20px 46px rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Header */
.retreat-header {
  text-align: center;
}
.retreat-subtitle {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233,196,119,0.75);
}
.retreat-title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f4ecd8;
}
.retreat-tagline {
  margin: 0;
  font-size: 0.98rem;
  max-width: 40rem;
  margin-inline: auto;
  color: rgba(244,236,216,0.86);
}

/* Body */
.retreat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.4rem;
}
.retreat-body--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 1.75rem;
}

/* Footer */
.retreat-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

/* Buttons – scoped */
.retreat-online-page .btn {
  display: inline-block;
  text-align: center;
  padding: 0.65rem 1.05rem;
  border-radius: 0.6rem;
  text-decoration: none;
  background: #161616;
  border: 1px solid rgba(233,196,119,0.25);
  color: #f4ecd8;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.retreat-online-page .btn:hover {
  background: #1b1b1b;
}
.retreat-online-page .btn.primary {
  background: #c7a76b;
  border-color: #c7a76b;
  color: #101010;
}
.retreat-online-page .btn.primary:hover {
  background: #b99657;
}
.retreat-online-page .btn.ghost {
  background: transparent;
  border-color: rgba(233,196,119,0.3);
}

/* Breathing orb / verse */

.breath-column {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  justify-content: center;
}

/* orb + verse share the exact same spot */
.breath-orb {
  grid-area: 1 / 1;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(233,196,119,0.45), rgba(10,8,5,0.97));
  box-shadow:
    0 0 20px rgba(233,196,119,0.55),
    0 0 60px rgba(0,0,0,0.9);
  opacity: 1;
  transition: opacity 4.5s ease-out; /* final exhale duration */
}

/* Intro overlay over the orb – explains what’s about to happen */
.retreat-orb-intro {
  grid-area: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
  font-size: 0.93rem;
  line-height: 1.6;
  color: rgba(244, 236, 216, 0.88);
  opacity: 0;
  pointer-events: none; /* don’t block taps if someone interacts early */
  animation: retreat-orb-intro 24s ease-in-out 1;
}

/* Fade in, hold, fade out */
@keyframes retreat-orb-intro {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Orb fade-out state – JS adds .orb-fade-out */
.breath-orb.orb-fade-out {
  opacity: 0;
  /* keep ongoing transform/box-shadow from the breathing animation;
     we only fade opacity, so no snapping */
}

/* Verse / instruction copy */
.breath-instructions {
  font-size: 0.96rem;
  text-align: left;
}
.breath-instructions p {
  margin: 0.25rem 0;
}
.retreat-whisper {
  font-style: italic;
  color: rgba(244,236,216,0.92);
}
.retreat-whisper .ref {
  font-style: normal;
  color: #e9c477;
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

/* Orb animation – 9s breathing loop */
@keyframes retreat-breath {
  0%   { transform: scale(0.92); box-shadow: 0 0 18px rgba(233,196,119,0.4), 0 0 40px rgba(0,0,0,0.8); }
  50%  { transform: scale(1.05); box-shadow: 0 0 28px rgba(233,196,119,0.72), 0 0 80px rgba(0,0,0,0.98); }
  100% { transform: scale(0.92); box-shadow: 0 0 18px rgba(233,196,119,0.4), 0 0 40px rgba(0,0,0,0.8); }
}

[data-breath-anim] {
  animation: retreat-breath 9s ease-in-out infinite;
}

/* Scripture whispers */
.whisper-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.whisper-label {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233,196,119,0.8);
  margin: 0 0 0.35rem;
}
.whisper-card {
  margin: 0 0 0.65rem;
  padding: 1rem 1.1rem 0.9rem;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(233,196,119,0.11), #151515);
  border: 1px solid rgba(233,196,119,0.16);
  min-height: 4.5rem;
}
.whisper-text {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.6;
}
.whisper-ref {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(233,196,119,0.9);
  text-align: right;
}

/* Confessional room */
.confessional-label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.confessional-shell {
  position: relative;
}

.confessional-input {
  width: 100%;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(233,196,119,0.25);
  background: #181515;
  color: #f4ecd8;
  resize: vertical;
  min-height: 9rem; /* was 7rem – gives more “altar” space for text */
  font: inherit;
}

.confessional-input::placeholder {
  color: rgba(244,236,216,0.55);
}

.confessional-input:focus-visible {
  outline: 2px solid rgba(233,196,119,0.9);
  outline-offset: 2px;
}

/* Burn overlay – sits over the input and clips everything */
.confessional-burn-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  opacity: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%,
    rgba(10, 7, 5, 0.9),
    rgba(0, 0, 0, 1));
}

.confessional-burn-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: #f4ecd8;
}

/* Text burn: glow → char → ash drifting upward (no hard plateau) */
@keyframes altar-burn-text {
  0% {
    opacity: 1;
    color: #f4ecd8;
    text-shadow: 0 0 0 rgba(255, 215, 150, 0);
    transform: translateY(0) scale(1);
    filter: blur(0);
    letter-spacing: 0;
  }
  20% {
    color: #ffe7bd;
    text-shadow: 0 0 10px rgba(255, 215, 150, 0.9);
    transform: translateY(-1px) scale(1.01);
  }
  40% {
    color: #f6cf8a;
    text-shadow: 0 0 16px rgba(255, 190, 110, 1);
    transform: translateY(-2px) scale(1.02);
    letter-spacing: 0.02em;
  }
  70% {
    color: #4a3422; /* charred ink */
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
    filter: blur(1.2px);
    transform: translateY(-10px) scale(1.01);
    letter-spacing: 0.06em;
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    color: transparent;
    text-shadow: none;
    filter: blur(3px);
    transform: translateY(-22px) scale(1);
    letter-spacing: 0.1em;
  }
}

/* Rising glow – expands upward from the altar */
@keyframes altar-embers {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10%) scale(0.85);
    box-shadow: 0 0 0 rgba(233,196,119,0);
  }
  25% {
    opacity: 0.95;
    transform: translateX(-50%) translateY(0%) scale(1);
    box-shadow: 0 0 18px rgba(233,196,119,0.8);
  }
  60% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(-8%) scale(1.08);
    box-shadow: 0 0 10px rgba(233,196,119,0.5);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-16%) scale(1.12);
    box-shadow: 0 0 0 rgba(233,196,119,0);
  }
}

/* Overlay fade – keeps the whole altar from “snapping off” */
@keyframes altar-overlay-fade {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Active state */
.confessional-burning .confessional-burn-overlay {
  animation: altar-overlay-fade 4s ease-out forwards;
}

/* Big upward glow element */
.confessional-burn-overlay::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0%;
  width: 115%;
  height: 65%;
  transform: translateX(-50%);
  border-radius: 50% / 35%;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 90%,
    rgba(255, 230, 190, 0.85),
    rgba(255, 200, 120, 0.55),
    rgba(80, 40, 15, 0.25),
    rgba(0, 0, 0, 0)
  );
  filter: blur(24px);
  pointer-events: none;
}

.confessional-burning .confessional-burn-overlay::before {
  animation: altar-embers 3.6s ease-out forwards;
}

/* Hook text to burn animation */
.confessional-burning .confessional-burn-text {
  animation: altar-burn-text 3.6s ease-out forwards;
}

.confessional-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;  /* center button + verse */
  gap: 0.75rem;
  margin-top: 0.85rem;
  text-align: center;
}

.confessional-status {
  font-size: 0.9rem;
  color: rgba(233,196,119,0.92);
}

/* Status line */
.confessional-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.confessional-status {
  font-size: 0.9rem;
  color: rgba(233,196,119,0.92);
}

/* Heart check */
.heart-grid {
  display: grid;
  gap: 1.1rem;
  margin-top: 0.7rem;
}
@media (min-width: 960px) {
  .heart-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}
@media (min-width: 640px) and (max-width: 959px) {
  .heart-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
.heart-card {
  background: #151313;
  border-radius: 14px;
  padding: 0.9rem 0.9rem 0.85rem;
  border: 1px solid rgba(233,196,119,0.16);
}
.heart-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #e9c477;
}
.heart-card p {
  margin: 0 0 0.6rem;
  font-size: 0.93rem;
}
.heart-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.heart-choices button {
  flex: 1 1 30%;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(233,196,119,0.25);
  background: #1a1816;
  color: #f4ecd8;
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.heart-choices button:hover,
.heart-choices button:focus-visible {
  background: #25201b;
  border-color: rgba(233,196,119,0.6);
}
.heart-choices button[data-heart-active="true"] {
  background: #c7a76b;
  color: #101013;
  border-color: #c7a76b;
}

.heart-scripture {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: #141216;
  border: 1px solid rgba(233,196,119,0.24);
}
.heart-scripture-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
}
.heart-scripture-text .ref {
  color: #e9c477;
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

/* Exit room */
.retreat-benediction {
  margin-top: 0.95rem;
  font-style: italic;
}
.retreat-benediction .ref {
  font-style: normal;
  color: #e9c477;
}
.retreat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  [data-breath-anim],
  .confessional-burn-text,
  .retreat-orb-verse.verse-breathing {
    animation: none !important;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .retreat-inner {
    margin-inline: 0.5rem;
    padding: 1.25rem 1.05rem 1.6rem;
  }
  .retreat-body--split {
    grid-template-columns: minmax(0,1fr);
  }
  .breath-orb {
    margin-bottom: 0.4rem;
  }
  .retreat-footer {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* A11y helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* === Online Retreat – soften ambient text so orb + verse dominate === */

.retreat-online-page .retreat-tagline,
.retreat-online-page .breath-instructions {
  font-size: 0.93rem;
  color: rgba(244, 236, 216, 0.78);
}
.retreat-online-page .retreat-subtitle {
  color: rgba(233, 196, 119, 0.65);
}
.retreat-online-page .whisper-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 6.5rem;
}
.retreat-online-page .whisper-text {
  min-height: 3.8rem;
  display: flex;
  align-items: center;
}

/* === Room 1 – orb & verse only, centered === */

.retreat-inner--centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
}

/* Orb + verse stacked in the very same spot */
.retreat-orb-stack {
  display: grid;
  place-items: center;
  width: min(520px, 90vw);
  min-height: 260px;
  margin: 0 auto;
}

/* Verse panel starts invisible; JS will add .verse-breathing */
.retreat-orb-verse {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
}

/* Verse breathing animation: 4.5s in, 4.5s out */
@keyframes verse-breath {
  0%   { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}

.retreat-orb-verse.verse-breathing {
  animation: verse-breath 9s ease-in-out infinite;
}

/* Center the "go deeper" button */
.retreat-footer--center {
  justify-content: center;
  margin-top: 0;
}

/* === Sanctuary black void for Room 1 === */

.retreat-online-shell {
  background: #000 !important;
}

.retreat-online-shell .retreat-online-page {
  background: transparent !important;
}

.retreat-room[data-room="1"] {
  background: #000 !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

.retreat-room[data-room="1"] .retreat-inner {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ROOM 1 — remove inner box so the orb floats freely */
.retreat-room[data-room="1"] .retreat-inner {
  padding: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
}

/* ROOM 1 — kill any gradient or page background */
.retreat-room[data-room="1"],
.retreat-room[data-room="1"] .retreat-body {
  background: #000 !important;
  background-image: none !important;
}


/* Adjustments for Room 2 layout: center children in retreat-body */
.retreat-room[data-room="2"] .retreat-body {
  display: flex;
  flex-direction: column;
  align-items: center;   /* <-- this cleanly sets the centering */
  width: 100%;
}
/* Ensures the altar stays wide even inside centered retreat-body */
.retreat-room[data-room="2"] .confessional-shell {
  width: 100%;
  max-width: 650px;   /* Same width as original retreat card content */
}

.confessional-top {
  margin-bottom: 1.25rem;
}

/* ROOM 1: soften browser chrome on mobile */
.retreat-room[data-room="1"] {
  min-height: 101vh;    /* triggers iOS/Android UI collapse */
  background: #000000;
}

/* Let body be scrollable enough for bars to collapse */
html, body {
  background: #000;
  height: 100%;
  overflow-y: auto;      /* collapse trigger */
  -webkit-overflow-scrolling: touch;
}
/* --- Mobile-safe full-screen rooms (fixes clipping on Room 3) --- */

/* Let each retreat room fill the viewport properly on all devices */
.retreat-room {
  min-height: 100vh;
  min-height: 100svh;  /* iOS/Android modern safe height */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  justify-content: center; /* centers Room 3 content vertically */
}

/* Ensure inner content doesn't stretch too far side-to-side */
.retreat-room .retreat-body {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

/* Reduce bottom/footer overlap on small phones */
.retreat-footer {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  padding-top: 1.25rem;
}

/* Make sure the heart-check (Room 3) never leaks off-screen */
.retreat-room[data-room="3"] .retreat-body {
  padding: 1rem 1.25rem;
  box-sizing: border-box;
}
/* === Taller rooms (Heart Check + Exit) – avoid clipping on phones === */

/* Let Rooms 3 and 4 scroll naturally instead of being vertically cropped */
.retreat-room[data-room="3"],
.retreat-room[data-room="4"] {
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 1.25rem 0; /* space above/below inner card */
}

/* Tweak inner card padding so it sits nicely within the viewport */
.retreat-room[data-room="3"] .retreat-inner,
.retreat-room[data-room="4"] .retreat-inner {
  margin: 0 auto;
  max-width: 980px;
  padding-top: 1.25rem;
  padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
/* === Room 4 button layout fix (mobile-friendly vertical stack) === */

.retreat-room[data-room="4"] .retreat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Mobile: stack buttons full-width for clean layout */
@media (max-width: 480px) {
  .retreat-room[data-room="4"] .retreat-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .retreat-room[data-room="4"] .retreat-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Keep the final “Begin the retreat again” CTA separated cleanly */
.retreat-room[data-room="4"] .retreat-footer-cta {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 480px) {
  .retreat-room[data-room="4"] .retreat-footer-cta .btn {
    width: 100%;
  }
}
/* === Heart Check – give cards more room on desktop === */
@media (min-width: 960px) {
  .heart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}
.confessional-burning textarea::placeholder {
  color: transparent !important;
}
/* === Room 2: orb in pure black void, no card container === */

.retreat-room[data-room="2"] {
  background: #000 !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

.retreat-room[data-room="2"] .retreat-inner {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
}
