/* References: books, scientific study bento, stacked sources, channels. Extends ../style.css.
   Apple-design pass: tracking by size, bright top edges, physical stack, hover physics that never shifts layout,
   springs (page.js) for anything pointer-driven; CSS only for hover/focus affordances. */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.books__actions .btn, .band .btn { min-height: 48px; }
.btn svg { flex: none; }
/* Deep button for light lavender surfaces (white-on-accent is too faint there). */
.btn--deep { background: var(--card-ink); color: var(--white); }
@media (hover: hover) { .btn--deep:hover { background: var(--ink-soft); } }
/* The global white focus ring disappears on light lavender cards; use the deep ink there. */
.card :focus-visible { outline-color: var(--card-ink); }

/* ---------- Statement: the quote as a scrub line ---------- */
.statement { padding-block: clamp(56px, 9vw, 120px); }
.statement__inner { display: grid; gap: 20px; }
.statement .eyebrow { margin: 0; }
.statement__q { margin: 0; }
/* Tracking follows size: display tightness up to 80px, hero tightness beyond. */
.statement__q p { margin: 0; max-width: 13em; font-size: clamp(2.3rem, 7vw, 5.75rem); font-weight: 500; line-height: 1; letter-spacing: var(--track-display); text-shadow: 0 2px 30px rgba(var(--tint-rgb), 0.4); }
@media (min-width: 900px) {
  .statement__inner { grid-template-columns: 11rem 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
  .statement .eyebrow { padding-top: 1.4em; }
}
@media (min-width: 1150px) {
  .statement__q p { letter-spacing: var(--track-hero); }
}

/* ---------- Book picks: card overlapped by an offset photo ---------- */
.books { padding-block: clamp(72px, 10vw, 150px); }
.books__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
/* Larger surface, deeper shadow, bright top edge. page.js tilts the card a hair toward the pointer (transform only). */
.card.books__card { grid-column: 1 / -1; grid-row: 1; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: none; margin: 0; min-height: 0;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 5vw, 64px) 72px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 40px 80px -48px rgba(var(--tint-rgb), 0.95); }
.books__label { margin: 0; font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--item-ink); }
.books__title { margin: 0; max-width: 11ch; font-size: clamp(2.4rem, 5.4vw, 4.5rem); font-weight: 500; line-height: 0.96; letter-spacing: var(--track-display); color: var(--card-ink); }
.books__text { max-width: 36rem; }
.books__text p { margin: 0; font-size: clamp(1rem, 1.3vw, 1.125rem); }
.books__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.books__actions .btn svg { transition: transform var(--dur-spring) var(--ease-spring); }
.books__meta { font-family: var(--font-body); font-size: 14px; letter-spacing: var(--track-body); color: var(--item-ink); }
.books__photo { grid-column: 4 / -1; grid-row: 2; z-index: 3; margin: -3.5rem 0 0; position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: var(--radius-card); rotate: 2.5deg;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.16), 0 40px 80px -36px rgba(var(--tint-rgb), 0.95); }
.books__photo img { position: absolute; inset: -2.5% 0; width: 100%; height: 105%; object-fit: cover; object-position: 42% top; will-change: transform; }
@media (min-width: 900px) {
  .card.books__card { grid-column: 1 / 9; padding-bottom: clamp(32px, 5vw, 64px); padding-right: clamp(32px, 9vw, 120px); }
  .books__photo { grid-column: 8 / -1; grid-row: 1; margin: -3rem 0; aspect-ratio: 4 / 5; }
  .books__photo img { object-position: 44% top; }
}
@media (hover: hover) {
  .books__actions .btn:hover svg { transform: translate(2px, -2px); }
}

/* ---------- Scientific study: gapless bento ---------- */
.study { padding-top: clamp(40px, 6vw, 80px); }
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; grid-auto-flow: dense; grid-auto-rows: minmax(300px, auto); gap: clamp(12px, 1.6vw, 20px); }
.bento__cell { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden; min-width: 0;
  padding: clamp(22px, 2.6vw, 32px); border-radius: var(--radius-card); background: var(--bg-deep); color: var(--white);
  box-shadow: 0 30px 60px -40px rgba(var(--tint-rgb), 0.9); }
/* The picture sits inside the clipped cell. Hover physics: scale only (transform), slow ease-out, no layout shift.
   page.js adds a spring-driven pointer parallax through the independent `translate` property. */
