/* Supporting copy shares the existing headings' scroll transitions
   (opacity + drift are mirrored from each heading by site-content.js).
   Each block is a large serif statement that comes into focus word by
   word, followed by a quieter supporting line. */
.section-copy {
  --copy-ink: #33231e;
  --copy-soft: #4e3026d9;
  --copy-glow: #fe5f0199;
  --copy-rule: #fe5f01;
  --copy-shadow: 0 0 0 #0000;
  --copy-gap: 32px;
  position: fixed;
  left: 50%;
  translate: -50% 0;
  width: min(900px, calc(100% - 64px));
  margin: 0;
  color: var(--copy-ink);
  text-align: center;
  opacity: 0;
}

.copy-lead {
  margin: 0;
  font-family: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(30px, 3.3vw, 52px);
  font-weight: 300;
  font-optical-sizing: auto;
  line-height: 1.12;
  letter-spacing: -.018em;
  text-wrap: balance;
}

.copy-body {
  max-width: 34em;
  margin: 1.5em auto 0;
  color: var(--copy-soft);
  font-family: Montserrat, sans-serif;
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .005em;
  text-wrap: pretty;
}

/* Focus pull: every word starts as soft light and sharpens into place. */
.copy-word {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, .5em, 0);
  text-shadow: var(--copy-shadow);
}

.copy-body::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  margin: 0 auto 1.5em;
  background: var(--copy-rule);
}

