/* Navana — immersive depth preview (tich, 2026-12-04: "Lets go with what you recommend").
   1. Breathing pauses: full-width photo bands with one existing line, and a slow 4s-in / 6s-out circle.
   2. Gentle scroll reveals: content rises ~14px over ~0.85s (only under html.js-depth, added by js/depth.js).
   3. Living geometry: the existing gold lotus line art turns very slowly; faint static film grain on photos.
   Transform / opacity only. Decorative layers are aria-hidden + pointer-events: none. No JS = everything visible.
   prefers-reduced-motion: no motion at all (end of file). Home, Workshops and Our Story only (inc/depth.php). */

:root {
  --depth-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --depth-rise: 20px;
  --depth-dur: 0.9s;
  --depth-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 1. Breathing pauses ---------- */
.depth-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: clamp(340px, 62vh, 580px);
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  background: var(--green-deep, #23403D);
  color: var(--on-dark, #F4F7F6);
  text-align: center;
}
.depth-band--quiet { min-height: clamp(300px, 54vh, 520px); }
.depth-band-photo {
  position: absolute;
  inset: -14% 0;           /* room for the slow parallax drift (up to ~64px each way) */
  z-index: -3;
  pointer-events: none;
}
.depth-band-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--depth-y, 0px), 0) scale(1.02);
}
/* soft veil: keeps the line readable (AA+ on the darkest part of each photo) and the band calm */
.depth-band-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(10, 22, 20, 0.5) 0%, rgba(10, 22, 20, 0.18) 70%, rgba(10, 22, 20, 0.05) 100%),
    linear-gradient(180deg, rgba(10, 22, 20, 0.30) 0%, rgba(10, 22, 20, 0.06) 30%, rgba(10, 22, 20, 0.06) 70%, rgba(10, 22, 20, 0.34) 100%);
}
.depth-band--quiet .depth-band-veil {
  background: linear-gradient(180deg, rgba(10, 22, 20, 0.22) 0%, rgba(10, 22, 20, 0) 35%, rgba(10, 22, 20, 0) 65%, rgba(10, 22, 20, 0.26) 100%);
}
/* film grain, static and faint */
.depth-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--depth-grain) 0 0 / 160px 160px repeat;
  opacity: 0.16;
  mix-blend-mode: overlay;
}
.depth-band-words { position: relative; max-width: 40rem; }
.depth-band-line {
  margin: 0;
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.95rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.38), 0 0 2px rgba(0, 0, 0, 0.25);
}
.depth-band-line + .depth-band-line { margin-top: 0.35em; }
/* thin teal-gold hairline under the words, echoing the site rules */
.depth-band-words::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 1.4rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(var(--on-dark-accent-rgb), 0.9), transparent);
}

/* breathing circle: 4s expand, 6s settle (10s cycle); decorative only */
.depth-breath {
  position: relative;
  width: clamp(140px, 20vw, 200px);
  aspect-ratio: 1;
  pointer-events: none;
}
.depth-breath-ring,
.depth-breath-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.depth-breath-ring {
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 0 40px rgba(var(--on-dark-accent-rgb), 0.25), inset 0 0 30px rgba(var(--on-dark-accent-rgb), 0.18);
  transform: scale(0.75);
}
.depth-breath-core {
  inset: 41%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.28) 45%, transparent 70%);
  transform: scale(0.8);
}
html.js-depth .depth-band.is-in .depth-breath-ring { animation: depth-breathe 10s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
html.js-depth .depth-band.is-in .depth-breath-core { animation: depth-breathe-core 10s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
html.js-depth .depth-band.is-away .depth-breath-ring,
html.js-depth .depth-band.is-away .depth-breath-core { animation-play-state: paused; }
@keyframes depth-breathe {
  0%   { transform: scale(0.75); opacity: 0.65; }
  40%  { transform: scale(1.15); opacity: 1; }     /* 4s in */
  100% { transform: scale(0.75); opacity: 0.65; }  /* 6s out */
}
@keyframes depth-breathe-core {
  0%   { transform: scale(0.7); opacity: 0.5; }
  40%  { transform: scale(1.4); opacity: 0.95; }
  100% { transform: scale(0.7); opacity: 0.5; }
}

/* the words arrive softly once the band is in view */
html.js-depth .depth-band-words { opacity: 0; transform: translate3d(0, var(--depth-rise), 0); transition: opacity 1.1s var(--depth-ease) 0.15s, transform 1.2s var(--depth-ease) 0.15s; }
html.js-depth .depth-band.is-in .depth-band-words { opacity: 1; transform: none; }

/* ---------- 2. Gentle scroll reveals ---------- */
/* js/depth.js adds html.js-depth and then marks each block of a section .depth-seen once it is well inside
   the viewport (not at the very edge), so the soft fade + ~20px rise is actually on screen. Until then the
   block rests faded and 20px low. Without JS, or with reduced motion, html.js-depth is never added and
   everything is simply shown. Section-level fades from main.js / immersive.js are held open here so the
   blocks do the revealing; page headers are unchanged. */
html.js-depth main .reveal:not(.page-header) { opacity: 1; transform: none; transition: none; }
html.js-depth main .reveal:not(.page-header) > .container > *,
html.js-depth main .reveal:not(.page-header) > .unity-inner > * {
  opacity: 0;
  transform: translate3d(0, var(--depth-rise), 0);
  transition: opacity var(--depth-dur) var(--depth-ease), transform calc(var(--depth-dur) + 0.15s) var(--depth-ease);
}
html.js-depth main .reveal:not(.page-header) > .container > .depth-seen,
html.js-depth main .reveal:not(.page-header) > .unity-inner > .depth-seen { opacity: 1; transform: none; transition-delay: 0s; }
html.js-depth main .reveal:not(.page-header) > .container > .depth-seen:nth-child(2) { transition-delay: 0.1s; }
html.js-depth main .reveal:not(.page-header) > .container > .depth-seen:nth-child(3) { transition-delay: 0.2s; }

/* photos in page headers get the same faint grain (Workshops, Our Story) */
body.navana-workshops .page-header,
body.navana-about .page-header { position: relative; isolation: isolate; }
body.navana-workshops .page-header > .container,
body.navana-about .page-header > .container { position: relative; z-index: 1; }
body.navana-workshops .page-header::after,
body.navana-about .page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--depth-grain) 0 0 / 160px 160px repeat;
  opacity: 0.12;
  mix-blend-mode: overlay;
}

