/* ==========================================================================
   Kabeela v7.1 — experimental layer. Sits on top of kabeela.css.
   Remove this file and kabeela-x.js and the site is v7 again.
   ========================================================================== */

/* Moving between pages: the old page goes into fog, the new one comes out of it */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: x-leave 0.55s cubic-bezier(0.4, 0, 0.6, 1) both; }
::view-transition-new(root) { animation: x-arrive 1.1s cubic-bezier(0.25, 0.6, 0.3, 1) both; }
@keyframes x-leave { to { opacity: 0; filter: blur(8px); } }
@keyframes x-arrive { from { opacity: 0; transform: translateY(14px); } }

/* 1. THE LAND'S SKY --------------------------------------------------------------------
   kabeela-x.js sets data-sky on <html> from the real sun over the land. Each hour grades
   the opening photograph, the closing one, and the dark grounds a little. */
html { --x-photo: none; --x-veil: transparent; --x-mist: 0; }
html[data-sky="night"]     { --pine: #101A1E; --pine-deep: #0A1216; --x-photo: brightness(0.82) saturate(0.62) contrast(1.04); --x-veil: rgba(10, 22, 50, 0.2); --x-mist: 0.14; }
html[data-sky="dawn"]      { --pine: #151F1F; --x-photo: brightness(0.8) saturate(0.68); --x-veil: rgba(126, 146, 172, 0.2); --x-mist: 0.5; }
html[data-sky="morning"]   { --x-photo: saturate(0.94) brightness(1.02); --x-mist: 0.36; }
html[data-sky="afternoon"] { --x-photo: saturate(1.05); }
html[data-sky="golden"]    { --x-photo: saturate(1.18) sepia(0.22) brightness(1.03); }
html[data-sky="dusk"]      { --pine: #171E20; --pine-deep: #101619; --x-photo: brightness(0.7) saturate(0.82); --x-veil: rgba(98, 60, 98, 0.24); --x-mist: 0.2; }
.hero-photo__img, .cover__img { filter: var(--x-photo); transition: filter 3s var(--ease); }

/* the hour, said quietly */
.land-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2em 0.7em; margin: 0; font-size: var(--fs-small); color: var(--text-quiet); }
.land-now span { font-family: var(--serif); font-style: italic; font-size: 1.3em; color: var(--text); }
.land-now i { font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.land-now--foot { margin-block-start: var(--s-4); }
.site-footer .land-now { color: rgba(237, 231, 218, 0.72); }
.site-footer .land-now span { color: #EDE7DA; }
.land-sun { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem); color: #F2CB84; }
.land-sun:empty { display: none; }

/* 5. MIST: three slow banks of fog under the words, above the photograph */
.mist { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: var(--x-veil); transition: background 3s var(--ease); }
.mist i { position: absolute; left: -60%; width: 120%; height: 34%; opacity: var(--x-mist); transition: opacity 3s var(--ease);
  background: radial-gradient(closest-side, rgba(236, 240, 238, 0.85), rgba(236, 240, 238, 0.35) 55%, rgba(236, 240, 238, 0) 100%);
  animation: mist-drift 95s linear infinite; will-change: transform; }
.mist i:nth-child(1) { top: 46%; }
.mist i:nth-child(2) { top: 58%; height: 26%; animation-duration: 140s; animation-delay: -60s; }
.mist i:nth-child(3) { top: 30%; height: 22%; animation-duration: 180s; animation-delay: -110s; opacity: calc(var(--x-mist) * 0.6); }
@keyframes mist-drift { from { transform: translate3d(-12%, 0, 0); } to { transform: translate3d(118%, 0, 0); } }

/* 2. THE CLIMB: an altitude scale down the right edge. White under "difference" reads
   dark on the pale sections and pale on the green ones, so it needs no second colour. */
.alt { position: fixed; z-index: 250; inset-inline-end: 0.9rem; top: 50%; height: min(46vh, 22rem); transform: translateY(-50%);
  display: none; flex-direction: column; align-items: center; gap: 0.5rem; color: #fff; mix-blend-mode: difference;
  font-size: 0.6875rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; opacity: 0.42; transition: opacity 1.2s var(--ease); pointer-events: none; }
.alt.is-moving { opacity: 0.95; }
.alt.is-carrying .alt__mark::after { width: 11px; height: 11px; margin: -5.5px; transition: width 0.6s var(--ease), height 0.6s var(--ease), margin 0.6s var(--ease); }
.alt__line { position: relative; flex: 1; width: 9px;
  background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
              repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 10%) right / 5px 100% no-repeat; }
.alt__mark { position: absolute; left: -3px; right: -3px; height: 1px; background: currentColor; top: calc(var(--at, 0) * 100%); }
.alt__mark::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: currentColor; }
.alt__num { position: absolute; inset-inline-end: 1.5rem; top: calc(1.4rem + var(--at, 0) * (100% - 2.8rem)); transform: translateY(-50%); white-space: nowrap; font-size: 0.8125rem; }
@media (min-width: 68rem) { .alt { display: flex; } }
/* phones: only the number, bottom corner, while the page is moving */
@media (max-width: 67.99rem) {
  .alt { display: block; top: auto; bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px)); height: auto; transform: none; opacity: 0; }
  .alt.is-moving { opacity: 0.9; }
  .alt__top, .alt__foot, .alt__line { display: none; }
  .alt__num { position: static; transform: none; }
}