.copy-ready .copy-body {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

.copy-ready .copy-body::before {
  transform: scaleX(0);
}

.section-copy.is-in .copy-body::before {
  transform: none;
  transition: transform 1.4s cubic-bezier(.2, .65, .2, 1) calc(var(--words) * 55ms + .55s);
}

.section-copy.is-in .copy-word {
  opacity: 1;
  filter: none;
  transform: none;
  transition:
    opacity .9s cubic-bezier(.2, .65, .2, 1) calc(var(--i) * 55ms),
    filter 1.2s cubic-bezier(.2, .65, .2, 1) calc(var(--i) * 55ms),
    transform 1.2s cubic-bezier(.2, .65, .2, 1) calc(var(--i) * 55ms);
  animation: copy-glow 1.8s ease-out calc(var(--i) * 55ms) backwards;
}

.section-copy.is-in .copy-body {
  opacity: 1;
  transform: none;
  transition:
    opacity 1.1s ease-out calc(var(--words) * 55ms + .55s),
    transform 1.3s cubic-bezier(.2, .65, .2, 1) calc(var(--words) * 55ms + .55s);
}

@keyframes copy-glow {
  from { text-shadow: 0 0 .7em var(--copy-glow), 0 0 .15em var(--copy-glow); }
  to { text-shadow: var(--copy-shadow), 0 0 0 #0000; }
}

.section-copy--rise {
  --copy-ink: #fff;
  --copy-glow: #fffc;
  --copy-shadow: 0 1px 14px #172a3b80;
  z-index: 4;
  top: auto;
  bottom: 15vh;
  left: max(40px, calc((100vw - 1280px) / 2));
  translate: none;
  width: auto;
  max-width: calc(100% - 80px);
  text-align: left;
}

.section-copy--rise .copy-lead {
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 400;
}

.section-copy--lead {
  z-index: 11;
  top: calc(3vh + 22vw + var(--copy-gap));
}

.section-copy--aim {
  z-index: 12;
  top: calc(30vh + 5.2vw + var(--copy-gap));
}

.section-copy--beyond {
  --copy-ink: #fff;
  --copy-soft: #fff4e8eb;
  --copy-rule: #fff;
  --copy-glow: #fffc;
  z-index: 12;
  top: calc(50vh + 4.5vw + var(--copy-gap));
}

/* A shorter journey: the two scrolling chapters are trimmed so the whole
   story takes about three screens of scrolling instead of five. Webflow's
   title animations are tied to each section's progress, so they keep
   their shape and simply play over less distance. */
.section-content.section-2 {
  height: 140vh;
}

.section-content.section-3 {
  height: 170vh;
}

/* Menu: a small glass button that opens a full-screen dusk panel. The
   panel grows out of the button, the same way the sun circle grows at
   the end of the page. It holds the four chapters and the contact
   details, with the address always visible and copyable. */
.site-header-inner {
  position: relative;
  z-index: 2;
}

/* The logo turns warm dark brown over the light sections (set from
   site-content.js) and fades back to white elsewhere. Both states use
   the same list of filters so the change can fade smoothly. */
.site-brand img {
  filter: brightness(0) invert(1) sepia(0) drop-shadow(0 1px 4px #0003);
  transition: filter .5s ease;
}

.site-header.on-light .site-brand img {
  filter: brightness(0) invert(.17) sepia(1) drop-shadow(0 1px 4px #0000);
}

.menu-open .site-header.on-light .site-brand img {
  filter: brightness(0) invert(1) sepia(0) drop-shadow(0 1px 4px #0003);
}

.site-menu-toggle {
  position: absolute;
  top: 2px;
  right: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #33231e;
  background: #ffffff8f;
  border: 1px solid #ffffff8c;
  border-radius: 50%;
  box-shadow: 0 6px 24px #33231e1f;
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  transition:
    color .4s,
    background-color .4s,
    border-color .4s,
    box-shadow .4s,
    transform .5s cubic-bezier(.2, .65, .2, 1);
}

.site-menu-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1.5px;
  margin: -.75px 0 0 -9px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .6s cubic-bezier(.2, .65, .2, 1);
}

.site-menu-toggle span:first-child {
  transform: translate3d(0, -3.5px, 0);
}

.site-menu-toggle span:last-child {
  transform: translate3d(0, 3.5px, 0);
}

.site-menu-toggle:active {
  transform: scale(.94);
}

.menu-open .site-menu-toggle {
  color: var(--jabal-cream);
  background: #fff4e814;
  border-color: #fff4e847;
  box-shadow: none;
}

.menu-open .site-menu-toggle span:first-child {
  transform: rotate(45deg);
}

.menu-open .site-menu-toggle span:last-child {
  transform: rotate(-45deg);
}

.menu-open,
.menu-open body {
  overflow: hidden;
}

.site-menu-panel {
  --menu-x: calc(100% - 64px);
  --menu-y: 58px;
  --menu-r: 150vmax;
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--jabal-cream);
  background:
    radial-gradient(90% 60% at 100% 0%, #fe5f0152, #0000 70%),
    radial-gradient(120% 70% at 0% 100%, #f79f1926, #0000 65%),
    #21140f;
  pointer-events: auto;
  visibility: hidden;
  clip-path: circle(0 at var(--menu-x) var(--menu-y));
  transition:
    clip-path .6s cubic-bezier(.6, 0, .3, 1),
    visibility 0s .6s;
}

.menu-open .site-menu-panel {
  visibility: visible;
  clip-path: circle(var(--menu-r) at var(--menu-x) var(--menu-y));
  transition:
    clip-path .95s cubic-bezier(.6, 0, .15, 1),
    visibility 0s;
}

.site-menu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  box-sizing: border-box;
  max-width: 1360px;
  min-height: 100%;
  margin-inline: auto;
  padding: 148px 40px 56px;
}

.site-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(44px, min(7vw, 11.5vh), 96px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.022em;
  white-space: nowrap;
}

/* Chapters are buttons, not links: they move the page to a scroll
   position, and Webflow's own script would take over "#" links. */
.site-menu-nav button {
  margin: 0;
  padding: .05em 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 4px;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .3s, transform .5s cubic-bezier(.2, .65, .2, 1);
}

.site-menu-nav button:hover,
.site-menu-nav button:focus-visible {
  color: var(--jabal-amber);
  transform: translate3d(.14em, 0, 0);
}

/* Where the visitor currently is on the page. */
.site-menu-nav [aria-current] span::after {
  content: "";
  display: inline-block;
  width: .13em;
  height: .13em;
  margin-left: .24em;
  vertical-align: .36em;
  background: var(--jabal-orange);
  border-radius: 50%;
}

/* The same focus pull as the page statements, one chapter at a time. */
.site-menu-nav span {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, .45em, 0);
  transition: opacity .25s, filter .25s, transform .25s;
}

.menu-open .site-menu-nav span {
  opacity: 1;
  filter: none;
  transform: none;
  transition:
    opacity .9s cubic-bezier(.2, .65, .2, 1) calc(.3s + var(--i) * 80ms),
    filter 1.1s cubic-bezier(.2, .65, .2, 1) calc(.3s + var(--i) * 80ms),
    transform 1.1s cubic-bezier(.2, .65, .2, 1) calc(.3s + var(--i) * 80ms);
}

.site-menu-contact {
  align-self: flex-end;
  width: min(380px, 38%);
  font-family: Montserrat, sans-serif;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity .25s, transform .25s;
}

.menu-open .site-menu-contact {
  opacity: 1;
  transform: none;
  transition:
    opacity 1s ease-out .75s,
    transform 1.2s cubic-bezier(.2, .65, .2, 1) .75s;
}

.site-menu-contact::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, var(--jabal-orange), #fe5f0100);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.menu-open .site-menu-contact::before {
  transform: none;
  transition: transform 1.4s cubic-bezier(.2, .65, .2, 1) .8s;
}

.site-menu-label {
  margin: 0 0 6px;
  color: #fff4e8a8;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.site-menu-email {
  margin: 0;
  font-family: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(28px, 7.6vw, 40px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.015em;
  -webkit-user-select: all;
  user-select: all;
}

.site-menu-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
}

.site-menu-copy {
  min-width: 154px;
  min-height: 48px;
  padding: 0 24px;
  color: #21140f;
  background: var(--jabal-cream);
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 Montserrat, sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s, transform .2s;
}

.site-menu-copy:hover {
  background: #fff;
}

.site-menu-copy:active {
  transform: scale(.97);
}

.site-menu-copy.is-copied {
  background: var(--jabal-amber);
}

.site-menu-mail {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #fff4e866;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color .3s;
}

.site-menu-mail:hover {
  text-decoration-color: var(--jabal-amber);
}

.site-menu-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: #fff4e8a8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.site-menu-toggle:focus-visible,
.site-menu-panel a:focus-visible,
.site-menu-panel button:focus-visible {
  outline: 2px solid var(--jabal-amber);
  outline-offset: 4px;
}

@media screen and (max-width: 991px) {
  .section-copy {
    --copy-gap: 28px;
  }

  .section-copy--lead {
    top: calc(10vh + 22vw + var(--copy-gap));
  }

  .section-copy--aim {
    top: calc(33vh + 5.2vw + var(--copy-gap));
  }
}

@media screen and (max-width: 767px) {
  /* Header: logo on the left, menu button on the right. The logo sits as
     far from the top as from the left edge, the button as far from the
     right edge, and the button is centred on the logo's full height.
     The button is a little smaller and lighter than on desktop so its
     solid disc does not outweigh the logo's mark and wordmark. */
  .site-header {
    --header-gutter: 24px;
    --logo-height: 52px;
    --menu-button: 44px;
    padding: calc(var(--header-gutter) + env(safe-area-inset-top, 0px)) var(--header-gutter) 0;
  }

  .site-brand {
    width: calc(var(--logo-height) * 500 / 536);
    margin-inline: 0;
  }

  .site-menu-toggle {
    top: calc((var(--logo-height) - var(--menu-button)) / 2);
    width: var(--menu-button);
    height: var(--menu-button);
    background: #ffffff59;
    box-shadow: 0 4px 18px #33231e14;
  }

  /* Pull the chapter names left by the serif's side bearing, so the
     stems of R, L and B line up with the logo's left edge. */
  .site-menu-nav {
    margin-left: -.055em;
  }

  /* Chapters on top, contact details resting at the bottom of the screen. */
  .site-menu-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 128px var(--header-gutter) calc(var(--header-gutter) + env(safe-area-inset-bottom));
  }

  .site-menu-nav {
    font-size: clamp(36px, 12.4vw, 60px);
  }

  .site-menu-contact {
    align-self: stretch;
    width: auto;
    margin-top: auto;
    padding-top: 40px;
  }

  .hero-text,
  .hero-text.bolder {
    top: max(16vh, 138px);
  }

  /* The closing statement is taller than the old paragraph: lift its
     heading so the group sits around the middle of a phone screen. */
  .hero-text.better {
    top: 38vh;
  }

  .section-copy {
    --copy-gap: 26px;
    width: min(540px, calc(100% - 48px));
  }

  .copy-lead {
    font-size: clamp(29px, 9.1vw, 40px);
  }

  .copy-body {
    max-width: 21.5em;
    margin-top: 1.45em;
    font-size: 15px;
    line-height: 1.65;
  }

  .section-copy--rise {
    --copy-shadow: 0 1px 4px #172a3b99, 0 2px 18px #172a3b99;
    bottom: 12vh;
    left: 50%;
    translate: -50% 0;
    max-width: none;
    text-align: center;
  }

  .section-copy--rise .copy-lead {
    font-size: clamp(30px, 9vw, 40px);
  }

  .section-copy--lead {
    top: calc(max(16vh, 138px) + 22vw + var(--copy-gap));
  }

  .section-copy--aim {
    top: calc(33vh + 5.2vw + var(--copy-gap));
  }

  .section-copy--beyond {
    top: calc(38vh + 4.5vw + var(--copy-gap));
  }
}

@media screen and (max-width: 767px) and (max-height: 650px) {
  .site-menu-inner {
    padding-top: 104px;
  }

  .site-menu-nav {
    font-size: clamp(34px, 11vw, 44px);
  }

  .site-menu-contact {
    padding-top: 24px;
  }

  .hero-text.better {
    top: 30vh;
  }

  .section-copy--beyond {
    top: calc(30vh + 4.5vw + var(--copy-gap));
  }

  .copy-lead {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu-toggle,
  .site-menu-toggle span,
  .site-menu-nav button {
    transition: none;
  }

  /* No growing circle or focus pull: the panel simply fades in. */
  .site-menu-panel,
  .menu-open .site-menu-panel {
    clip-path: none;
    opacity: 0;
    transition: opacity .3s, visibility 0s .3s;
  }

  .menu-open .site-menu-panel {
    opacity: 1;
    transition: opacity .3s, visibility 0s;
  }

  .site-menu-nav span,
  .site-menu-contact,
  .site-menu-contact::before {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .copy-word,
  .copy-ready .copy-body,
  .copy-ready .copy-body::before {
    filter: none;
    transform: none;
  }

  .section-copy.is-in .copy-word,
  .section-copy.is-in .copy-body {
    transition: opacity .6s ease-out;
    animation: none;
  }
}