/* ---------- 3. Living geometry ---------- */
/* The existing gold lotus line art (1.0.111 "More pop") turns once every 2 minutes. `rotate` is its own
   property, so the existing translateY centring is untouched. The story ring on Home turns the other way,
   slower still (4 min). */
html.js-depth body:not(.is-darkness) main :where(
  #home-hero ~ .section-alt:not(.story-path):not(.story-circle-band), .section.daily-practice, body.navana-about .section-alt,
  #circle.section, #upcoming.section
)::before {
  animation: depth-turn 120s linear infinite;
  scale: 1.2; /* a touch larger so the 1px gold hairlines read on screen and in video */
}
html.js-depth body:not(.is-darkness).navana-about main .about-intro-rest > .content-block:nth-child(2)::after {
  animation: depth-turn 150s linear infinite reverse;
}
html.js-depth .story-circle svg {
  animation: depth-turn-ring 240s linear infinite reverse;
}
/* (Our Story's "Returning to Unity" triangle is left still: turned, it reads as tilted rather than alive.) */
/* opacity is set inside the keyframes on purpose: an animation beats the per-page opacity (0.42–0.5) of the
   existing accents, so the hairline art can be seen (0.9) while staying quiet; reduced motion keeps the originals */
@keyframes depth-turn {
  from { rotate: 0deg;   opacity: 0.9; }
  to   { rotate: 360deg; opacity: 0.9; }
}
@keyframes depth-turn-ring {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}
/* pause when off screen (js/depth.js toggles .depth-still on sections out of view) */
html.js-depth main .depth-still::before,
html.js-depth main .depth-still::after,
html.js-depth main .depth-still .story-circle svg { animation-play-state: paused; }

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  .depth-band { min-height: clamp(280px, 52vh, 440px); padding: 3rem 1.25rem; }
  .depth-band--quiet { min-height: clamp(260px, 44vh, 380px); }
  .depth-band-photo { inset: -9% 0; }
  .depth-band-line { font-size: 1.25rem; }
  .depth-breath { width: 140px; }
  /* the seated figure sits mid-frame on a phone: let the words rest low, over the hillside */
  .depth-band[data-depth-band="home-stillness"] { place-items: end center; padding-bottom: 2.75rem; }
  .depth-band[data-depth-band="home-stillness"] .depth-band-veil {
    background: linear-gradient(180deg, rgba(10, 22, 20, 0.16) 0%, rgba(10, 22, 20, 0.04) 40%, rgba(10, 22, 20, 0.5) 72%, rgba(10, 22, 20, 0.66) 100%);
  }
}

/* ---------- Reduced motion: nothing moves; words shown; circle rests at mid size ---------- */
@media (prefers-reduced-motion: reduce) {
  .depth-band-photo img { transform: none !important; }
  .depth-band-words { opacity: 1 !important; transform: none !important; transition: none !important; }
  .depth-breath-ring,
  .depth-breath-core { animation: none !important; }
  .depth-breath-ring { transform: scale(0.95); }
  /* js/depth.js never adds html.js-depth here, so the reveal rise and the geometry turn never start */
  html.js-depth main .reveal { transform: none !important; }
}