.bento__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; transition: transform var(--dur-slow) var(--ease); }
/* Side headroom (-3%) lets the parallax travel without ever exposing the cell background. */
.bento__media img { position: absolute; inset: -3% -2%; width: 104%; height: 106%; object-fit: cover; will-change: transform; }
/* Scrim keeps white text above 4.5:1 over any part of the picture. */
.bento__cell::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--tint-rgb), 0.5) 0%, rgba(var(--tint-rgb), 0.82) 42%, rgba(46, 23, 88, 0.95) 100%); transition: opacity var(--dur-spring) var(--ease); }
/* Bright top edge + hairline ring. Drawn above the picture (an inset shadow on the cell itself would be painted under it). */
.bento__cell::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; opacity: 0.8;
  box-shadow: var(--edge-top), var(--edge-ring); transition: opacity var(--dur-spring) var(--ease); }
.bento__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); box-shadow: var(--edge-top), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: background-color var(--dur-hover) var(--ease), transform var(--dur-spring) var(--ease-spring); }
.bento__title { margin: 0; font-size: clamp(1.4rem, 1.9vw, 1.65rem); font-weight: 500; line-height: 1.05; letter-spacing: var(--track-title); }
.bento__text { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.5; letter-spacing: var(--track-body); color: rgba(255, 255, 255, 0.95); }
@media (hover: hover) {
  .bento__cell:hover .bento__media { transform: scale(1.045); }
  .bento__cell:hover::before { opacity: 0.88; }
  .bento__cell:hover::after { opacity: 1; }
  .bento__cell:hover .bento__icon { background: var(--accent); transform: scale(1.06); }
}

@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__cell--a, .bento__cell--f { grid-column: span 2; }
  .bento__cell--a { min-height: 440px; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(320px, auto); }
  .bento__cell--a { grid-column: 1 / 3; grid-row: 1 / 3; min-height: 0; padding: clamp(32px, 3.4vw, 48px); }
  .bento__cell--b { grid-column: 3; grid-row: 1; }
  .bento__cell--c { grid-column: 4; grid-row: 1; }
  .bento__cell--d { grid-column: 3; grid-row: 2; }
  .bento__cell--e { grid-column: 4; grid-row: 2; }
  .bento__cell--f { grid-column: 1 / -1; grid-row: 3; }
  .bento__cell--a .bento__icon { width: 56px; height: 56px; }
  .bento__cell--a .bento__title { font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 0.95; letter-spacing: var(--track-display); max-width: 9ch; }
  .bento__cell--a .bento__text { max-width: 30ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
  .bento__cell--f::before { background: linear-gradient(90deg, rgba(46, 23, 88, 0.95) 0%, rgba(var(--tint-rgb), 0.86) 40%, rgba(var(--tint-rgb), 0.2) 70%, rgba(var(--tint-rgb), 0.05) 100%); }
  .bento__cell--f .bento__media img { object-position: center 50%; }
  .bento__cell--f .bento__title, .bento__cell--f .bento__text { max-width: 24rem; }
  .bento__cell--f .bento__title { font-size: clamp(1.8rem, 2.8vw, 2.5rem); letter-spacing: var(--track-display); }
}

/* ---------- Meditation facts: pinned intro + stacking source cards ---------- */
.facts { padding-block: clamp(72px, 10vw, 150px); }
.facts__split { --stack-top: clamp(84px, 12vh, 112px); --stack-step: clamp(42px, 5.8vh, 56px); --stack-gap: clamp(28px, 6vh, 64px); --facts-gap: clamp(48px, 8vw, 96px);
  position: relative; display: grid; gap: var(--facts-gap); }
