.soup-steam {
  display: none;
}

[data-motion="on"] .week-heading.week-entered::after {
  animation: week-rims 800ms var(--motion-ease) backwards;
}
[data-motion="on"] .week-day-row.week-entered .week-dish-photo {
  animation: week-open 720ms var(--motion-ease) backwards;
  animation-delay:calc(var(--day-order) * 22ms);
}
[data-motion="on"] .week-dish { transition:background-color 180ms,border-color 180ms,box-shadow 180ms; }
[data-motion="on"] .week-dish-photo { transition:transform 420ms var(--motion-ease); }
@media (hover:hover) {
  [data-motion="on"] .week-dish:hover .week-dish-photo { transform:none; }
}
[data-motion="on"] .week-dish:active .week-dish-photo { transform:none; }
@keyframes week-open { from { opacity:.88; transform:translateY(3px); } to { opacity:1; transform:translateY(0); } }
@keyframes week-rims { from { opacity:.6; transform:scale(.96); } to { opacity:1; transform:scale(1); } }

html[data-motion="on"] {
  --motion-ease: cubic-bezier(.2, .75, .25, 1);
  --motion-side: 1;
}

html[data-motion="on"][dir="rtl"] {
  --motion-side: -1;
}

[data-motion="on"] .hero .eyebrow-rule { animation:table-rule 650ms var(--motion-ease); }

[data-motion="on"] .hero-photo {
  animation: table-photo 1250ms var(--motion-ease) backwards;
}

[data-motion="on"] .arch-back {
  transform-origin: center 86%;
  animation: table-arch 1100ms var(--motion-ease) backwards;
}

[data-motion="on"] .art-sprig path {
  stroke-dasharray: 345;
  animation: table-draw 1250ms 150ms ease-out backwards;
}

[data-motion="on"] .soup-steam {
  position: absolute;
  display: block;
  width: 23%;
  height: 23%;
  top: 17%;
  left: 38%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  stroke: #fff7e4;
  stroke-width: 2.3px;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px #763c2133);
}

[data-motion="on"] .soup-steam path {
  opacity: 0;
  animation: table-steam 5.8s ease-in-out infinite;
  animation-play-state: paused;
}

[data-motion="on"][data-steam-active] .soup-steam path { animation-play-state: running; }

[data-motion="on"] .soup-steam path:nth-child(2) { animation-delay: 480ms; }
[data-motion="on"] .soup-steam path:nth-child(3) { animation-delay: 960ms; }

[data-motion="on"] .motion-entered .eyebrow-rule {
  transform-origin: left;
  animation: table-rule 700ms var(--motion-ease) backwards;
}

[dir="rtl"][data-motion="on"] .motion-entered .eyebrow-rule { transform-origin: right; }

[data-motion="on"] .support-panel.motion-entered .support-emblem svg {
  animation: table-heart 1200ms 160ms ease-in-out;
}

/* Each fresh day or month brings in a new row of meals. */
[data-motion="on"] .gtp-grid > .gtp-meal .gtp-photo {
  animation: table-meal 760ms var(--motion-ease) backwards;
}

[data-motion="on"] .gtp-grid > .gtp-meal:nth-child(2) .gtp-photo { animation-delay: 45ms; }
[data-motion="on"] .gtp-grid > .gtp-meal:nth-child(3) .gtp-photo { animation-delay: 90ms; }

[data-motion="on"] .gtp-day[aria-pressed="true"] {
  border-bottom-color: transparent;
}

[data-motion="on"] .gtp-day[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -3px;
  height: 3px;
  border-radius: 3px;
  background: var(--gtp-chosen);
  animation: table-rule 280ms var(--motion-ease) backwards;
}

[data-motion="on"] dialog[open]::backdrop {
  animation: table-backdrop 220ms ease-out;
}

[data-motion="on"] dialog[open] .modal-icon {
  animation: table-icon 460ms var(--motion-ease);
}

[data-motion="on"] :is(.story-link, .dish-tag, .card-action, .round-arrow, .button) .ico {
  transition: scale 310ms var(--motion-ease), translate 250ms var(--motion-ease);
}

