/* Homepage reading panels use the same typography and rails as the programme. */
.home-page main { overflow-x: clip; }
.home-page .home-lead { font: var(--editorial-lead); }
@media (min-width: 1001px) {
  .public-site.home-page #welcome { grid-template-columns: 56fr 44fr; }
  .public-site.home-page #welcome .hero-copy { --hero-title: clamp(2.8rem,4.45vw,4.75rem); padding-inline-end: clamp(2rem, 5.6vw, 6rem); }
  .public-site.home-page #welcome .hero-lead { max-width: 36ch; }
}
@media (max-width: 1000px) {
  .home-page #welcome .hero-visual { overflow: hidden; }
  .home-page #welcome .hero-visual img { height: 100%; aspect-ratio: auto; object-position: 50% 34%; }
}
:is(.home-page, .community-page, .lineage-practice-page) .reading-composition { text-align: center; width: min(100%, 52rem); margin: auto; }
:is(.home-page, .community-page, .lineage-practice-page) .reading-scene .scene-frame {
  display: grid; place-items: center; padding: clamp(4rem, 9svh, 6.5rem) var(--site-gutter);
}
:is(.home-page, .community-page, .lineage-practice-page) .ink-passage {
  margin: 0; font: 400 clamp(1.85rem, 3.12vw, 3.2rem)/1.21 var(--serif);
  letter-spacing: -.023em; text-wrap: balance;
}
.home-page .ink-passage, .community-page .opening-reading .ink-passage, .lineage-practice-page .lineage-reading .ink-passage { font-size: clamp(1.65rem, 2.8vw, 2.8rem); line-height: 1.24; }
.home-page .opening-reading, .home-page .welcome-reading { color: var(--burgundy); }
.home-page .opening-reading img[src*="buddha-eyes"] { width: min(65vw, 24rem); height: auto; }
:is(.home-page, .community-page, .lineage-practice-page) .ink-passage + .ink-passage { margin-top: .85em; }
:is(.home-page, .community-page, .lineage-practice-page) .reading-symbol {
  width: auto; height: clamp(5rem, 12svh, 8rem); margin: clamp(1.5rem, 3.5svh, 2.75rem) auto 0;
  object-fit: contain;
}
:is(.home-page, .community-page) .opening-reading .scene-frame { padding-block: clamp(2rem, 5svh, 4rem); }
:is(.home-page, .community-page) .opening-reading .reading-symbol { height: clamp(7rem, 17svh, 11.5rem); }
.home-page .welcome-reading .reading-symbol { height: auto; width: min(76%, clamp(13rem, 23vw, 20rem)); }
:is(.home-page, .community-page, .lineage-practice-page) .reading-composition .actions, .home-page .wisdom-inner .actions, .home-page #events > .actions {
  justify-content: center; margin-block: 2rem 0;
}
.public-site.home-page #practice { margin: 0; border-radius: 0; background: var(--beige); }
.home-page #practice .scene-frame {
  display: grid; align-items: center; min-height: calc(100svh - var(--header-height));
  padding-block: clamp(2.25rem, 7svh, 5.5rem);
}
.home-page .wisdom-inner .practice-step + .practice-step { margin-top: clamp(1.15rem, 2.8svh, 2rem); }
.home-page .wisdom-inner .practice-step > :last-child { margin-bottom: 0; }
.home-page .wisdom-inner { text-align: center; }
.home-page .wisdom-inner h2 { margin: 0 auto 1.5rem; }
.home-page .wisdom-inner p:not(.eyebrow) { max-width: 39rem; margin-inline: auto; text-wrap: pretty; }
.home-page #events > .actions { margin-top: clamp(1.75rem, 3.5vw, 3rem); }

.public-site.home-page #teacher { background: transparent; }
.home-page #teacher .scene-frame {
  --teacher-inset: clamp(.75rem, 1.8svh, 1.35rem);
  display: grid; align-items: center; padding-block: var(--teacher-inset);
}
.public-site.home-page #teacher .teacher-panel {
  background: var(--beige); margin: 0 clamp(.75rem, 1.4vw, 1.75rem);
  display: grid; align-items: center;
  padding: clamp(2.5rem, 6svh, 5rem) max(1.5rem, calc(var(--site-edge) - 1.25rem));
}
.home-page .teacher-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(2.5rem, 6vw, 6.5rem); }
.home-page .teacher-photo img { width: 100%; height: auto; aspect-ratio: 1.1; object-fit: cover; object-position: 56% 40%; }
.home-page .teacher-reading h2 { margin-bottom: 1.4rem; }
.home-page .teacher-passages { max-width: 40rem; }
.home-page .teacher-progress { display: none; }
.home-page .teacher-passage { margin: 0; }
.home-page .teacher-passage + .teacher-passage { margin-top: 1em; }
.home-page .teacher-panel > .actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: .65rem;
  margin-top: 1.75rem;
}
.home-page .teacher-panel > .actions .button {
  flex: 0 0 auto;
  max-width: 100%;
}