.facts__lead { margin: 24px 0 0; font-family: var(--font-body); font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; letter-spacing: var(--track-body); color: var(--white); max-width: 32rem; }
.facts__sub { margin: clamp(28px, 4vw, 40px) 0 14px; font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: var(--track-caps); text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.facts__videos { max-width: 26rem; }
.med__thumb--plain { display: grid; place-items: center; border-radius: 16px; background: radial-gradient(90% 90% at 30% 20%, var(--accent) 0%, var(--dial) 45%, var(--ink-soft) 100%); }
.med__thumb--plain::before { content: ''; width: 0; height: 0; border-left: 16px solid var(--white); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; opacity: 0.92; transition: transform var(--dur-spring) var(--ease-spring); }
.med__thumb--plain .med__badge { background: rgba(var(--tint-rgb), 0.55); }
.med:focus-visible { outline-offset: 3px; border-radius: 16px; }
/* Play affordances answer the hover / focus; the button itself is pressed by the shared layer (scale + dim on pointer-down). */
.med__play { transition: transform var(--dur-spring) var(--ease-spring); }
@media (hover: hover) {
  .med:hover .med__play { transform: scale(1.1); }
  .med:hover .med__thumb--plain::before { transform: scale(1.14); }
}
.med:focus-visible .med__play { transform: scale(1.1); }

@media (min-width: 980px) {
  .facts__split { grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 980px) and (min-height: 800px) {
  .facts__intro { position: sticky; top: clamp(88px, 11vh, 120px); }
}

/* Wayfinding: a slim rail in the gutter lights one segment per source as its card arrives (page.js builds it). */
.stack-rail { display: none; }
@media (min-width: 980px) and (prefers-reduced-motion: no-preference) {
  .stack-rail { display: block; position: absolute; top: 0; bottom: 0; left: calc(27rem + var(--facts-gap) / 2 - 1.5px); width: 3px; pointer-events: none; }
  .stack-rail__sticky { position: sticky; top: var(--stack-top); display: flex; flex-direction: column; gap: 4px; height: min(56vh, 440px); }
  .stack-rail__seg { flex: 1 1 0; min-height: 0; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.22); }
  .stack-rail__fill { display: block; width: 100%; height: 100%; background: var(--white); transform: scaleY(0); transform-origin: 50% 0; }
}

.stack { list-style: none; margin: 0; padding: 0; display: block; }
/* Origin is the centre so the independent `scale` of the pointer press is centred too; page.js adds a compensating
   translate to the stack scale so cards still recede from their top edge. */
.fact { position: relative; margin: 0 0 16px; padding: clamp(10px, 1.4vw, 14px) clamp(22px, 3vw, 36px) clamp(22px, 3vw, 32px); border-radius: var(--radius-card);
  background: var(--card); color: var(--card-ink); transform-origin: 50% 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 -14px 40px -22px rgba(var(--tint-rgb), 0.55), 0 40px 70px -44px rgba(var(--tint-rgb), 0.95), inset 0 0 0 1px rgba(var(--tint-rgb), 0.1);
  transition: background-color var(--dur-hover) var(--ease); }
.fact:last-child { margin-bottom: 0; }
.fact__name { margin: 0 0 10px; font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 500; line-height: 1.1; letter-spacing: var(--track-title); color: var(--card-ink); }
.fact__a { color: inherit; }
.fact__a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-card); }
.fact__a:focus-visible { outline: none; }
.fact__a:focus-visible::after { outline: 3px solid var(--card-ink); outline-offset: -5px; }
.fact__desc { margin: 0; max-width: 40ch; font-family: var(--font-body); font-size: 1rem; line-height: 1.55; letter-spacing: var(--track-body); color: var(--item-ink); }
.fact__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--card-ink); color: var(--white);
  font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: var(--track-caps); text-transform: uppercase; transition: background-color var(--dur-hover) var(--ease); }
.fact__go svg { transition: transform var(--dur-spring) var(--ease-spring); }
.fact:focus-within .fact__go { background: var(--ink-soft); }
.fact:focus-within .fact__go svg { transform: translate(2px, -2px); }
@media (hover: hover) {
  .fact:hover .fact__go { background: var(--ink-soft); }
  .fact:hover .fact__go svg { transform: translate(2px, -2px); }
  .fact:hover { background: var(--white); }
}
.fact__shade { position: absolute; inset: 0; z-index: 1; border-radius: inherit; background: rgba(var(--tint-rgb), 0.5); opacity: 0; pointer-events: none; }
@media (min-width: 720px) {
  .fact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: 28px; align-items: start; }
  .fact__name { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .fact__desc { grid-column: 2; grid-row: 1; padding-top: 6px; }
  .fact__go { grid-column: 2; grid-row: 2; justify-self: start; }
}
/* Stacking only when motion is welcome; otherwise a plain readable list. */
@media (prefers-reduced-motion: no-preference) {
  .fact { position: sticky; top: calc(var(--stack-top) + var(--i) * var(--stack-step)); margin-bottom: var(--stack-gap); will-change: transform; }
  .fact:last-child { margin-bottom: 0; }
}

/* ---------- Breathe line (inline photo in the headline, like the home page) ---------- */
.breathe { text-align: center; }
.breathe__line { margin: 0 auto; max-width: 60rem; font-size: clamp(2.3rem, 7vw, 5.5rem); font-weight: 500; line-height: 1.05; letter-spacing: var(--track-display); }
@media (min-width: 1150px) {
  .breathe__line { letter-spacing: var(--track-hero); }
}
.breathe__line .blur-text { justify-content: center; }
.breathe__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 0.2em; }
.breathe__img { width: clamp(56px, 7vw, 96px); height: clamp(56px, 7vw, 96px); border-radius: 14px; object-fit: cover; object-position: 50% 20%; }

