/* ============================================================
   MORINGATO · ritual.css — loaded ONLY where needed (see the
   conditional enqueue in functions.php).
   Ritual page (template-ritual.php) — hero, mini-nav, steps, rail,
   planner, recipes, FAQ, CTA.
   Split from the monolithic style.css (v2.30.0 refactor) —
   same rules, same order, zero visual change intended.
   ============================================================ */

/* ============================================================
   RITUAL PAGE (template-ritual.php) — wellness-magazine lifestyle
   page. Scoped .mt-rt; shares the site glass tokens; media queries
   + reduced-motion at the end of the block.
   ============================================================ */
/* smooth anchor scrolling, only on this page + only if motion is ok */
@media (prefers-reduced-motion: no-preference) {
html:has(.mt-rt) { scroll-behavior: smooth; }
}

html:has(.mt-rt) { scroll-padding-top: 150px; }

/* anchors clear the two sticky bars */
/* --- reveal on scroll (IO adds .is-in; stagger set inline by JS) --- */
.mt-js .mt-rt-reveal {
  opacity: 0; translate: 0 24px;
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), translate .6s cubic-bezier(.22, 1, .36, 1);
}

.mt-js .mt-rt-reveal.is-in { opacity: 1; translate: 0 0; }

/* --- A. hero --- */
.mt-rt__hero {
  position: relative; overflow: hidden;
  min-height: min(82svh, 880px);  /* capped: tall/zoomed viewports keep a sane hero */
  margin-top: -84px;  /* slide under the floating navbar */
  padding: 150px 24px 90px;
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(120% 130% at 75% 10%, #1a3d21 0%, #122a16 55%, var(--ink-deep) 100%);
  color: #fff;
}

.mt-rt__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .55;
}

/* Hero dev hint for the ambient video — hidden so the hero reads as
   finished (dark gradient + steam) going live; the file to drop in is
   documented in the template header. */
.mt-rt__videotag { display: none; }

.mt-rt__hero-inner { position: relative; z-index: 2; max-width: 640px; }

.mt-rt__hero-inner h1 { color: #fff; font-size: clamp(40px, 6vw, 68px); letter-spacing: -.02em; margin: 0 0 14px; }

.mt-rt__hero-inner p { color: rgba(255, 255, 255, .85); font-size: 17px; margin: 0 0 30px; }

.mt-rt__hero .mt-btn--soft { color: #fff; }

.mt-rt__hero .mt-btn--soft:hover { color: #fff; }

/* steam wisps over the hero (shares the story-scene recipe, lighter) */
.mt-rt__steam { position: absolute; left: 50%; top: 26%; translate: -50% 0; width: 90px; height: 120px; pointer-events: none; }

.mt-rt__steam i {
  position: absolute; bottom: 0; width: 16px; height: 70px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 45%, rgba(255,255,255,0) 100%);
  filter: blur(5px); opacity: 0;
  animation: mt-steam-rise 3.8s ease-in-out infinite;
}

.mt-rt__steam i:nth-child(2) { left: 34px; height: 86px; animation-delay: -1.3s; }

.mt-rt__steam i:nth-child(3) { left: 62px; height: 60px; animation-delay: -2.6s; }

/* --- sticky mini nav --- */
.mt-rt__nav {
  position: sticky; top: 92px; z-index: 40;
  display: flex; justify-content: center; gap: 6px;
  width: fit-content; max-width: calc(100% - 32px);
  margin: -26px auto 0; padding: 7px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-chip);
  overflow-x: auto; scrollbar-width: none;
}

.mt-rt__nav::-webkit-scrollbar { display: none; }

.mt-rt__nav a {
  flex: none; color: var(--ink);
  border-radius: var(--r-pill); padding: 10px 16px;
  font: 500 13px/1 var(--font);
}

.mt-rt__nav a:hover,
.mt-rt__nav a:focus-visible { background: var(--green-badge); color: var(--green); }

/* --- shared section furniture --- */
.mt-rt__h2 { text-align: center; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.01em; margin: 0 0 10px; }

.mt-rt__lede { text-align: center; color: var(--text-muted); max-width: 56ch; margin: 0 auto 40px; }

.mt-rt__photo { margin: 0; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 14 / 10; background: linear-gradient(135deg, var(--green-pale), #fff); }

.mt-rt__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Polished placeholder — branded gradient + leaf glyph + elegant caption
   (reads as an intentional illustrated panel until real photos drop in;
   shared by the ritual figures AND the story milestone placeholders). */
.mt-rt__ph {
  display: grid; place-content: center; justify-items: center; gap: 11px;
  height: 100%; padding: 22px 20px; text-align: center; border-radius: inherit;
  background:
    radial-gradient(110% 110% at 50% 0%, rgba(255, 255, 255, .6), transparent 70%),
    linear-gradient(150deg, var(--green-pale), #fff);
  box-shadow: inset 0 0 0 1px rgba(79, 122, 61, .12);
  font: 500 12.5px/1.55 var(--font); letter-spacing: .01em; text-transform: none;
  color: var(--green);
}

.mt-rt__ph::before {
  content: ""; width: 32px; height: 32px; opacity: .55;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F7A3D' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4C9 5 4 11 4 20c9 0 15-5 16-16Z'/%3E%3Cpath d='M4 20C8 14 13 10 19 8'/%3E%3C/svg%3E");
}

/* --- B. intro + F. organic (shared 2-col grid) --- */
.mt-rt__intro { padding: 84px 24px 30px; }

.mt-rt__organic { padding: 40px 24px 10px; }

.mt-rt__intro-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.mt-rt__intro-grid h2 { font-size: clamp(26px, 3vw, 36px); margin: 16px 0 16px; }

.mt-rt__intro-grid p { color: var(--text-muted); max-width: 52ch; }

.mt-rt__intro-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0 0; }

.mt-rt__intro-links a { font-weight: 500; }

.mt-rt__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.mt-rt__badges span {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-pill); padding: 10px 16px;
  font: 600 12px/1 var(--font); color: var(--green);
  letter-spacing: .06em; text-transform: uppercase;
}

/* --- C. preparation steps --- */
.mt-rt__prepare { padding: 54px 24px 20px; }

.mt-rt__steps {
  list-style: none; margin: 0 0 26px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}

.mt-rt__step {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-card); padding: 22px 18px;
  box-shadow: 0 6px 18px rgba(14, 26, 15, .05);
  transition: translate .25s ease, box-shadow .25s ease;
}

.mt-rt__step:hover { translate: 0 -4px; box-shadow: var(--shadow-chip); }

.mt-rt__step-ico {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: var(--green-badge); color: var(--green);
  margin-bottom: 14px;
}

.mt-rt__step-ico svg { width: 22px; height: 22px; }

.mt-rt__step b { display: block; font: 600 15px/1.3 var(--font); margin-bottom: 6px; }

.mt-rt__step p { color: var(--text-muted); font-size: 13px; margin: 0; }

.mt-rt__prepare-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: stretch; }

