/* Four Wellness hub v2: Cardinal.
   One square, four sides. Each house arrives from its own side of the mark as a roof-shaped room,
   and at the peak all four pull back and the seams draw the logo.
   Motion rule: scroll frames write transform and opacity only. Room shapes are static clip-paths. */

:root {
  --night: var(--fw-night); --bone: var(--fw-bone);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sb: 0px;                                   /* phone toolbar allowance for bottom-anchored items */
}
@supports (height: 100lvh) { :root { --sb: calc(100lvh - 100svh); } }

html { background: var(--night); }
body { margin: 0; background: var(--bone); color: var(--fw-ink); font: 400 17px/1.6 var(--fw-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.c-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.c-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; background: var(--bone); color: var(--night); font: 700 13px/1 var(--fw-text); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-radius: var(--fw-radius); transition: background-color .2s var(--fw-ease), color .2s var(--fw-ease); }
.c-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(-45deg); }
.c-btn:focus-visible, .c-card__go:focus-visible, .c-compass a:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.c-btn--line { background: none; color: var(--night); box-shadow: inset 0 0 0 1.5px var(--night); }
@media (hover: hover) and (pointer: fine) { .c-btn:hover { background: #fff; } .c-btn--line:hover { background: var(--night); color: var(--bone); } }

/* ---------------- the tour ---------------- */
.c-tour { position: relative; height: calc(100vh * (var(--span, 6.8) + 1)); background: var(--night); }
.c-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: var(--night); color: var(--bone); contain: layout paint style; }
.c-world { position: absolute; inset: 0; overflow: hidden; transform-origin: 0 0; }
.js .c-world { will-change: transform; }

/* rooms: size, clip and position are written once per layout by hub.js; scroll only moves them */
.c-room { position: absolute; left: 0; top: 0; overflow: hidden; }
.c-room__in { position: absolute; left: 0; top: 0; width: var(--W, 100vw); height: var(--H, 100vh); }
.c-room__in picture { display: block; width: 100%; height: 100%; }
.c-room__in img { width: 100%; height: 100%; object-fit: cover; object-position: var(--ox) var(--oy); }
@media (max-aspect-ratio: 1/1) { .c-room__in img { object-position: var(--mx) var(--oy); } }
.js .c-room, .js .c-room__in { will-change: transform; }
.c-room[data-el="earth"] { background: var(--fw-earth); }
.c-room[data-el="fire"]  { background: var(--fw-fire); }
.c-room[data-el="water"] { background: var(--fw-water); }
.c-room[data-el="air"]   { background: var(--fw-air); }
.c-curtain { position: absolute; z-index: 10; left: -3px; top: -3px; width: calc(100% + 6px); height: calc(100% + 6px); background: var(--night); transform: translate3d(-100%, 0, 0); }
.c-curtain[data-side="r"] { transform: translate3d(100%, 0, 0); }
.c-curtain[data-side="t"] { transform: translate3d(0, -100%, 0); }
.c-curtain[data-side="b"] { transform: translate3d(0, 100%, 0); }

/* legibility: a static scrim only where words sit, faded with opacity */
.c-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(to top, rgba(18, 17, 11, .82) 0%, rgba(18, 17, 11, .42) 34%, rgba(18, 17, 11, 0) 62%); }