.home-page .thangka-divider { margin: clamp(1rem, 2.8svh, 2rem) 0 0; }
.home-page .thangka-divider .parallax-window { height: auto; aspect-ratio: var(--photo-feature-band); }
.home-page .thangka-divider .parallax-window img { object-position: 50% 27%; }
.home-page .thangka-divider .parallax-window.is-parallax { --parallax-overscan: clamp(3rem, 6vw, 6rem); }
.home-page #lineage { padding-block: 0; }
.home-page .lineage-content {
  display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(2rem, 4vw, 4rem);
  padding-top: clamp(4.5rem, 10svh, 8rem);
}
.home-page .lineage-heading h2 { margin: 0; }
.home-page .lineage-body { align-self: end; max-width: 39rem; }
.home-page .lineage-cycles { grid-column: 1 / -1; margin-block: 0; }
.home-page .lineage-cycles h3 { margin-bottom: .65rem; }
.home-page .lineage-cycles p { max-width: 47ch; margin: 0; }
.home-page #lineage .reading-scene { margin-top: 0; }
.home-page #lineage .reading-composition { max-width: 49rem; }
.home-page #lineage .reading-symbol, .lineage-practice-page .lineage-reading .reading-symbol { height: clamp(8rem, 21svh, 14rem); }

.home-page .sangha-row {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2.5rem, 6vw, 6rem);
}
.home-page .sangha-row + .sangha-row { margin-top: clamp(3.5rem, 8vw, 7rem); }
.home-page .sangha-copy { max-width: 37rem; }
.home-page .sangha-copy h2 { margin-bottom: 1.5rem; }
.home-page .sangha-copy h3 { font: 400 clamp(1.9rem,3.4vw,3.5rem)/1.12 var(--serif); margin-bottom: 1.2rem; color: var(--burgundy); }
.home-page .sangha-pair { display: grid; grid-template-columns: 1fr .83fr; gap: clamp(.65rem,1.35vw,1.55rem); align-items: start; }
.home-page .sangha-pair .photo:nth-child(2) { margin-top: clamp(2.5rem, 6vw, 6rem); }
.home-page .sangha-pair img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.home-page .sangha-pair .photo:nth-child(2) img { aspect-ratio: 1; }
.home-page .sangha-visits .sangha-copy { grid-column: 2; grid-row: 1; }
.home-page .sangha-visits .sangha-pair { grid-column: 1; grid-row: 1; }
.home-page .sangha-visits .photo:first-child img { object-position: 46% center; }
.home-page .sangha-visits .photo:last-child img { aspect-ratio: 3 / 4; object-position: 48% center; }

.home-page #join .scene-frame { display: grid; align-items: center; padding-block: clamp(3rem, 7svh, 5.5rem); }
.home-page #join .join-intro { max-width: 48rem; margin: 0 auto clamp(1.5rem, 3.7svh, 3rem); text-align: center; }
.home-page #join .join-intro h2 { max-width: 27ch; margin: 0 auto .85rem; text-transform: none; }
.home-page #join .join-intro > p:not(.eyebrow) { max-width: 55ch; margin: auto; }
.home-page #join .join-grid { margin: 0; gap: clamp(1rem, 1.8vw, 2rem); }
.home-page #join .join-card { padding: clamp(1.3rem, 2.25vw, 2.5rem); }
.home-page #join .join-card-icon {
  display: flex;
  align-items: center;
  height: clamp(4.375rem, 9.8svh, 5.75rem);
  margin-bottom: 1.1rem;
}
.home-page #join .join-card-icon img {
  height: 100%;
  width: auto;
  max-width: 6.75rem;
  object-position: left center;
}
.home-page #join .join-card h3 { font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.14; margin: 0 0 .8rem; text-wrap: balance; }
.home-page #join .join-card p { font-size: 1rem; line-height: 1.55; margin-bottom: 1.25rem; }
.home-page #join .join-card .text-link { --action-outline: var(--burgundy); margin-top: auto; }
.home-page #join .join-card .text-link:focus-visible { outline-color: var(--burgundy); }
.home-page #join .join-intro h2 .title-phrase { display: inline; }