.mt-rt__tips {
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-card); padding: 26px 28px;
  box-shadow: var(--shadow-card);
}

.mt-rt__tips h3 { font-size: 17px; margin: 0 0 14px; }

.mt-rt__tips p { color: var(--text-muted); font-size: 13.5px; margin: 0 0 12px; }

.mt-rt__tips p:last-child { margin-bottom: 0; }

.mt-rt__tips b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.mt-rt__howto-video { border-radius: var(--r-card); overflow: hidden; min-height: 240px; display: grid; }

.mt-rt__howto-video video { width: 100%; height: 100%; object-fit: cover; display: block; }

.mt-rt__ph--video { background: linear-gradient(135deg, var(--green-pale), #fff); min-height: 240px; }

/* --- D. moments rail (horizontal scroll + snap) --- */
.mt-rt__moments { padding: 64px 0 30px; }

.mt-rt__rail {
  display: flex; gap: 20px;
  padding: 6px max(24px, calc((100vw - var(--maxw)) / 2 + 24px)) 26px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: rgba(79, 122, 61, .4) transparent;
}

.mt-rt__moment {
  flex: 0 0 320px; scroll-snap-align: start;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-card); padding: 16px 16px 20px;
  box-shadow: 0 6px 18px rgba(14, 26, 15, .05);
  transition: translate .25s ease, box-shadow .25s ease;
}

.mt-rt__moment:hover { translate: 0 -4px; box-shadow: var(--shadow-chip); }

.mt-rt__moment .mt-rt__photo { aspect-ratio: 20 / 13; margin-bottom: 16px; border-radius: 14px; }

.mt-rt__moment h3 { font-size: 18px; margin: 0 6px 8px; }

.mt-rt__moment p { color: var(--text-muted); font-size: 13.5px; margin: 0 6px 14px; }

.mt-rt__howline {
  display: inline-block; margin: 0 6px;
  background: var(--green-badge); color: var(--green);
  border-radius: var(--r-pill); padding: 8px 13px;
  font: 500 11.5px/1.3 var(--font);
}

/* --- E. 7-day planner --- */
.mt-rt__week { padding: 60px 24px 20px; }

.mt-rt__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }

.mt-rt__day {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 16px; padding: 16px 14px;
  transition: translate .25s ease, box-shadow .25s ease;
}

