@font-face { font-family: Barlow; src: url('assets/fonts/barlow-light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: Barlow; src: url('assets/fonts/barlow-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
:root { font-family: Barlow, Arial, sans-serif; font-size: 16px; color: #183d2a; color-scheme: light; --green: #126f43; --muted: #52685b; --space-width: min(1120px,calc(100vw - 48px)); --space-height: 100%; background: #fff; }
* { box-sizing: border-box; }
html,body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: #fff; }
button,input,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
h1,h2,p { margin: 0; }
h2 { font-size: clamp(1.8rem,3.5vw,3.3rem); line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.sr-only,.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: fixed; top: 1rem; left: 1rem; z-index: 200; padding: .75rem; background: #fff; color: var(--green); }
.site-header { display: flex; align-items: center; padding: max(1rem,env(safe-area-inset-top)) clamp(1.2rem,4vw,4rem) .5rem; z-index: 10; }
.home-control { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; padding: 5px; }
.home-control img { width: 30px; height: 30px; object-fit: contain; }
.home-control:hover { opacity: .75; }
.world { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; }
.scene-mount { position: absolute; inset: 0; pointer-events: none; }
.scene-mount > div { pointer-events: none; }
.station { width: var(--space-width); height: var(--space-height); max-height: 760px; position: absolute; inset: 0; margin: auto; display: flex; flex-direction: column; justify-content: center; gap: clamp(1rem,3vh,2rem); padding: 1rem; background: transparent; }
.orbital-ready .station { position: relative; inset: auto; margin: 0; transform-style: preserve-3d; max-height: none; transition: opacity .6s; }
.orbital-ready .station[aria-hidden="true"] { pointer-events: none !important; }
.welcome { padding: 0; }
.welcome-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.welcome-logo { display: block; width: min(75%,660px); height: auto; max-height: calc(var(--space-height) - 100px); object-fit: contain; }
.welcome-actions { display: flex; justify-content: center; gap: 1.3rem; margin-top: clamp(.8rem,3vh,2.2rem); flex-wrap: wrap; }
.button { min-height: 48px; padding: .85rem 1.4rem; border: 0; border-radius: 3rem; font-weight: 400; font-size: .9375rem; background: transparent; }
.primary { background: #126f43; color: #fff; }
.primary:hover { background: #0a5732; }
.secondary { background: #f0f6f2; color: #16452c; }
.secondary:hover { background: #e1eee5; }
.space-heading { display: flex; justify-content: center; align-items: center; gap: 1.5rem; }
.text-button { border: 0; background: transparent; font-size: .9375rem; min-height: 44px; padding: .5rem 0; color: var(--muted); text-decoration: none; }
.yoga-space { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.juice-space { display: grid; grid-template-rows: auto minmax(0,1fr); }
.space-bottom { display: grid; justify-items: center; text-align: center; gap: .35rem; }
.organizations p { font-size: .875rem; color: var(--muted); margin-bottom: .6rem; }
.organizations span { display: inline-block; font-size: 1rem; margin-inline: .7rem; }
.orbit-footer { display: flex; justify-content: center; padding: .5rem 1rem max(1.1rem,env(safe-area-inset-bottom)); z-index: 10; }
.orbit-footer nav { display: flex; gap: 2rem; }
.orbit-footer button { min-width: 80px; min-height: 44px; border: 0; padding: .5rem 1rem; background: transparent; color: #52685b; font-size: .9375rem; }
.orbit-footer button:hover { color: #126f43; }
dialog { width: min(92vw,760px); max-height: 90dvh; color: #183d2a; background: #fff; border: 0; border-radius: .4rem; padding: 1.5rem; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 20px 80px #0c251a18; }
dialog::backdrop { background: #f6faf7e8; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.25rem; }
.dialog-bar:has(h2) { display: grid; grid-template-columns: minmax(58px,1fr) auto minmax(58px,1fr); gap: .25rem; }
.dialog-bar h2 { grid-column: 2; text-align: center; font-size: clamp(1.5rem,3vw,2.1rem); letter-spacing: -.02em; }
.dialog-bar:has(h2) .close-button { grid-column: 3; justify-self: end; }
.close-button { min-height: 44px; padding: .55rem 1rem; background: transparent; border: 0; border-radius: 3rem; color: var(--green); }
.media-dialog { width: min(96vw,1200px); max-height: 96dvh; }
.media-dialog video,.viewer-image { display: block; width: 100%; height: min(75dvh,760px); object-fit: contain; background: #fff; }
.media-error { padding-block: 1rem; line-height: 1.6; }
form,label,.form-fields { display: grid; gap: .65rem; }
form { gap: 1.2rem; }
.form-fields { gap: 1.2rem; }
label { font-size: .9375rem; }
label span { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input,textarea { min-width: 0; width: 100%; min-height: 46px; color: #183d2a; padding: .75rem; border: 0; background: #f0f6f2; border-radius: .25rem; }
textarea { resize: vertical; }
.form-description { color: #52685b; font-size: 1rem; line-height: 1.6; }
.request-actions { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
#request-status { font-size: .9375rem; color: var(--muted); line-height: 1.5; }
.email-link { width: fit-content; overflow-wrap: anywhere; min-height: 44px; display: inline-flex; align-items: center; font-size: .9375rem; text-underline-offset: .35em; }
@media (max-width: 680px) {
 .site-header { padding-top: max(.65rem,env(safe-area-inset-top)); padding-bottom: .25rem; }
 .home-control img { width: 26px; height: 26px; }
 .station { padding: .6rem; gap: 1rem; }
 .welcome-logo { width: 100%; }
 .welcome-actions { flex-direction: column; width: min(90%,290px); gap: .8rem; margin-top: .75rem; }
 .welcome-actions .button { width: 100%; }
 h2 { font-size: clamp(1.7rem,7vw,2.7rem); }
 .space-heading { align-items: start; flex-wrap: wrap; gap: .6rem; }
 .space-heading .button { min-height: 44px; padding: .6rem 1rem; }

 .space-bottom .button { min-height: 44px; padding: .6rem 1rem; }
 .organizations span { font-size: .9375rem; margin-inline: .4rem; }
 .orbit-footer { padding-top: .25rem; padding-bottom: max(.7rem,env(safe-area-inset-bottom)); }
 dialog { padding: 1.1rem; }
 .form-grid { grid-template-columns: 1fr; }
}
@media (max-height: 520px) and (min-width: 681px) {
 .site-header,.orbit-footer { padding-block: .25rem; }
 .station { gap: .5rem; }
 .welcome-logo { max-height: calc(var(--space-height) - 64px); width: auto; max-width: 60%; }
 .welcome-actions { margin-top: .5rem; }
 .space-heading h2 { font-size: 1.9rem; }
 .organizations p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
 *,*::before,*::after { transition: none !important; animation: none !important; }
}
.space-heading h2 a { color: #126f43; text-decoration: none; display: inline-block; padding-block: .2rem; transition: color .2s; }
.space-heading h2 a:hover { color: #234c35; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* Share the available height equally across complete rows. */
.media-grid, .library-grid {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  grid-auto-rows: minmax(0,1fr); gap: clamp(.5rem,1.5vmin,1.15rem);
  padding: .45rem; min-height: 0; min-width: 0;
}
.media-tile {
  display: grid; place-items: center; grid-template: minmax(0,1fr) / minmax(0,1fr);
  width: 100%; height: 100%; min-width: 0; min-height: 0;
  padding: 0; border: 0; background: transparent;
}
.media-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
dialog:has(.library-grid)[open] {
  display: grid; grid-template-rows: auto minmax(0,1fr);
  height: min(85dvh,720px);
}
#juice-events-dialog[open] { height: min(65dvh,480px); }
@media (max-width:680px) {
  #library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #library-grid > :last-child:nth-child(odd) { grid-column: 1/-1; }
}
@media (max-height:480px) {
  .yoga-space { gap: .2rem; }
  .space-bottom { gap: 0; }
  .organizations p { display: none; }
  #library-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  #library-grid > :last-child:nth-child(odd) { grid-column: auto; }
}

body { isolation: isolate; background: #fff; }
.brand-filter { position: absolute; pointer-events: none; }
.home-control img, .welcome-logo { filter: url(#brand-ink); }
.home-control { border-radius: 50%; background: #f9fcf5dc; }
.welcome-content { position: relative; isolation: isolate; }
.welcome-content::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: min(94vw,840px); inset-block: -12%;
  background: radial-gradient(ellipse, #f9fcf5ef 0%, #f6fbf1d6 33%, transparent 72%);
}
.space-heading h2 a, .juice-detail h3 { color: #123f2c; }
.space-heading h2, .juice-detail h3, .organizations { text-shadow: 0 0 5px #fff, 0 1px 12px #fff; }
.space-bottom, .juice-detail, .space-heading { isolation: isolate; }
.space-bottom { position: relative; }
.space-bottom::before, .juice-detail::before {
  content: ''; position: absolute; z-index: -1; inset: -18px -10px; pointer-events: none;
  background: radial-gradient(ellipse, #f9fcf3f2 15%, #f9fcf3bf 43%, transparent 72%);
}
.space-bottom::before { width: min(520px,100%); margin: auto; }
.orbit-footer nav, .event-link { background: #f6faf0e8; border-radius: 3rem; }
.orbit-footer nav { gap: .1rem; }
.orbit-footer button, .station .text-button, .organizations p { color: #183e30; }
.station .event-link { padding-inline: 1.25rem; }
dialog::backdrop { background: #f2f5f3b8; }
.juice-space {
  grid-template: auto minmax(0,1fr) auto / minmax(0,1fr);
  align-content: stretch;
  align-items: center;
  gap: .5rem;
}
.juice-space .space-heading { align-items: center; gap: clamp(1rem,2.5vw,2rem); }
.event-link { justify-self: center; }
.event-link { grid-column: 1/-1; text-decoration: underline; text-underline-offset: .28em; }
#juice-events-dialog .media-tile { inset: auto; width: 100%; }
.bottle-viewport {
  grid-column: 1/-1; align-self: stretch; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
}
.bottle-stage {
  position: relative; width: 100%; height: 100%; min-height: 220px;
  container-type: size; isolation: isolate;
}
.bottle-choice {
  --x: 25cqw; --scale: 1; --y: 50cqh;
  position: absolute; top: 0; left: 0; display: grid; place-items: center;
  width: min(28cqw,34cqh); height: min(50cqw,62cqh); min-width: 44px; min-height: 44px;
  padding: 3px; border: 0; border-radius: .4rem; background: transparent;
  transform: translate3d(calc(var(--x) - 50%),calc(var(--y) - 50%),0) scale(var(--scale));
  will-change: transform; backface-visibility: hidden;
  transition: transform 640ms cubic-bezier(.22,.8,.25,1), opacity 450ms ease;
}
.bottle-choice:nth-of-type(2) { --x: 50cqw; }
.bottle-choice:nth-of-type(3) { --x: 75cqw; }
.bottle-choice img {
  display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain;
  filter: none;
  transition: transform 220ms ease; pointer-events: none;
}

.show-detail .bottle-choice:not([aria-expanded="true"]) { --scale: .8; opacity: 0; }
.show-detail .bottle-choice[aria-expanded="true"] { --x: 30cqw; --scale: 1.45; opacity: 1; z-index: 1; }
.juice-detail {
  position: absolute; left: 53%; right: 3%; top: 50%; transform: translateY(-50%);
  opacity: 0; visibility: hidden; transition: opacity 160ms, visibility 0s 160ms;
}
.show-detail .juice-detail { visibility: visible; opacity: 1; transition: opacity 240ms ease 380ms; }
.juice-detail { text-align: center; }
.juice-detail h3 { font-weight: 700; font-size: clamp(2.2rem,4vw,3.8rem); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; margin: 0; }
.juice-detail button { margin-top: .65rem; text-decoration: underline; text-underline-offset: .28em; }
@media (max-width: 700px) {
  .bottle-stage { min-height: 355px; }
  .bottle-choice { --x: 17cqw; width: 30cqw; height: min(58cqw,33cqh); }
  .bottle-choice:nth-of-type(3) { --x: 83cqw; }
  .show-detail .bottle-choice[aria-expanded="true"] { --x: 50cqw; --y: 30cqh; --scale: 1.65; }
  .juice-detail { top: 61%; left: 2%; right: 2%; transform: none; text-align: center; }
  .juice-detail h3 { font-size: clamp(1.75rem,6.5vw,2.35rem); }
}
@media (prefers-reduced-motion: reduce) {
  .bottle-choice, .bottle-choice img, .juice-detail, .show-detail .juice-detail { transition: none; }
  .bottle-choice:hover img { transform: none; }
}

.yoga-space { grid-template-columns: minmax(0,1fr); }
.featured-yoga {
  width: min(100%,1040px); justify-self: center;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: center; gap: clamp(1rem,2vw,2rem);
}
.featured-yoga .media-tile { aspect-ratio: 16/9; height: auto; max-height: 100%; }
@media (max-width:680px) and (orientation:portrait) {
  .featured-yoga { grid-template-columns: minmax(0,1fr); width: min(100%,420px); gap: .9rem; }
  .featured-yoga .media-tile:first-child { align-self: end; }
  .featured-yoga .media-tile:last-child { align-self: start; }
}

.welcome-content::before, .space-bottom::before, .juice-detail::before { display: none; }
.space-heading h2, .juice-detail h3, .organizations { text-shadow: none; }
.home-control, .orbit-footer nav, .event-link { background: transparent; }

#library-grid { grid-auto-rows: minmax(130px,1fr); overflow-y: auto; padding: 10px; }

.interaction-hint { font-size: .875rem; line-height: 1.4; font-weight: 400; color: #52685b; text-align: center; margin: .4rem 0 0; }
.heading-with-hint { text-align: center; }
.bottle-viewport { position: relative; }
.bottle-hint { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.bottle-viewport:has(.show-detail) .bottle-hint { visibility: hidden; }
#library-dialog[open] { grid-template-rows: auto auto minmax(0,1fr); }
#library-dialog > .interaction-hint { margin: 0 0 .65rem; }

#open-library, #juice-events { font-weight: 700; text-decoration: underline; text-underline-offset: .28em; }
.space-heading h2 { line-height: 1; letter-spacing: normal; }
.space-heading .button { font-weight: 700; font-size: 1rem; }
.organization-logos { display: flex; justify-content: center; align-items: center; gap: 2rem; }
.organization-logos img { width: 80px; height: 70px; object-fit: contain; }
@media (max-height:700px) { .organization-logos img { height: 46px; width: 60px; } .organizations p { margin-bottom: .3rem; } }

.site-header { justify-content: center; }
.bottle-choice { box-shadow: none; }
.bottle-choice:focus-visible { outline: none; }
.bottle-choice:focus-visible img { filter: drop-shadow(0 0 3px #126f43); }
.blend-taste { max-width: 32ch; margin: 1rem auto 0; font-size: 1rem; line-height: 1.5; color: #52685b; text-wrap: pretty; }

.bottle-choice[aria-expanded="true"] { transition-property: transform; }
.bottle-choice img { backface-visibility: hidden; }

@media (max-width:700px) and (max-height:700px) {
 .bottle-stage { min-height: 260px; }
 .bottle-stage.show-detail { min-height: 490px; }
 .show-detail .bottle-choice[aria-expanded="true"] { --y: 25cqh; --scale: 1.35; }
 .juice-detail { top: 49%; }
}
@media(max-width:420px) {
 .dialog-bar:has(h2) { grid-template-columns: minmax(0,1fr) auto; }
 .dialog-bar h2 { grid-column: 1; text-align: left; font-size: 1.5rem; }
 .dialog-bar:has(h2) .close-button { grid-column: 2; }
 input, textarea { font-size: 1rem; }
}

#juice-events-dialog .juice-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 3vw, 32px); }
#juice-events-dialog .juice-video-grid .media-tile { min-width: 0; min-height: 0; }