@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) and (prefers-contrast: no-preference) {
  .home-page [data-practice-fade] .practice-step { opacity: var(--step-ink, 1); }
  .home-page [data-practice-fade]:focus-within .practice-step { opacity: 1; }
  :is(.home-page, .community-page, .lineage-practice-page, .namkha-rinpoche-page, .centres-page, .dharma-teachers-page, .programme-page) [data-pinned]::after { content: ''; display: block; height: var(--scene-travel); }
  :is(.home-page, .community-page, .lineage-practice-page, .namkha-rinpoche-page, .centres-page, .dharma-teachers-page, .programme-page) [data-pinned] > .scene-frame { position: sticky; top: var(--header-height); min-height: var(--scene-room); }
  :is(.home-page, .community-page, .lineage-practice-page, .namkha-rinpoche-page) [data-pinned] .ink-word { opacity: var(--ink, .32); }
  :is(.home-page, .community-page, .lineage-practice-page, .namkha-rinpoche-page) [data-pinned] .reading-symbol { opacity: var(--art, 0); transform: translateY(calc((1 - var(--art, 0)) * 12px)); }
  .home-page #teacher[data-pinned] .teacher-panel { min-height: calc(var(--scene-room) - 2 * var(--teacher-inset)); }
  :is(.home-page, .dharma-teachers-page) [data-pinned] .teacher-passages { display: grid; align-items: center; min-height: 5.4em; }
  .home-page [data-pinned] .teacher-reading h2 { margin-bottom: clamp(1.75rem, 4.5svh, 3.2rem); }
  :is(.home-page, .dharma-teachers-page) [data-pinned] .teacher-progress {
    display: flex; align-items: center; gap: .85rem; color: var(--burgundy);
    margin: clamp(1.2rem, 3svh, 2rem) 0 0; font: 500 .875rem/1.4 var(--sans); font-variant-numeric: tabular-nums;
  }
  :is(.home-page, .dharma-teachers-page) .teacher-track { width: clamp(6.5rem, 10vw, 10rem); height: 3px; background: #d6c9bd; border-radius: 3px; overflow: hidden; }
  :is(.home-page, .dharma-teachers-page) .teacher-track i { display: block; height: 100%; background: var(--burgundy); transform-origin: left; transform: scaleX(var(--read-progress, 0)); }
  :is(.home-page,.lineage-practice-page) [data-scroll-entrance] { opacity: var(--arrival-opacity, 1); translate: var(--arrival-x, 0px) 0; will-change: translate, opacity; transition: opacity 120ms linear, translate 120ms linear; }
  :is(.home-page,.lineage-practice-page) [data-scroll-entrance]:focus-within { opacity: 1; translate: none; }
  :is(.home-page, .dharma-teachers-page) [data-pinned] .teacher-passage { grid-area: 1 / 1; margin: 0; opacity: 0; translate: 0 .3em; transition: opacity 90ms ease-out; }
  :is(.home-page, .dharma-teachers-page) [data-pinned] .teacher-passage[data-current] { opacity: 1; translate: none; transition: opacity .23s ease 95ms, translate .28s ease 95ms; }
  .home-page [data-pinned] .join-card { opacity: var(--card-ink, 0); translate: calc((1 - var(--card-ink, 0)) * -26px) 0; }
  .home-page [data-pinned] .join-card:focus-within { opacity: 1; translate: none; }
}
@media (min-width: 1080px) {
  .home-page #join .join-card h3 { min-height: 2.28em; }
}
@media (min-width: 1080px) and (max-height: 820px) {
  .home-page #join .scene-frame { padding-block: 1.25rem; }
  .home-page #join .join-intro { max-width: 62rem; margin-bottom: 1.35rem; }
  .home-page #join .join-intro .eyebrow { margin-bottom: .6rem; }
  .home-page #join .join-intro h2 { max-width: none; font-size: clamp(2.15rem, 3.35vw, 3rem); }
  .home-page #join .join-intro > p:not(.eyebrow) { max-width: 65ch; font-size: 1.05rem; }
  .home-page #join .join-card { padding: 1.35rem; }
}
@media (max-width: 820px) {
  .home-page .teacher-layout, .home-page .sangha-row, .home-page .lineage-content { grid-template-columns: 1fr; gap: 1.65rem; }
  .home-page .teacher-photo { max-width: 32rem; }
  .home-page .teacher-photo img { aspect-ratio: 3 / 2; }
  .public-site.home-page #teacher .teacher-panel { padding: clamp(1.5rem, 5vw, 3rem); }
  .home-page .sangha-visits .sangha-copy, .home-page .sangha-visits .sangha-pair { grid-area: auto; }
  .home-page .sangha-pair { max-width: 36rem; }
  .home-page .sangha-pair .photo:first-child img { aspect-ratio: 1; }
  .home-page .sangha-row + .sangha-row { margin-top: 3.25rem; }
  .home-page #join .join-grid { grid-template-columns: 1fr; }
  .home-page #join .join-card { max-width: 34rem; width: 100%; margin-inline: auto; }
}
html[lang=bo] :is(.home-page, .community-page, .lineage-practice-page) .ink-passage { line-height: 1.7; letter-spacing: 0; }
@media (max-width: 480px) {
  .home-page #practice .scene-frame { padding-block: clamp(1.75rem, 4.5svh, 3rem); }
  .home-page .reading-scene .ink-passage, .community-page .opening-reading .ink-passage, .lineage-practice-page .lineage-reading .ink-passage { font-size: clamp(1.4rem, 5.9vw, 1.65rem); }
  .home-page #lineage .reading-symbol, .lineage-practice-page .lineage-reading .reading-symbol { height: clamp(7.5rem, 18svh, 10rem); }
}
@media print {
  .home-page .scene-frame { min-height: auto; }
  .home-page .teacher-passage { break-inside: avoid; }
}

/* Keep the portrait and reading together; the actions follow the scroll sequence. */
@media (min-width: 821px) {
  .home-page #teacher .teacher-panel {
    grid-template-columns: .9fr 1.1fr;
    grid-template-areas: "photo copy" "photo actions";
    column-gap: clamp(2.25rem, 5vw, 5.5rem);
    row-gap: 1.75rem;
  }
  .home-page .teacher-sequence, .home-page .teacher-layout { display: contents; }
  .home-page .teacher-photo { grid-area: photo; }
  .home-page .teacher-reading { grid-area: copy; align-self: end; }
  .home-page .teacher-panel > .actions { grid-area: actions; align-self: start; margin-top: 0; }
}
@media (max-width: 820px) {
  .home-page #teacher .teacher-panel { display: block; }
}
@media screen and (max-width: 820px) and (prefers-reduced-motion: no-preference) and (forced-colors: none) and (prefers-contrast: no-preference) {
  .home-page .teacher-sequence[data-pinned] > .teacher-layout {
    position: sticky;
    top: var(--header-height);
    display: grid;
    align-content: center;
    gap: 1.25rem;
    min-height: var(--scene-room);
    padding-block: 1rem;
    background: var(--beige);
  }
  .home-page .teacher-sequence[data-pinned] .teacher-photo { width: 100%; margin: 0; }
  .home-page .teacher-sequence[data-pinned] .teacher-photo img {
    height: clamp(7rem, 22svh, 13rem);
    aspect-ratio: auto;
    object-position: 56% 35%;
  }
  .home-page .teacher-sequence[data-pinned] .eyebrow { margin-bottom: .65rem; }
  .home-page .teacher-sequence[data-pinned] h2 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
  }
  .home-page .teacher-sequence[data-pinned] .teacher-passage { font-size: 1.0625rem; line-height: 1.55; }
  .home-page .teacher-sequence[data-pinned] .teacher-progress { margin-top: 1rem; }
}

.home-page .sangha-visits {
  grid-template-areas: "photos copy" "photos actions";
  grid-template-rows: auto auto;
  row-gap: 1.5rem;
}
.home-page .sangha-visits .sangha-copy { grid-area: copy; align-self: end; }
.home-page .sangha-visits .sangha-copy > :last-child { margin-bottom: 0; }
.home-page .sangha-visits .sangha-pair { grid-area: photos; }
.home-page .sangha-visits-actions { grid-area: actions; align-self: start; }
.home-page .sangha-visits-actions .actions { margin: 0; }
@media (max-width: 820px) {
  .home-page .sangha-visits {
    grid-template-areas: "copy" "photos" "actions";
    grid-template-rows: auto;
  }
}