/* 3. INSIDE THE NAME ------------------------------------------------------------------- */
.rootwalk { --bg: var(--pine-deep); --text: var(--limestone); --text-soft: rgba(237, 231, 218, 0.86); --text-quiet: #B4BFB6; --rule: rgba(237, 231, 218, 0.18); --word: #E4DCCB;
  position: relative; background: var(--pine-deep); color: var(--text); }
.rootwalk__stage { padding-block: var(--section); }
.rootwalk__head { display: grid; gap: var(--s-3); }
.rootwalk__root { display: flex; align-items: baseline; gap: 0.9em; margin: 0; font-size: var(--fs-small); color: var(--text-quiet); }
.rootwalk__root b { flex: none; white-space: nowrap; font-family: var(--arabic); font-weight: 400; font-size: 2.1rem; line-height: 1; color: #D9A548; letter-spacing: 0.3em; }
.rootwalk__steps { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: var(--s-7); }
.rootwalk__word { display: block; font-family: var(--arabic); font-size: clamp(4.5rem, 2rem + 13vw, 13rem); line-height: 1.5; color: var(--limestone); }
.rootwalk__word .is-root { color: #D9A548; }
.rootwalk__word .is-grown { color: rgba(237, 231, 218, 0.92); }
.rootwalk__say { display: block; font-family: var(--serif); font-style: italic; font-size: var(--fs-h3); color: var(--sage); }
.rootwalk__mean { display: block; font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-head); }
.rootwalk__gloss { display: block; max-width: 30ch; margin-block-start: var(--s-3); font-size: var(--fs-lead); color: var(--text-soft); }

/* live: the section becomes a long walk and the stage stays in the window */
.rootwalk.is-live { height: calc(100vh + var(--steps, 4) * 78vh); }
.rootwalk.is-live .rootwalk__stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: calc(var(--header-h) + var(--s-4)) var(--s-6); display: flex; flex-direction: column; overflow: hidden; }
.rootwalk.is-live .rootwalk__stage::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 42% at 62% 46%, rgba(217, 165, 72, 0.13), rgba(217, 165, 72, 0) 70%); opacity: calc(0.35 + var(--walk, 0) * 0.65); }
.rootwalk.is-live .wrap { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; }
.rootwalk.is-live .rootwalk__steps { position: relative; flex: 1; margin: 0; display: block; min-height: 0; }
.rootwalk.is-live .rootwalk__step { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translate3d(0, 9%, 0); filter: blur(10px); pointer-events: none;
  transition: opacity 1.1s var(--ease), transform 1.4s var(--ease), filter 1.1s var(--ease); }
