/* The same eyebrow-to-title gap for page and section introductions.
   This rule leaves article tags, card metadata and standalone labels alone. */
.editorial-heading-pair {
  display: grid;
}

:is(.text_wrap, .editorial-heading-pair, .expect-section-heading, .expect-journey-header, .expect-people-copy)
  > :is(.accent-text, .accent-text-large, .accent-text-2, .accent-text-4):has(+ :is(h1, h2)) {
  margin-block-end: 0;
}

:is(.text_wrap, .editorial-heading-pair, .expect-section-heading, .expect-journey-header, .expect-people-copy):not([id^="your-stay"] .align-center):has(> :is(.accent-text, .accent-text-large, .accent-text-2, .accent-text-4) + :is(h1, h2)) {
  row-gap: var(--al-space-eyebrow) !important;
}

:is(.text_wrap, .editorial-heading-pair, .expect-section-heading, .expect-journey-header, .expect-people-copy)
  > :is(.accent-text, .accent-text-large, .accent-text-2, .accent-text-4) + :is(h1, h2) {
  margin-block-start: 0;
}

/* The measured gap belongs to the heading pair. Supporting prose has its own rhythm. */
:is(.text_wrap, .expect-journey-header, .expect-people-copy)
  > :is(.accent-text, .accent-text-large, .accent-text-2, .accent-text-4) + :is(h1, h2) + :is(.p, .p-large, .expect-people-details) {
  margin-block-start: calc(var(--al-space-intro) - var(--al-space-eyebrow));
}

/* In the desktop two-column layout the paragraph sits beside the heading. */
@media (min-width: 701px) {
  [data-wf--why-alalaho--variant] .feature_heading .text_wrap > .accent-text + h2 + p {
    margin-block-start: 0;
  }
}

/* Offer introductions use margins in normal flow. Their flex layouts account
   for the shared gap in the same place as the native heading stacks. */
.offer-main :is(.editorial-eyebrow, .eyebrow):has(+ :is(h1, h2)) {
  margin-block-end: var(--al-space-eyebrow) !important;
}

.offer-main :is(.editorial-eyebrow, .eyebrow) + :is(h1, h2) {
  margin-block-start: 0 !important;
}

.private-page .closing-image .closing-content:has(> .eyebrow + h2) {
  row-gap: var(--al-space-eyebrow) !important;
}

.private-page .closing-image .closing-content > .eyebrow:has(+ h2) {
  margin-block-end: 0 !important;
}

/* The :not() exception above lets imported venue chapters retain the original responsive spacing between each
   of their beats. The parent already has the correct section padding and gutter. */
/* In a longer heading stack, a third/fourth element is a separate content
   block. Never give a list, CTA or group of amenities the eyebrow's 0.8rem. */
.text_wrap:has(> :is(.accent-text,.accent-text-large,.accent-text-2,.accent-text-4) + :is(h1,h2))
  > :is(.retreat_info-wrap,.list,.button_wrap,.retreat_pill-wrap,.nomis-story_arrow-wrap) {
  margin-block-start: calc(var(--al-space-intro) - var(--al-space-eyebrow));
}
[id^="your-stay"] .text_wrap.align-center > :is(.accent-text,.accent-text-large,.accent-text-2,.accent-text-4) + :is(h1,h2) ~ :is(.retreat_pill-wrap,p) {
  margin-block-start: 0;
}

/* On the homepage, when only one dated option exists the invitation occupies the remaining
   two slots. With no dates the invitation becomes a short full-width band. */
@media (min-width: 992px) {
 .upcoming-retreats_list:has(> [data-standing-waitlist="psychedelic"]:last-child:nth-child(-n+2)) {
   display: flex; align-items: stretch;
 }
 .upcoming-retreats_list > [data-standing-waitlist="psychedelic"]:last-child:nth-child(-n+2) { flex: 1; }
 .upcoming-retreats_list > [data-standing-waitlist="psychedelic"]:last-child:nth-child(-n+2) .upcoming-retreat_card {
   min-height: 14rem; height: 100%; aspect-ratio: auto;
 }
}