/* hero: a plaque where the four meet */
.c-hero { position: absolute; left: clamp(28px, 4.5vw, 72px); top: 50%; width: min(500px, calc(100% - 40px)); transform: translateY(-50%); padding: 36px 38px 34px; background: var(--night); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); }
.c-h1 { margin: 0; font: 800 clamp(48px, 6.4vw, 92px)/.86 var(--display); letter-spacing: -.005em; text-transform: uppercase; text-wrap: balance; }
.c-lede { margin: 18px 0 0; max-width: 40ch; color: #d6d1bf; font-size: 16px; line-height: 1.55; }
.c-hero__go { margin: 22px 0 0; }

/* chapters */
.c-ch { position: absolute; inset: 0; pointer-events: none; visibility: hidden; }
.c-ch .c-word, .c-ch .c-card { opacity: 0; }
/* everything the scroll fades or moves gets its own layer, so a frame never repaints text or photos */
.js .c-hero, .js .c-word, .js .c-card, .js .c-shade, .js .c-peak, .js .c-compass, .js .c-curtain { will-change: transform, opacity; }
.c-ch.is-on { visibility: visible; }
.c-ch.is-on .c-card { pointer-events: auto; }
.c-word { position: absolute; margin: 0; font: 800 clamp(120px, 21vw, 340px)/.78 var(--display); letter-spacing: -.01em; text-transform: uppercase; color: var(--bone); white-space: nowrap; text-shadow: 0 6px 30px rgba(0, 0, 0, .28); }
.c-ch[data-el="earth"] .c-word { left: clamp(20px, 3vw, 48px); bottom: calc(var(--sb) + 64px); }
.c-ch[data-el="fire"]  .c-word { left: clamp(20px, 3vw, 48px); bottom: calc(var(--sb) + 64px); }
.c-ch[data-el="water"] .c-word { right: clamp(20px, 3vw, 48px); bottom: calc(var(--sb) + 64px); }
.c-ch[data-el="air"]   .c-word { right: clamp(20px, 3vw, 48px); bottom: calc(var(--sb) + 64px); }

.c-card { --c: var(--fw-earth); --cl: var(--fw-earth-light); position: absolute; bottom: calc(var(--sb) + 64px); width: min(420px, calc(100% - 40px)); display: grid; grid-template-columns: 148px 1fr; background: var(--night); color: var(--bone); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6); }
.c-ch[data-el="earth"] .c-card, .c-ch[data-el="fire"] .c-card { right: clamp(20px, 3vw, 48px); }
.c-ch[data-el="water"] .c-card, .c-ch[data-el="air"] .c-card { left: clamp(20px, 3vw, 48px); }
.c-ch[data-el="fire"]  .c-card { --c: var(--fw-fire);  --cl: var(--fw-fire-light); }
.c-ch[data-el="water"] .c-card { --c: var(--fw-water); --cl: var(--fw-water-light); }
.c-ch[data-el="air"]   .c-card { --c: var(--fw-air);   --cl: var(--fw-air-light); }
.c-card__img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.c-card__txt { padding: 20px 22px 22px; border-top: 3px solid var(--cl); }
.c-card__el { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 11px/1 var(--fw-text); letter-spacing: .2em; text-transform: uppercase; color: var(--cl); }
.c-card__el span { font-size: 15px; display: inline-flex; }
.c-card__h { margin: 0 0 8px; font: 700 30px/.95 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.c-card__txt p:not(.c-card__el) { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #d6d1bf; }
.c-card__go { display: inline-flex; align-items: center; min-height: 44px; font: 700 13px/1 var(--fw-text); letter-spacing: .12em; text-transform: uppercase; color: var(--cl); text-decoration: none; gap: 10px; }
.c-card__go::after { content: ""; width: 7px; height: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) { .c-card__go:hover { color: var(--bone); } }

/* peak: one roof */
.c-peak { position: absolute; left: 0; right: 0; bottom: calc(var(--sb) + 7vh); display: grid; justify-items: center; gap: 14px; opacity: 0; pointer-events: none; }
.c-peak__line { margin: 0; font: 800 clamp(54px, 7vw, 104px)/.85 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.c-peak__word { width: clamp(150px, 15vw, 220px); height: auto; filter: brightness(0) invert(.95) sepia(.12); }

/* the edge compass */
.c-compass { position: absolute; inset: 0; pointer-events: none; font: 700 11px/1 var(--fw-text); letter-spacing: .18em; text-transform: uppercase; }
.c-compass a { --cl: var(--fw-earth-light); position: absolute; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px; color: #cfc9b6; text-decoration: none; pointer-events: auto; }
.c-compass a::before { content: ""; position: absolute; inset: 8px 0; background: rgba(29, 28, 20, .86); z-index: -1; border-radius: var(--fw-radius); }
.c-compass i { width: 8px; height: 8px; transform: rotate(45deg); background: var(--cl); opacity: .55; }
.c-compass span { font-weight: 600; letter-spacing: .1em; text-transform: none; font-size: 13px; color: #a9a38f; }
.c-compass a[data-el="fire"]  { --cl: var(--fw-fire-light); }
.c-compass a[data-el="water"] { --cl: var(--fw-water-light); }
.c-compass a[data-el="air"]   { --cl: var(--fw-air-light); }
.c-compass a.is-on { color: var(--bone); }
.c-compass a.is-on i { opacity: 1; }
.c-compass a.is-on span { color: #d6d1bf; }
.c-compass [data-side="top"]    { top: 10px; left: 50%; transform: translateX(-50%); }
.c-compass [data-side="bottom"] { bottom: calc(var(--sb) + 10px); left: 50%; transform: translateX(-50%); }
.c-compass [data-side="left"]   { left: 10px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg) translateY(50%); transform-origin: 50% 50%; }
.c-compass [data-side="right"]  { right: 10px; top: 50%; transform: translate(50%, -50%) rotate(90deg) translateY(50%); transform-origin: 50% 50%; }
@media (hover: hover) and (pointer: fine) { .c-compass a:hover { color: var(--bone); } .c-compass a:hover i { opacity: 1; } }

/* phones: the plaque moves up so all four faces stay in view, cards become bottom sheets */
@media (max-width: 760px) {
  .c-hero { left: 50%; top: calc(env(safe-area-inset-top, 0px) + 58px); transform: translateX(-50%); padding: 22px 20px 20px; text-align: center; }
  .c-lede { margin-left: auto; margin-right: auto; }
  .c-h1 { font-size: clamp(40px, 12vw, 56px); }
  .c-lede { font-size: 15px; margin-top: 12px; }
  .c-hero__go { margin-top: 16px; }
  .c-word { font-size: clamp(88px, 29vw, 150px); }
  .c-shade { background: linear-gradient(to bottom, rgba(18, 17, 11, .55) 0%, rgba(18, 17, 11, 0) 30%), linear-gradient(to top, rgba(18, 17, 11, .75) 0%, rgba(18, 17, 11, 0) 45%); }
  .c-card, .c-ch[data-el] .c-card { left: 12px; right: 12px; width: auto; bottom: calc(var(--sb) + 62px); grid-template-columns: 104px 1fr; }
  .c-card__img { min-height: 0; }
  .c-card__txt { padding: 14px 16px 6px; }
  .c-card__h { font-size: 25px; margin-bottom: 6px; }
  .c-card__txt p:not(.c-card__el) { font-size: 13.5px; margin-bottom: 4px; }
  .c-compass span { display: none; }
  .c-compass a { padding: 0 12px; }
  .c-compass [data-side="left"]  { left: 4px; }
  .c-compass [data-side="right"] { right: 4px; }
  .c-peak { bottom: calc(var(--sb) + 12vh); }
}
@media (max-width: 760px) and (max-height: 700px) {
  .c-lede { display: none; }
  .c-card__txt p:not(.c-card__el):not(:last-child) { display: none; }
}

/* ---------------- the week ---------------- */
.c-week { background: var(--bone); padding: clamp(72px, 10vw, 140px) 0 clamp(64px, 8vw, 110px); }
.c-week__in { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.c-week__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 40px; }
.c-h2 { margin: 0; font: 800 clamp(48px, 6.4vw, 96px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.c-week__head p { margin: 0; max-width: 46ch; color: #4a4838; }
.c-week__tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding: 14px 0; border-top: 2px solid var(--night); border-bottom: 1px solid #cfc9b4; }
.c-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.c-days::-webkit-scrollbar { display: none; }
.c-day { flex: none; min-height: 44px; padding: 0 14px; border: 0; background: none; color: #4a4838; font: 700 13px/1 var(--fw-text); letter-spacing: .08em; text-transform: uppercase; border-radius: var(--fw-radius); cursor: pointer; }
.c-day[aria-selected="true"] { background: var(--night); color: var(--bone); }
.c-day:focus-visible { outline: 2px solid var(--night); outline-offset: 2px; }
.c-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.c-filter label { --cl: var(--fw-earth); position: relative; cursor: pointer; }
.c-filter label[data-el="fire"]  { --cl: var(--fw-fire); }
.c-filter label[data-el="water"] { --cl: var(--fw-water); }
.c-filter label[data-el="air"]   { --cl: var(--fw-air); }
.c-filter input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.c-filter span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid #c9c3ad; border-radius: 999px; font: 700 12px/1 var(--fw-text); letter-spacing: .14em; text-transform: uppercase; color: #6c6a5c; }
.c-filter i { width: 8px; height: 8px; transform: rotate(45deg); background: var(--cl); opacity: .35; }
.c-filter input:checked + span { border-color: var(--cl); color: var(--fw-ink); }
.c-filter input:checked + span i { opacity: 1; }
.c-filter input:focus-visible + span { outline: 2px solid var(--night); outline-offset: 2px; }

.c-board { min-height: 320px; }
.c-list { list-style: none; margin: 0; padding: 0; }
.c-row { --cl: var(--fw-earth); display: grid; grid-template-columns: 92px 14px 1fr auto; align-items: center; gap: 4px 18px; padding: 16px 0; border-bottom: 1px solid #d9d3bf; }
.c-row[data-el="fire"]  { --cl: var(--fw-fire); }
.c-row[data-el="water"] { --cl: var(--fw-water); }
.c-row[data-el="air"]   { --cl: var(--fw-air); }
.c-row__t { font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.c-row__i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--cl); }
.c-row__n { font-weight: 700; line-height: 1.3; }
.c-row__m { display: block; font-size: 13.5px; font-weight: 500; color: #5f5d4e; }
.c-row__go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font: 700 12px/1 var(--fw-text); letter-spacing: .12em; text-transform: uppercase; color: var(--cl); text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--cl); border-radius: var(--fw-radius); white-space: nowrap; }
.c-row__go:focus-visible { outline: 2px solid var(--night); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .c-row__go:hover { background: var(--cl); color: var(--bone); } }
.c-row.is-full .c-row__go { color: #6c6a5c; box-shadow: inset 0 0 0 1.5px #b4ae98; }
.c-row--note .c-row__t { font: 700 12px/1.2 var(--fw-text); letter-spacing: .14em; text-transform: uppercase; color: var(--cl); }
.c-board__note { margin: 18px 0 0; color: #5f5d4e; font-size: 14px; }
.c-week__desk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 48px; padding: 28px 32px; background: #e9e4d5; }
.c-week__desk p { margin: 0; max-width: 52ch; font-weight: 600; }

@media (max-width: 760px) {
  .c-week__head { grid-template-columns: 1fr; }
  .c-week__tools { padding: 10px 0; }
  .c-row { grid-template-columns: 64px 10px 1fr; padding: 14px 0; }
  .c-row__t { font-size: 22px; }
  .c-row__go { grid-column: 3; justify-self: start; min-height: 40px; margin-top: 6px; }
  .c-week__desk { padding: 22px 20px; }
}

/* ---------------- no JS, or reduced motion: a still, complete page ---------------- */
html:not(.js) .c-tour, .is-still .c-tour { height: auto; }
html:not(.js) .c-stage, .is-still .c-stage { position: relative; height: auto; overflow: visible; contain: none; }
html:not(.js) .c-world, .is-still .c-world { position: relative; height: 92vh; height: 92svh; }
html:not(.js) .c-room, .is-still .c-room { inset: 0; }
html:not(.js) .c-room__in, .is-still .c-room__in { width: 100%; height: 100%; }
html:not(.js) .c-room:not([data-el="earth"]), .is-still .c-room:not([data-el="earth"]) { display: none; }

html:not(.js) .c-ch, .is-still .c-ch { position: relative; inset: auto; opacity: 1; visibility: visible; padding: 40px clamp(20px, 4vw, 56px); }
html:not(.js) .c-ch .c-word, html:not(.js) .c-ch .c-card, .is-still .c-ch .c-word, .is-still .c-ch .c-card { opacity: 1; }
html:not(.js) .c-word, .is-still .c-word { position: static; font-size: clamp(80px, 16vw, 200px); margin-bottom: 20px; color: var(--bone); }
html:not(.js) .c-card, .is-still .c-card { position: static; width: auto; max-width: 720px; pointer-events: auto; grid-template-columns: 1fr 1.2fr; }
html:not(.js) .c-ch[data-el="earth"], .is-still .c-ch[data-el="earth"] { background: var(--fw-earth); }
html:not(.js) .c-ch[data-el="fire"], .is-still .c-ch[data-el="fire"] { background: var(--fw-fire); }
html:not(.js) .c-ch[data-el="water"], .is-still .c-ch[data-el="water"] { background: var(--fw-water); }
html:not(.js) .c-ch[data-el="air"], .is-still .c-ch[data-el="air"] { background: var(--fw-air); }
html:not(.js) .c-peak, html:not(.js) .c-compass, html:not(.js) .c-shade, .is-still .c-peak, .is-still .c-compass, .is-still .c-shade, .is-still .c-curtain, html:not(.js) .c-curtain { display: none; }
@media (max-width: 760px) { html:not(.js) .c-card, .is-still .c-card { grid-template-columns: 1fr; } }

/* load-in: the four sides arrive once, CSS only, then the scroll owns them */
@keyframes c-in { from { opacity: 0; } to { opacity: 1; } }
.js .c-world { animation: c-in .9s var(--fw-ease) both; }
@media (prefers-reduced-motion: reduce) { .js .c-world { animation: none; } }
@media (min-width: 761px) { html:not(.js) .c-hero, .is-still .c-hero { top: 46vh; } }

/* portrait screens of any width: the element word sits up top, the card below it */
@media (max-aspect-ratio: 1/1) {
  .c-ch[data-el] .c-word { top: 64px; bottom: auto; left: 16px; right: auto; }
  .c-ch[data-el="water"] .c-word, .c-ch[data-el="air"] .c-word { left: auto; right: 16px; }
}
/* short landscape (phones on their side): smaller plaque and cards, words scale with height */
@media (min-aspect-ratio: 1/1) and (max-height: 540px) {
  .c-hero { padding: 18px 22px 18px; width: min(400px, 52vw); }
  .c-h1 { font-size: clamp(30px, 9vh, 44px); }
  .c-lede { display: none; }
  .c-hero__go { margin-top: 12px; }
  .c-btn { min-height: 44px; }
  .c-word { font-size: 34vh; }
  .c-ch[data-el] .c-word { bottom: calc(var(--sb) + 48px); }
  .c-card { width: min(320px, 44vw); grid-template-columns: 1fr; bottom: calc(var(--sb) + 48px); }
  .c-card__img { display: none; }
  .c-card__txt { padding: 12px 16px 4px; }
  .c-card__h { font-size: 22px; }
  .c-card__txt p:not(.c-card__el):not(:last-child) { display: none; }
  .c-peak { bottom: calc(var(--sb) + 3vh); gap: 6px; }
  .c-peak__line { font-size: 9vh; }
  .c-peak__word { width: 92px; }
}