/* ---------- Channels ---------- */
.channels__panel { display: grid; gap: clamp(24px, 4vw, 56px); padding: clamp(14px, 2vw, 22px); }
.channels__img { margin: 0; border-radius: calc(var(--radius-card) - 8px); overflow: hidden; aspect-ratio: 4 / 3; }
.channels__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: transform var(--dur-slow) var(--ease); }
.channels__body { padding: clamp(6px, 2vw, 24px); }
.channels__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 10px; }
/* Lighter, smaller material than the panel it sits on (hierarchy by weight); pressed by the shared layer on pointer-down. */
.channel { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--edge-top), inset 0 0 0 1px rgba(255, 255, 255, 0.22); font-family: var(--font-body); font-size: 1.0625rem; letter-spacing: var(--track-body); transition: background-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
.channel svg { flex: none; transition: transform var(--dur-spring) var(--ease-spring); }
.channel:focus-visible svg { transform: scale(1.12); }
@media (hover: hover) {
  .channel:hover { background: rgba(255, 255, 255, 0.2); box-shadow: var(--edge-top), inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
  .channel:hover svg { transform: scale(1.12); }
  .channels__panel:hover .channels__img img { transform: scale(1.03); }
}
@media (min-width: 860px) {
  .channels__panel { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; }
  .channels__img { aspect-ratio: 4 / 5; }
}

/* ---------- Reduced motion: no travel, no scale, no tilt; state changes read as colour / opacity ---------- */
@media (prefers-reduced-motion: reduce) {
  .bento__media, .bento__cell:hover .bento__media { transform: none; }
  .books__photo img, .bento__media img { transform: none !important; }
  .bento__media, .bento__media img, .books__photo { translate: none !important; }
  .books__card { transform: none !important; }
  .bento__cell:hover .bento__icon, .med:hover .med__play, .med:focus-visible .med__play, .med:hover .med__thumb--plain::before,
  .channel:hover svg, .channel:focus-visible svg, .channels__panel:hover .channels__img img,
  .fact:hover .fact__go svg, .fact:focus-within .fact__go svg, .books__actions .btn:hover svg { transform: none; }
}

/* ---------- Reduced transparency: nothing here relies on blur; make the only translucent chips solid ---------- */
@media (prefers-reduced-transparency: reduce) {
  .bento__icon { background: rgb(var(--tint-rgb)); }
  .bento__cell:hover .bento__icon { background: var(--accent); }
  .channel { background: rgb(var(--tint-rgb)); }
  .channel:hover { background: var(--ink-soft); }
  .med__thumb--plain .med__badge { background: rgb(var(--tint-rgb)); }
}

/* ---------- More contrast: defined borders, near-solid scrims ---------- */
@media (prefers-contrast: more) {
  .bento__cell::before { background: rgba(46, 23, 88, 0.92); }
  .bento__cell::after { opacity: 1; box-shadow: inset 0 0 0 2px var(--white); }
  .bento__icon { background: rgb(var(--tint-rgb)); box-shadow: inset 0 0 0 2px var(--white); }
  .channel { background: rgb(var(--tint-rgb)); box-shadow: inset 0 0 0 2px var(--white); }
  .channel:hover { background: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--white); }
  .fact { box-shadow: inset 0 0 0 2px var(--card-ink); }
  .card.books__card { box-shadow: inset 0 0 0 2px var(--card-ink); }
  .books__photo { box-shadow: 0 0 0 2px var(--white); }
  .stack-rail__seg { background: rgb(var(--tint-rgb)); box-shadow: 0 0 0 1px var(--white); }
}

/* Focal points: the sources are wide (16:9) but the bento cells are tall, so a centred crop
   keeps only the middle ~40% and can miss the subject. Aim each crop at its person. */
.bento__media img[src*="qlv2zuqlv2zuqlv2"] { object-position: 60% top; }   /* teacher in orange sari */
.bento__media img[src*="n5hbgvn5hbgvn5hb"] { object-position: 50% top; }   /* standing pose */
.bento__media img[src*="wvnn1zwvnn1zwvnn"] { object-position: 66% top; }   /* woman in hammock */
.bento__media img[src*="avy11tavy11tavy1"] { object-position: 32% top; }   /* patient and nurse */
.bento__media img[src*="science-figure"] { object-position: 50% 30%; }   /* full seated figure: keep head and icons in view */
.bento__media img[src*="nsxwthnsxwthnsxw"] { object-position: 50% 30%; }   /* wide banner: keep the face */