.rootwalk.is-live .rootwalk__step.is-past { transform: translate3d(0, -9%, 0); }
.rootwalk.is-live .rootwalk__step.is-on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.rootwalk.is-live .rootwalk__word { text-align: start; margin-block-end: -0.12em; }
.rootwalk.is-live .rootwalk__word .is-grown { opacity: 0; transition: opacity 1.4s var(--ease) 0.55s; }
.rootwalk.is-live .is-on .rootwalk__word .is-grown { opacity: 1; }      /* the root arrives first; the rest of the word grows around it */
.rootwalk__ticks { position: absolute; inset-inline-start: var(--gutter); bottom: var(--s-6); display: flex; gap: 0.5rem; }
.rootwalk__ticks i { width: 2.25rem; height: 1px; background: var(--rule); transition: background 0.9s var(--ease); }
.rootwalk__ticks i.is-on { background: #D9A548; }
@media (min-width: 56rem) {
  .rootwalk.is-live .rootwalk__step { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: var(--s-8); }
  .rootwalk.is-live .rootwalk__word { flex: none; }
  .rootwalk.is-live .rootwalk__text { flex: 0 1 24rem; }
}
@media (max-height: 34rem) { .rootwalk__word { font-size: clamp(3.5rem, 22vh, 9rem); } }

/* 4. PRINTS ---------------------------------------------------------------------------- */
.pile { display: flex; gap: var(--s-4); overflow-x: auto; padding-inline: var(--gutter); padding-block: var(--s-4) var(--s-6); }   /* without scripts: a plain row */
.pile__print { flex: none; margin: 0; padding: 7px 7px 9px; background: #F1ECE1; border-radius: 1px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7); }
.pile__print img { display: block; height: clamp(9rem, 6.5rem + 7vw, 13.5rem); width: auto; border-radius: 0; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.pile.is-live { position: relative; display: block; overflow: hidden; padding: 0; height: clamp(38rem, 88vh, 54rem); touch-action: pan-y; }
.pile.is-live .pile__print { position: absolute; left: 0; top: 0; cursor: grab; will-change: transform; touch-action: pan-y;
  transition: box-shadow 0.4s var(--ease), filter 0.4s var(--ease); }
.pile.is-table .pile__print:hover { filter: brightness(1.05); }
.pile.is-live .pile__print.is-held { cursor: grabbing; box-shadow: 0 34px 60px -18px rgba(0, 0, 0, 0.85); }
.pile.is-deck { height: min(74vh, 36rem); }
.pile.is-deck .pile__print { transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), box-shadow 0.4s var(--ease); pointer-events: none; }
.pile.is-deck .pile__print.is-top { pointer-events: auto; }
.pile.is-deck .pile__print.is-held { transition: box-shadow 0.4s var(--ease); }
.pile.is-deck .pile__print.is-under { opacity: 0; transition: none; }
.pile.is-deck .pile__print img { height: auto; width: auto; max-width: 76vw; max-height: min(58vh, 28rem); }
.pile__hint { margin: 0; color: var(--text-quiet); font-size: var(--fs-small); }
.pile__hint [data-for="table"], .pile__hint [data-for="deck"] { display: none; }
.pile.is-table ~ .wrap [data-for="table"], .pile.is-deck ~ .wrap [data-for="deck"] { display: inline; }
.pile__next { display: none; margin-inline-start: 1em; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.pile.is-deck ~ .wrap .pile__next { display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .mist i { animation: none; }
}

/* Join: an open day in the fog. The headline sits in the fog, the lead on the ground. */
.hero-photo--walk { --dusk: 50%; --ground: 44%; --lap-top: 16vw; --lap-bottom: 16vw; }
.hero-photo--walk .hero-photo__sky .display { font-size: clamp(2.5rem, 1rem + 3.7vw, 4.75rem); }
.hero-photo--walk .hero-photo__earth .lead { max-width: 44ch; }
@media (min-width: 75rem) { .hero-photo--walk .hero-photo__earth { padding-block-end: 3.5vw; } }

/* The sun as a handle. .sun-disc is what you see; .sun-handle is the larger area you can
   hold. The handle sits under the header and the header lets touches through wherever it
   has no link or button, so the sun can be big without ever covering the menu. */
.site-header { pointer-events: none; }
.site-header a, .site-header button, .site-header .site-nav { pointer-events: auto; }
.sun-handle { position: fixed; z-index: 299; top: 0; left: -38px; width: 76px; height: 50px; cursor: grab; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.sun-handle.is-held { cursor: grabbing; }
.sun-disc { position: fixed; z-index: 410; top: 4px; left: -8px; width: 16px; height: 16px; pointer-events: none; }
.sun-disc::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #F4CE86;
  box-shadow: 0 0 0 5px rgba(242, 203, 132, 0.14), 0 0 26px 9px rgba(240, 196, 120, 0.5), 0 0 4px 1px rgba(255, 236, 200, 0.9);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 1.2s var(--ease); animation: sun-breathe 7s ease-in-out infinite; }
@keyframes sun-breathe { 50% { box-shadow: 0 0 0 9px rgba(242, 203, 132, 0.1), 0 0 34px 13px rgba(240, 196, 120, 0.42), 0 0 4px 1px rgba(255, 236, 200, 0.9); } }
html[data-sky="night"] .sun-disc::before { background: #E9EDF2; animation: none;
  box-shadow: inset var(--cut, 6px) 0 0 0 #0A1216, 0 0 0 5px rgba(210, 222, 240, 0.08), 0 0 22px 7px rgba(210, 222, 240, 0.32); }
.sun-handle:hover + .sun-disc::before, .sun-handle:focus-visible + .sun-disc::before { transform: scale(1.45); }
.sun-handle.is-held + .sun-disc::before { transform: scale(1.8); }
.sun-handle.is-hinting + .sun-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; animation: sun-call 1.7s ease-out 3; }
@keyframes sun-call { from { box-shadow: 0 0 0 0 rgba(242, 203, 132, 0.65); } to { box-shadow: 0 0 0 26px rgba(242, 203, 132, 0); } }
.sun-tip { position: fixed; z-index: 409; top: 3.4rem; left: 0; padding: 0.3rem 0.8rem; border-radius: 999px; background: rgba(14, 23, 19, 0.82); color: #F2CB84;
  font-size: 0.75rem; letter-spacing: 0.08em; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 0.6s var(--ease); pointer-events: none; }
.sun-tip.is-on { opacity: 1; }
html.is-scrubbing .hero-photo__img, html.is-scrubbing .cover__img, html.is-scrubbing .mist, html.is-scrubbing .mist i { transition-duration: 0.45s; }

/* Trail markers on the climb */
.trail { display: none; position: fixed; z-index: 251; inset-inline-end: 0; width: 2.6rem; }
@media (min-width: 68rem) { .trail { display: block; } }
.trail__stop { position: absolute; inset-inline-end: 0; width: 2.6rem; height: 18px; margin-top: -9px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
.trail__stop i { position: absolute; inset-inline-end: calc(0.9rem + 2px); top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #C08A34; opacity: 0.55; transition: transform 0.5s var(--ease), opacity 0.5s var(--ease); }
.trail__stop.is-here i { opacity: 1; transform: scale(1.7); }
.trail__stop span { position: absolute; inset-inline-end: 2.5rem; top: 50%; transform: translate(8px, -50%); padding: 0.28rem 0.7rem; border-radius: 999px; background: rgba(14, 23, 19, 0.9); color: #EDE7DA;
  font-size: 0.75rem; letter-spacing: 0.04em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
.trail:hover .trail__stop span, .trail__stop:focus-visible span { opacity: 0.55; transform: translate(0, -50%); }
.trail .trail__stop:hover span, .trail__stop:focus-visible span { opacity: 1; color: #F2CB84; }
body:has(.trail:hover) .alt__num { opacity: 0; }
.alt__num { transition: opacity 0.4s var(--ease); }

/* Support: the newly planted beds under a wide sky */
.hero-photo--beds { --dusk: 56%; --ground: 46%; }
.hero-photo--beds .hero-photo__sky .display { max-width: 17em; }