[data-motion="on"] :is(.story-link, .dish-tag, .guide-card, .recipe-card):focus-visible .rtl-flip {
  translate: calc(3px * var(--motion-side)) 0;
}

[data-motion="on"] .button:focus-visible .ico { translate: 0 2px; }

@media (hover: hover) {
  [data-motion="on"] :is(.story-link, .dish-tag, .guide-card, .recipe-card):hover .rtl-flip {
    translate: calc(3px * var(--motion-side)) 0;
  }

  [data-motion="on"] .button:hover .ico { translate: 0 2px; }


  [data-motion="on"] .guide-card:hover .guide-icon svg {
    animation: table-icon 430ms var(--motion-ease);
  }
}

/* The switch stops both the new movement and the site's original smooth scrolling. */
html[data-motion="off"],
html[data-motion="off"] * {
  scroll-behavior: auto !important;
}

html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after,
html[data-motion="off"] dialog::backdrop {
  animation: none !important;
  transition: none !important;
}

html[data-motion="off"] :is(.guide-card, .recipe-card, .dish-tag, .button, .support-link):hover {
  transform: none;
}

@keyframes table-photo {
  from { opacity: .9; translate: 0 4px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes table-arch {
  from { rotate: calc(-2deg * var(--motion-side)); scale: .99; }
  to { rotate: 0deg; scale: 1; }
}

@keyframes table-draw {
  from { stroke-dashoffset: 345; }
  to { stroke-dashoffset: 0; }
}

@keyframes table-steam {
  0% { opacity: 0; transform: translate(0, 14px); }
  33% { opacity: .62; }
  66% { opacity: .33; }
  100% { opacity: 0; transform: translate(4px, -12px); }
}

@keyframes table-rule {
  from { scale: .18 1; }
  to { scale: 1 1; }
}

@keyframes table-icon {
  0% { rotate: -2deg; scale: .98; }
  62% { rotate: 1deg; scale: 1.025; }
  100% { rotate: 0deg; scale: 1; }
}

@keyframes table-heart {
  0%, 100% { scale: 1; }
  34% { scale: 1.04; }
  58% { scale: 1.01; }
  76% { scale: 1.015; }
}

@keyframes table-meal {
  from { opacity: .9; translate: 0 3px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes table-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Tie the reveal to the distance the visitor scrolls through the viewport. */
@supports (animation-timeline: view()) and (animation-range: entry 0% cover 25%) {
  html[data-motion="on"] :is(.recipe-card > img, .guide-cover) {
    animation: scroll-food-photo 1s linear both;
    animation-timeline: view(block);
    animation-range: entry 0% cover 36%;
  }
  html[data-motion="on"] body::before {
    content:"";
    position:fixed;
    z-index:100;
    inset:0 0 auto;
    height:3px;
    background:linear-gradient(90deg,#7d538e,#b390bb);
    pointer-events:none;
    transform-origin:left;
    animation:scroll-progress 1s linear both;
    animation-timeline:scroll(root block);
  }
  html[dir="rtl"][data-motion="on"] body::before { transform-origin:right; }
}
@keyframes scroll-food-photo {
  from { filter:brightness(.97); }
  to { filter:none; }
}
@keyframes scroll-progress {
  from { transform:scaleX(0); }
  to { transform:scaleX(1); }
}

[data-motion="on"] .plan-choice:has(:checked) .choice-mark { animation:table-icon 320ms var(--motion-ease); }
:is(.guide-card,.recipe-card,.button,.support-link,.dish-tag):hover { transform:none; }

/* A swap should draw the eye only to the dishes that changed. */
[data-motion="on"] .week-edited .gtp-grid > .gtp-meal .gtp-photo,
[data-motion="on"] .week-edited .week-day-row.week-entered .week-dish-photo,
[data-motion="on"] .week-edited .week-heading.week-entered::after { animation:none; }
[data-motion="on"] .week-edited .gtp-grid > .meal-updated .gtp-photo,
[data-motion="on"] .week-edited .meal-updated .week-dish {
  animation:meal-highlight 1250ms ease-out;
}
@keyframes meal-highlight {
  0% { box-shadow:0 0 0 1px #9777a499; }
  32% { box-shadow:0 0 0 3px #9777a457; }
  100% { box-shadow:0 0 0 4px #9777a400; }
}
[data-motion="on"] dialog[open] .detail-photo {
  animation:dish-appear 800ms var(--motion-ease);
}
@keyframes dish-appear {
  from { opacity:.86; }
  to { opacity:1; }
}
[data-motion="on"][data-steam-active] .art-sprig {
  transform-origin:center bottom;
  animation:sprig-sway 5s ease-in-out 2;
}
@keyframes sprig-sway {
  0%,100% { rotate:0deg; }
  50% { rotate:calc(1.5deg * var(--motion-side)); }
}

/* Move the intact text in whole pixels, preserving its normal rendering. */
[data-motion="on"] .hero-copy > :is(h1,.hero-lead),
[data-motion="on"] .motion-entered > :is(h2,h3,p),
[data-motion="on"] .recipe-card.motion-entered h3,
[data-motion="on"] .support-panel.motion-entered h2,
[data-motion="on"] .gtp-panel:not(.week-edited) .gtp-name,
[data-motion="on"] .meal-updated :is(.week-dish-name,.gtp-name),
[data-motion="on"] .week-heading.week-entered .week-title,
[data-motion="on"] dialog[open] #detail-body > :is(h2,h3,ol,ul) {
  position:relative;
  animation:text-settle 280ms steps(4,end) backwards;
}
[data-motion="on"] .hero-copy > .hero-lead,
[data-motion="on"] .section-intro.motion-entered > p,
[data-motion="on"] dialog[open] #detail-body > ol { animation-delay:60ms; }
@keyframes text-settle {
  from { top:4px; }
  to { top:0; }
}

/* =====================================================================
   Enhanced motion layer. Everything moving is gated on data-motion="on",
   so the Animations switch and reduced-motion settings still stop it all.
   ===================================================================== */

/* Soft colour wash behind the hero (static decoration). */
.hero { position: relative; isolation: isolate; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}
.hero::before {
  width: min(46vw, 620px);
  aspect-ratio: 1;
  inset-inline-end: -8vw;
  top: -14%;
  background: radial-gradient(circle, #e9dcef 0%, #e9dcef00 68%);
}
.hero::after {
  width: min(30vw, 380px);
  aspect-ratio: 1;
  inset-inline-start: -10vw;
  bottom: -22%;
  background: radial-gradient(circle, #f3e5d3 0%, #f3e5d300 70%);
}
[data-motion="on"][data-steam-active] .hero::before { animation: wash-drift 18s ease-in-out infinite alternate; }
[data-motion="on"][data-steam-active] .hero::after { animation: wash-drift 22s ease-in-out infinite alternate-reverse; }
@keyframes wash-drift {
  from { translate: 0 0; scale: 1; }
  to { translate: calc(-28px * var(--motion-side)) 22px; scale: 1.08; }
}

/* ---- Hero entrance: copy rises in line by line, then the dish arrives. ---- */
html[data-motion="on"] .hero .hero-copy > * {
  animation: rise-in 820ms var(--motion-ease) backwards;
}
html[data-motion="on"] .hero .hero-copy > h1 { animation: none; }
html[data-motion="on"] .hero .hero-copy > .eyebrow { animation-delay: 60ms; }
html[data-motion="on"] .hero .hero-copy > .hero-lead { animation-delay: 400ms; }
html[data-motion="on"] .hero .hero-copy > .hero-actions { animation-delay: 520ms; }

html[data-motion="on"] .hero .hero-photo {
  animation: photo-in 1100ms 120ms var(--motion-ease) backwards;
}
html[data-motion="on"] .hero .arch-back {
  animation: arch-in 1300ms 220ms var(--motion-ease) backwards;
}
html[data-motion="on"] .hero .dish-tag {
  animation:
    tag-in 760ms 760ms var(--motion-ease) backwards,
    tag-float 6.5s 1.8s ease-in-out infinite;
  animation-play-state: running, paused;
}
html[data-motion="on"][data-steam-active] .hero .dish-tag { animation-play-state: running, running; }
@media (hover: hover) {
  html[data-motion="on"] .hero .dish-tag:hover { animation-play-state: running, paused; }
}

@keyframes rise-in {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes photo-in {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes arch-in {
  from { opacity: 0; rotate: calc(-6deg * var(--motion-side)); scale: .94; }
  to { opacity: 1; rotate: 0deg; scale: 1; }
}
@keyframes tag-in {
  from { opacity: 0; translate: calc(-22px * var(--motion-side)) 6px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes tag-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

/* ---- Scroll reveals: cards and blocks rise gently, staggered per row. ---- */
html[data-motion="on"] :is(.guide-card, .recipe-card, .dessert-intro, .story-body, .support-panel).motion-entered {
  animation: reveal-up 760ms var(--motion-ease) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
html[data-motion="on"] #planner-app.motion-entered {
  animation: reveal-fade 900ms var(--motion-ease) backwards;
}
html[data-motion="on"] .section-intro.motion-entered .sprig-icon {
  animation: table-icon 900ms 200ms var(--motion-ease);
}
@keyframes reveal-up {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes reveal-fade {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---- Hover: calm photo zooms, an arrow that fills in. ---- */
@media (hover: hover) {
  .round-arrow { transition: background-color 220ms, color 220ms, border-color 220ms; }
  .recipe-card:hover .round-arrow { background: var(--plum); border-color: var(--plum); color: #fff; }
  [data-motion="on"] .brand:hover .brand-mark { animation: table-icon 520ms var(--motion-ease); }
  [data-motion="on"] .support-link:hover .ico { animation: table-heart 900ms ease-in-out; }
}

/* ---- Dialog opens with a soft lift; mobile menu drops in. ---- */
[data-motion="on"] dialog[open] { animation: dialog-in 380ms var(--motion-ease); }
@keyframes dialog-in {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}

@media (max-width: 760px) {
  [data-motion="on"] .nav-links.is-open { animation: menu-drop 280ms var(--motion-ease); }
  [data-motion="on"] .nav-links.is-open > * { animation: rise-in 360ms var(--motion-ease) backwards; }
  [data-motion="on"] .nav-links.is-open > :nth-child(2) { animation-delay: 40ms; }
  [data-motion="on"] .nav-links.is-open > :nth-child(3) { animation-delay: 80ms; }
  [data-motion="on"] .nav-links.is-open > :nth-child(4) { animation-delay: 120ms; }
  [data-motion="on"] .nav-links.is-open > :nth-child(5) { animation-delay: 160ms; }
}
@keyframes menu-drop {
  from { opacity: 0; translate: 0 -8px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---- Recipe book: the panel unfolds instead of snapping open. ---- */
@supports (interpolate-size: allow-keywords) {
  [data-motion="on"] .recipe-book { interpolate-size: allow-keywords; }
  [data-motion="on"] .recipe-book::details-content {
    height: 0;
    overflow: clip;
    transition: height 460ms var(--motion-ease), content-visibility 460ms allow-discrete;
  }
  [data-motion="on"] .recipe-book[open]::details-content { height: auto; }
}
[data-motion="on"] .recipe-book[open] .book-content { animation: reveal-fade 420ms var(--motion-ease); }

/* ---- Donations: a slow ring signals “coming soon”. ---- */
[data-motion="on"] .support-panel.motion-entered .status-dot::after {
  animation: dot-ring 2.8s 600ms ease-out infinite;
}
@keyframes dot-ring {
  from { opacity: .7; scale: 1; }
  to { opacity: 0; scale: 2.8; }
}

/* ---- Text: headings arrive word by word, coming softly into focus. ---- */
.split-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  /* Screen readers still read it, but copying a heading gives the words only once. */
  -webkit-user-select: none;
  user-select: none;
}
.split-words .word { display: inline-block; }
html[data-motion="on"] .split-text.split-text.split-text { animation: none; top: 0; }

html[data-motion="on"] .hero .split-words .word {
  animation: word-in 950ms var(--motion-ease) backwards;
  animation-delay: calc(140ms + var(--wi) * 95ms);
}
html[data-motion="on"] .motion-entered .split-words .word {
  animation: word-in 820ms var(--motion-ease) backwards;
  animation-delay: calc(80ms + var(--wi) * 65ms);
}
@keyframes word-in {
  from { opacity: 0; translate: 0 .42em; }
  to { opacity: 1; translate: 0 0; }
}

/* Keep the hero heading out of sight for the instant before it is split,
   with a CSS fallback that shows it anyway if the script never runs. */
html[data-motion="on"] .hero h1:not(:has(.split-words)) {
  opacity: 0;
  animation: show-anyway 1ms 1.2s forwards;
}
@keyframes show-anyway { to { opacity: 1; } }

/* A hand-drawn line sweeps under “eat today?” once the words land. */
.hero h1 em { position: relative; }
.hero h1 em::after {
  content: "";
  position: absolute;
  inset-inline: 2% 4%;
  bottom: -.06em;
  height: .2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9C40 3 80 3 118 7s58 4 80-2' fill='none' stroke='%23b597bf' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
html[data-motion="on"] .hero h1 em::after {
  animation: swash-draw 900ms 1.05s var(--motion-ease) backwards;
}
@keyframes swash-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
[dir="rtl"] .hero h1 em::after { transform: scaleX(-1); }

/* Small uppercase labels open their letter spacing as they appear (English only:
   spacing out Arabic letters would break how they join). */
html[dir="ltr"][data-motion="on"] .motion-entered > .eyebrow > span:last-child,
html[dir="ltr"][data-motion="on"] .hero .hero-copy > .eyebrow > span:last-child {
  animation: tracking-in 900ms 100ms var(--motion-ease) backwards;
}
@keyframes tracking-in {
  from { opacity: 0; letter-spacing: .6em; }
  to { opacity: 1; }
}

/* =====================================================================
   Hero text: the lead paragraph flows in word by word, "eat today?"
   catches a slow shimmer of light, and the underline redraws on hover.
   ===================================================================== */
html[data-motion="on"] .hero .hero-lead .split-words .word {
  animation: word-soft 700ms var(--motion-ease) backwards;
  animation-delay: calc(480ms + var(--wi) * 22ms);
}
@keyframes word-soft {
  from { opacity: 0; translate: 0 .5em; }
  to { opacity: 1; translate: 0 0; }
}

/* Room around each italic word so the light never clips a letter. */
html[data-motion="on"] .hero h1 em .split-words .word {
  padding: .1em .09em .14em;
  margin: -.1em -.09em -.14em;
  color: transparent;
  background: linear-gradient(100deg, #806189 0 38%, #d2b3dc 50%, #806189 62% 100%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation-name: word-in, text-shimmer;
  animation-duration: 950ms, 7s;
  animation-timing-function: cubic-bezier(.2, .75, .25, 1), ease-in-out;
  animation-fill-mode: backwards, none;
  animation-iteration-count: 1, infinite;
  animation-delay: calc(140ms + var(--wi) * 95ms), calc(2.4s + var(--wi) * 140ms);
  animation-play-state: running, paused;
}
html[data-motion="on"][data-steam-active] .hero h1 em .split-words .word { animation-play-state: running, running; }
@keyframes text-shimmer {
  0%, 55% { background-position: 100% 0; }
  85%, 100% { background-position: 0 0; }
}
@media (hover: hover) {
  html[data-motion="on"] .hero h1:hover em::after { animation: swash-redraw 800ms var(--motion-ease); }
  /* Words only change colour on hover. Lifting them made the title jitter when the
     pointer sat on a word's edge (the word moved away, then back, again and again). */
  html[data-motion="on"] .hero h1 > span .word { transition: color 300ms; }
  html[data-motion="on"] .hero h1 > span .word:hover { color: #654776; }
}
@keyframes swash-redraw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* "Find a meal" gives a gentle downward nudge now and then. */
html[data-motion="on"] .hero .button .ico {
  animation: arrow-nudge 4.5s 2.6s ease-in-out infinite;
  animation-play-state: paused;
}
html[data-motion="on"][data-steam-active] .hero .button .ico { animation-play-state: running; }
@keyframes arrow-nudge {
  0%, 70%, 100% { translate: 0 0; }
  78% { translate: 0 4px; }
  86% { translate: 0 0; }
  92% { translate: 0 2px; }
}

/* =====================================================================
   Hover actions for every button and link-button on the site.
   Colour changes always apply; movement only when animations are on.
   ===================================================================== */
.button, .support-link, .inline-recipe, .gtp-recipe { position: relative; overflow: hidden; isolation: isolate; }

@media (hover: hover) {
  /* Pill buttons: lift, deepen, and a sweep of light passes across. */
  :is(.button, .support-link, .inline-recipe, .week-swap):hover { box-shadow: 0 8px 18px #4e355d33; }
  [data-motion="on"] :is(.button, .support-link, .inline-recipe, .week-swap, .gtp-recipe) { transition: background-color 200ms, color 200ms, border-color 200ms, box-shadow 250ms, translate 250ms var(--motion-ease), scale 150ms; }
  [data-motion="on"] :is(.button, .support-link, .inline-recipe, .week-swap, .gtp-recipe):hover { translate: 0 -2px; }
  [data-motion="on"] :is(.button, .support-link, .inline-recipe, .gtp-recipe)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, #fff0 30%, #ffffff38 50%, #fff0 70%) -150% 0 / 220% 100% no-repeat;
    pointer-events: none;
  }
  [data-motion="on"] :is(.button, .support-link, .inline-recipe, .gtp-recipe):hover::before { animation: button-sweep 750ms ease-out; }
  [data-motion="on"] .hero .button:hover .ico { animation: none; }
  [data-motion="on"] :is(.inline-recipe, .gtp-recipe) .ico,
  [data-motion="on"] .gtp-recipe-arrow { display: inline-block; transition: translate 250ms var(--motion-ease); }
  [data-motion="on"] :is(.inline-recipe, .gtp-recipe):hover :is(.ico, .gtp-recipe-arrow) { translate: calc(4px * var(--motion-side)) 0; }
  .week-swap { transition: background-color 200ms, border-color 200ms; }
  .week-swap:hover { background: #e6d6ea; border-color: #b99cc3; }

  /* Text links: an underline that slides in, with the arrow pushing ahead. */
  .story-link { position: relative; }
  .story-link::after {
    content: "";
    position: absolute;
    inset-inline: 0 24px;
    bottom: -3px;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(.2, .75, .25, 1);
  }
  [dir="rtl"] .story-link::after { transform-origin: right; }
  .story-link:hover { text-decoration: none; }
  .story-link:hover::after { transform: scaleX(1); }
  [data-motion="on"] :is(.book-recipe, .related-recipe, .back-to-guide) .ico { transition: translate 250ms var(--motion-ease); }
  [data-motion="on"] :is(.book-recipe, .related-recipe):hover .ico { translate: calc(4px * var(--motion-side)) 0; }
  [data-motion="on"] .back-to-guide:hover .ico { translate: calc(-4px * var(--motion-side)) 0; }
  [data-motion="on"] .back-top { display: inline-block; transition: translate 250ms var(--motion-ease); }
  [data-motion="on"] .back-top:hover { translate: 0 -3px; }

  /* Header controls. */
  .lang-btn, .menu-btn, .brand { transition: color 200ms; }
  .lang-btn:hover, .menu-btn:hover, .brand:hover { color: var(--plum); }
  [data-motion="on"] .lang-btn:hover .ico { animation: globe-spin 800ms var(--motion-ease); }
  [data-motion="on"] .menu-btn .ico { transition: scale 220ms var(--motion-ease); }
  [data-motion="on"] .menu-btn:hover .ico { scale: 1.15; }
  .motion-button:hover { border-color: #b99cc3; }
  [data-motion="on"] .motion-button:hover .ico { animation: table-icon 450ms var(--motion-ease); }

  /* Recipe tag on the hero photo. */
  .dish-tag { transition: border-color 220ms, box-shadow 250ms; }
  .dish-tag:hover { border-color: #c5aecd; box-shadow: 0 10px 24px #41304422; }
  .tag-icon { transition: background-color 250ms, color 250ms; }
  .dish-tag:hover .tag-icon { background: var(--plum); color: #fff; }
  [data-motion="on"] .dish-tag:hover .tag-icon svg { animation: table-icon 500ms var(--motion-ease); }

  /* Cards. */
  .guide-card h3, .recipe-info h3 { transition: color 220ms; }
  .guide-card:hover h3, .recipe-card:hover h3 { color: var(--plum); }
  .guide-icon { transition: background-color 250ms, color 250ms; }
  .guide-card:hover .guide-icon { background: var(--tone); color: #fff; }
  [data-motion="on"] .card-action .ico { transition: translate 250ms var(--motion-ease); }

  /* Recipe book. */
  [data-motion="on"] .recipe-book summary:hover .book-heading .ico { animation: table-icon 500ms var(--motion-ease); }
  [data-motion="on"] .recipe-book:not([open]) summary:hover .book-chevron { animation: chevron-bob 700ms ease-in-out; }

  /* Dialog close button. */
  .dialog-close { transition: background-color 200ms, border-color 200ms, rotate 300ms cubic-bezier(.2, .75, .25, 1); }
  .dialog-close:hover { background: var(--lavender); border-color: #b99cc3; }
  [data-motion="on"] .dialog-close:hover { rotate: 90deg; }

  /* Meal planner controls. */
  .meal-swap { transition: color 200ms; }
  .meal-swap:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
  .sweet-choice { transition: border-color 200ms, background-color 200ms, box-shadow 250ms, translate 250ms; }
  .sweet-choice:hover { border-color: #b99cc3; background: #fff; box-shadow: 0 6px 14px #452c5114; }
  .food-check { transition: border-color 200ms, background-color 200ms; }
  .food-check:hover { border-color: #b99cc3; background: #f8f3f9; }
  [data-motion="on"] .plan-choice:hover .choice-mark { animation: table-icon 400ms var(--motion-ease); }
  [data-motion="on"] :is(.gtp-month, .gtp-day) { transition: background-color 200ms, color 200ms, translate 220ms var(--motion-ease); }
  [data-motion="on"] :is(.gtp-month, .gtp-day)[aria-pressed="false"]:hover { translate: 0 -2px; }
  .more-foods summary { transition: color 200ms; }
  .more-foods summary:hover { color: var(--plum); }
}
@keyframes button-sweep {
  from { background-position: -150% 0; }
  to { background-position: 250% 0; }
}
@keyframes globe-spin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}
@keyframes chevron-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 4px; }
}

/* =====================================================================
   Luxurious text: every heading, paragraph and label unveils slowly,
   in sequence, as its section comes into view.
   ===================================================================== */
html[data-motion="on"] {
  --lux-ease: cubic-bezier(.16, .84, .3, 1);
}

/* Headings and card titles: words rise into place, after their card. */
html[data-motion="on"] body .motion-entered .split-words .word {
  animation: word-in 1100ms var(--lux-ease) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 120ms + var(--wi) * 70ms);
}

/* Paragraphs: each word glows in, in reading order, once the heading has begun. */
html[data-motion="on"] .split-para.split-para.split-para { animation: none; top: 0; }
html[data-motion="on"] .motion-entered .pw {
  animation: word-glow 1200ms var(--lux-ease) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 380ms + var(--wi) * 26ms);
}
html[data-motion="on"] .footer-wrap.motion-entered .pw { animation-delay: calc(250ms + var(--wi) * 30ms); }
@keyframes word-glow {
  from { opacity: 0; color: #b49fbb; }
  45% { opacity: 1; }
  to { opacity: 1; }
}

/* Small labels and details settle in after the main text. */
html[data-motion="on"] .motion-entered :is(.recipe-info small, .card-action, .fund-status, .round-arrow) {
  animation: rise-in 900ms var(--lux-ease) backwards;
  animation-delay: calc(var(--reveal-delay, 0ms) + 520ms);
}
html[data-motion="on"] .motion-entered > .eyebrow,
html[data-motion="on"] .support-panel.motion-entered .eyebrow {
  animation: rise-in 900ms var(--lux-ease) backwards;
}
html[dir="ltr"][data-motion="on"] .support-panel.motion-entered .eyebrow,
html[dir="ltr"][data-motion="on"] .story-intro.motion-entered > .eyebrow > span:last-child {
  animation: tracking-in 1100ms var(--lux-ease) backwards;
}

/* Footer: brand, note and link arrive one after another. */
html[data-motion="on"] .footer-wrap.motion-entered > * { animation: rise-in 900ms var(--lux-ease) backwards; }
html[data-motion="on"] .footer-wrap.motion-entered > .footer-note { animation: none; }
html[data-motion="on"] .footer-wrap.motion-entered > :nth-child(3) { animation-delay: 300ms; }

/* Header: brand and links drift down in turn when the page opens. */
@media (min-width: 761px) {
  html[data-motion="on"] .topbar :is(.brand, .nav-links > *, .nav-actions > *) {
    animation: menu-drop 900ms var(--lux-ease) backwards;
  }
  html[data-motion="on"] .topbar .nav-links > :nth-child(1) { animation-delay: 80ms; }
  html[data-motion="on"] .topbar .nav-links > :nth-child(2) { animation-delay: 140ms; }
  html[data-motion="on"] .topbar .nav-links > :nth-child(3) { animation-delay: 200ms; }
  html[data-motion="on"] .topbar .nav-links > :nth-child(4) { animation-delay: 260ms; }
  html[data-motion="on"] .topbar .nav-links > :nth-child(5) { animation-delay: 320ms; }
  html[data-motion="on"] .topbar .nav-actions > :nth-child(1) { animation-delay: 380ms; }
  html[data-motion="on"] .topbar .nav-actions > :nth-child(2) { animation-delay: 440ms; }
}
@media (max-width: 760px) {
  html[data-motion="on"] .topbar :is(.brand, .nav-actions) { animation: menu-drop 900ms var(--lux-ease) backwards; }
  html[data-motion="on"] .topbar .nav-actions { animation-delay: 150ms; }
}

/* Recipe and guide pop-ups: content unfolds line by line, each time it changes. */
html[data-motion="on"] dialog[open] #detail-body > * {
  animation: rise-in 800ms var(--lux-ease) backwards;
}
html[data-motion="on"] dialog[open] #detail-body > :nth-child(2) { animation-delay: 70ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(3) { animation-delay: 140ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(4) { animation-delay: 210ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(5) { animation-delay: 280ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(6) { animation-delay: 350ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(7) { animation-delay: 420ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(8) { animation-delay: 490ms; }
html[data-motion="on"] dialog[open] #detail-body > :nth-child(n + 9) { animation-delay: 560ms; }
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li {
  animation: word-glow 900ms var(--lux-ease) backwards;
  animation-delay: 300ms;
}
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li:nth-child(2) { animation-delay: 360ms; }
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li:nth-child(3) { animation-delay: 420ms; }
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li:nth-child(4) { animation-delay: 480ms; }
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li:nth-child(5) { animation-delay: 540ms; }
html[data-motion="on"] dialog[open] #detail-body :is(ol, ul) > li:nth-child(n + 6) { animation-delay: 600ms; }

/* Dietitian cards rise in like the other cards. */
html[data-motion="on"] :is(.diet-tips, .diet-guide).motion-entered {
  animation: reveal-up 760ms var(--motion-ease) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
html[data-motion="on"] .diet-meal[open] .diet-meal-body { animation: reveal-fade 420ms var(--motion-ease); }

/* Trial accent: thick lines in honey yellow */
[data-motion="on"] .gtp-day[aria-pressed="true"]::after { background: var(--accent, #654776); }
@supports (animation-timeline: view()) and (animation-range: entry 0% cover 25%) {
  html[data-motion="on"] body::before { background: linear-gradient(90deg, #e8bf4f, var(--accent)); }
}

/* Home page cards rise in one after another. */
html[data-motion="on"] .home-grid > li.motion-entered { animation: reveal-up 760ms var(--motion-ease) backwards; animation-delay: var(--reveal-delay, 0ms); }