/* Regular grid slots even when the retreat and waitlist are the only two items. */
[data-overview-dates] .upcoming-retreats_list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
[data-overview-dates] .upcoming-retreats_list::before,
[data-overview-dates] .upcoming-retreats_list::after { display: none; }
[data-overview-dates] .upcoming-retreats_item { width: 100%; min-width: 0; }
[data-overview-dates] .upcoming-retreats_item .upcoming-retreat_card { aspect-ratio: 4 / 5; min-height: 0; height: auto; }
[data-overview-dates] .waitlist_overlay { padding: clamp(1.2rem, 2.6vw, 2.75rem); }
[data-overview-dates] .waitlist-heading { max-width: 15ch; text-wrap: balance; }

@media (max-width: 61.95rem) {
  [data-overview-dates] .upcoming-retreats_list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 47.95rem) {
  [data-overview-dates] .upcoming-retreats_list { grid-template-columns: 1fr; }
}

/* Section navigation shares the About page's link size and beige interaction. */
.sticky-nav_wrap .sticky-nav { height:auto; min-height:3.5rem; gap:.25rem; padding:.35rem clamp(.55rem,1.4vw,1.25rem); }
.sticky-nav_wrap .sticky-nav .sticky-nav-link {
  display:inline-flex; flex:none; align-items:center; min-height:44px; padding:.35rem clamp(.55rem,1vw,1.25rem);
  font:400 clamp(.94rem,1.2vw,1.05rem)/1.35 Haffer,sans-serif; white-space:nowrap; border-radius:999px;
}
.sticky-nav_wrap .sticky-nav-link::before { content:none; }
.sticky-nav_wrap .sticky-nav-link:is(:hover,:focus-visible,.is-active) { background:#eee9e2; color:#262626; }
@media (max-width:991px) {
  .sticky-nav_wrap:has(.sticky-nav), .home-pathways .home-pathway-index { display:none; }
}

[id^="your-stay"] .grid_4-col { position: relative; }

/* Reveal each row as it comes into view, following the photo order within the row. */
@media screen and (prefers-reduced-motion: no-preference) {
  .grid_4-col > .venue-tile-waiting { opacity: 0; }
  .grid_4-col > .venue-tile-arrived {
    animation: venue-tile-arrive 900ms cubic-bezier(.22,.68,.18,1) var(--venue-tile-delay, 0ms) backwards;
  }
  @keyframes venue-tile-arrive {
    from { translate: 0 calc(var(--venue-direction, 1) * clamp(2.5rem, 5vw, 4.5rem)); opacity: 0; }
    to { translate: 0 0; opacity: 1; }
  }
}

/* Public hero rhythm, including imported pages whose H1 is the eyebrow. */
:root {
  --al-hero-inset: clamp(3.5rem, 7vw, 7rem);
  --al-hero-label-gap: clamp(1rem, 1.6vw, 1.5rem);
  --al-hero-intro-gap: clamp(1.5rem, 2.5vw, 2rem);
  --al-hero-action-gap: clamp(1.75rem, 3vw, 2.375rem);
  --al-hero-tracking: -.018em;
}
.page-wrapper .container:has(h1),
.page-wrapper .grid_split .grid_content:has(h1),
[data-home-hero] .home-film-copy {
  padding-block-start: var(--al-hero-inset);
}
.page-wrapper .grid_split .grid_content:has(h1),
[data-home-hero] .home-film-copy,
.page-wrapper .container:has(> .grid h1.accent-text-large):not(.is-individual-retreat-hero):not(:has(.retreat_hero-wrap)) {
  padding-block-end: var(--al-hero-inset);
}
:is(.page-wrapper, body[data-hero-size="compact"] .is-individual-retreat-hero) .text_wrap:has(> h1) { --al-space-eyebrow: 0px; row-gap: 0 !important; }
:is(.page-wrapper, body[data-hero-size="compact"] .is-individual-retreat-hero) .text_wrap:has(> h1) > :is(.accent-text,.accent-text-large) + :is(h1,h2) {
  margin-block: var(--al-hero-label-gap) 0;
}
:is(.page-wrapper, body[data-hero-size="compact"] .is-individual-retreat-hero) .text_wrap:has(> h1) > :is(h1,h2) + :is(p,.retreat_info-wrap,.nomis-story_arrow-wrap),
.page-wrapper .newsletter-archive-intro {
  margin-block-start: var(--al-hero-intro-gap);
}
.page-wrapper .text_wrap:has(> h1) > .button_wrap { margin-block-start: var(--al-hero-action-gap); }
.page-wrapper .text_wrap:has(> h1) > :is(.h1,.h2),
.about-opening-heading h1, .dharma-cover h1,
[data-home-hero] .home-film-copy .h1, .private-page .hero h1,
.individual-offer-intro h1, .meditation-guidance h1 {
  letter-spacing: var(--al-hero-tracking);
}
.page-wrapper .text_wrap:has(> h1) > :is(.h1,.h2),
[data-home-hero] .home-film-copy .h1 {
  font-size: var(--al-type-display);
  line-height: 1.04;
}
.page-wrapper .text_wrap:has(> h1) > .p-large, [data-home-hero] .home-film-copy .p-large {
  font-size: clamp(1.1rem, 1.48vw, 1.35rem);
  line-height: 1.6;
}
[data-home-hero] .home-film-copy { gap: var(--al-hero-label-gap); }
[data-home-hero] .home-film-copy .p-large { margin-top: calc(var(--al-hero-intro-gap) - var(--al-hero-label-gap)); }
.dharma-opening .dharma-cover { padding-block-start: var(--al-hero-inset); }
.offer-main :is(.dharma-cover,.individual-offer-intro,.meditation-guidance .editorial-section-head,.hero-left)
  > :is(.editorial-eyebrow,.accent-text-large,.eyebrow):has(+ h1) { margin-block-end: var(--al-hero-label-gap) !important; }
.private-page .hero-left { padding-block-start: var(--al-hero-inset); }
.private-page .hero-left > h1 { width: 100%; margin-bottom: var(--al-hero-intro-gap); }
.private-page .hero .lede { width: 100%; max-width: min(100%,36rem); margin: 0 auto; }
.private-page .hero .hero-actions { margin-top: var(--al-hero-action-gap); }
.dharma-opening .dharma-cover .p-large { margin-top: var(--al-hero-intro-gap); }
.individual-offer-intro h1, .meditation-guidance h1 { margin-bottom: var(--al-hero-intro-gap); }
.about-opening-heading h1 { margin-top: var(--al-hero-label-gap); }
.newsletter-reading-page .newsletter-article-header { gap: var(--al-hero-label-gap); }

@media (max-width: 380px) {
  .dharma-opening .dharma-cover h1 em { white-space: normal; }
  .individual-offer-intro h1 { font-size: clamp(2.25rem, 12vw, 2.875rem); }
}

/* Two pairings for public page openings. In the imported templates an H1
   sometimes labels the page and the H2 immediately after it is the title. */
body[data-hero-size="display"] {
  --al-hero-title: var(--al-type-display);
  --al-hero-lead: clamp(1.1875rem, 1.7vw, 1.5rem);
}
body[data-hero-size="compact"] {
  --al-hero-title: clamp(2.25rem, 4.5vw, 4rem);
  --al-hero-lead: clamp(1.1rem, 1.48vw, 1.35rem);
}
body[data-hero-size] :is(.page-wrapper, .section, .offer-main)
  :is(h1:not(.accent-text, .accent-text-large), h1:is(.accent-text, .accent-text-large) + h2) {
  font: 400 var(--al-hero-title)/1.04 'Value Serif', Georgia, serif;
  letter-spacing: var(--al-hero-tracking);
  overflow-wrap: break-word;
}
body[data-hero-size] :is(.page-wrapper, .offer-main)
  :is(.text_wrap:has(> h1) > .p-large, .home-film-copy > .p-large,
      .about-opening-words > .p-large, .dharma-cover > .p-large, .hero-left > .lede,
      .meditation-guidance .editorial-section-head > .editorial-lead,
      .individual-offer-intro .editorial-body > p:first-child, .newsletter-archive-intro) {
  font: 300 var(--al-hero-lead)/1.5 Haffer, Arial, sans-serif;
  letter-spacing: normal;
}
/* The issue number and date in the newsletter header are editorial metadata. */
body[data-hero-size] :is(.page-wrapper, .section, .offer-main)
  :is(h1.accent-text, h1.accent-text-large,
      .accent-text:has(+ h1), .accent-text-large:has(+ h1),
      .editorial-eyebrow:has(+ h1), .eyebrow:has(+ h1)) {
  font: 500 clamp(.875rem, 1.12vw, 1rem)/1.35 Haffer, Arial, sans-serif;
  letter-spacing: .075em;
}


/* Centre the endorsement above the full-width logo strip on every page. */
[data-wf--featured-marquee--variant="stacked"] > .container.is-marquee {
  text-align: center;
  padding-bottom: clamp(1.25rem, 2.3vw, 2.25rem);
}