.mt-rt__day:hover { translate: 0 -3px; box-shadow: var(--shadow-chip); }

.mt-rt__day span { display: block; font: 700 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }

.mt-rt__day b { display: block; font: 600 13.5px/1.3 var(--font); margin-bottom: 5px; }

.mt-rt__day p { color: var(--text-muted); font-size: 12px; line-height: 1.5; margin: 0; }

.mt-rt__dl { text-align: center; margin: 28px 0 0; }

/* --- G. recipes --- */
.mt-rt__recipes { padding: 64px 24px 20px; }

.mt-rt__recipe-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.mt-rt__recipe {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-card); padding: 14px 16px 20px;
  box-shadow: 0 6px 18px rgba(14, 26, 15, .05);
  transition: translate .25s ease, box-shadow .25s ease;
}

.mt-rt__recipe:hover { translate: 0 -4px; box-shadow: var(--shadow-chip); }

.mt-rt__recipe .mt-rt__photo { aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: 14px; }

.mt-rt__recipe h3 { font-size: 16.5px; margin: 0 4px 6px; }

.mt-rt__ing { color: var(--green); font: 500 12px/1.5 var(--font); margin: 0 4px 10px; }

.mt-rt__recipe ol { margin: 0; padding: 0 4px 0 20px; color: var(--text-muted); font-size: 13px; }

.mt-rt__recipe li { margin-bottom: 4px; }

/* --- H. FAQ: smooth open --- */
.mt-rt__faq { padding: 64px 24px 10px; }

.mt-rt__faq .mt-acc__body { animation: mt-rt-acc .35s cubic-bezier(.22, 1, .36, 1); }

@keyframes mt-rt-acc { from { opacity: 0; translate: 0 -6px; } }

/* --- I. closing CTA + disclaimer --- */
.mt-rt__cta { padding: 56px 24px 90px; text-align: center; }

.mt-rt__cta-card {
  max-width: 560px; margin: 0 auto 28px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--r-story); padding: 44px 36px;
  box-shadow: var(--shadow-card);
}

.mt-rt__cta-card h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 8px; }

.mt-rt__cta-card p { color: var(--text-muted); margin: 0 0 24px; }

.mt-rt__cta-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

.mt-rt__disclaimer { max-width: 60ch; margin: 0 auto; color: var(--text-muted); font-size: 12px; }

/* --- light parallax on lifestyle photos (reuses the story keyframes) --- */
@supports (animation-timeline: view()) {
.mt-rt__intro-grid .mt-rt__photo > *,
.mt-rt__organic .mt-rt__photo > * {
    animation: mt-tl-parallax linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
}

@media (max-width: 1080px) {
.mt-rt__steps { grid-template-columns: repeat(3, 1fr); }
.mt-rt__days { grid-template-columns: repeat(4, 1fr); }
.mt-rt__recipe-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
.mt-rt__hero { margin-top: -92px; min-height: 72svh; }
.mt-rt__nav { top: 84px; justify-content: flex-start; }
.mt-rt__intro-grid { grid-template-columns: 1fr; gap: 28px; }
.mt-rt__organic .mt-rt__intro-grid > :first-child { order: 2; }
/* text first on mobile */
.mt-rt__steps { grid-template-columns: repeat(2, 1fr); }
.mt-rt__prepare-grid { grid-template-columns: 1fr; }
.mt-rt__days { grid-template-columns: repeat(2, 1fr); }
.mt-rt__moment { flex-basis: 280px; }
}

@media (max-width: 560px) {
.mt-rt__recipe-grid { grid-template-columns: 1fr; }
.mt-rt__steps { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
html:has(.mt-rt) { scroll-behavior: auto; }
.mt-js .mt-rt-reveal { opacity: 1; translate: 0 0; transition: none; }
.mt-rt__steam i { animation: none; }
.mt-rt__step,
.mt-rt__moment,
.mt-rt__day,
.mt-rt__recipe { transition: none; }
.mt-rt__faq .mt-acc__body { animation: none; }
.mt-rt__photo > * { animation: none; }
.mt-rt__video { display: none; }
}

.mt-rt__step,
.mt-rt__tips,
.mt-rt__moment,
.mt-rt__day,
.mt-rt__recipe,
.mt-rt__cta-card,
.mt-rt__nav,
.mt-rt__badges span {
  background: var(--pane-bg);
  backdrop-filter: var(--pane-filter);
  -webkit-backdrop-filter: var(--pane-filter);
  border: var(--pane-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),   /* specular top edge */
    inset 0 -1px 0 rgba(255, 255, 255, .25),
    0 14px 34px rgba(14, 26, 15, .10);
}
