/* Era pass 1 (Dec 2026): the things that cross the joins between sections, and the wrapper
   that lets every photograph drift inside its frame. The fronds, seams and domes are added by
   js/era.js; without script none of them shows and the page reads as it did. */

/* ---------- photographs drift inside their frames ---------- */
.frame>.depth-wrap{ display:block;width:100%;height:100%; }
.depth-wrap>img{ display:block;width:100%;height:100%;object-fit:cover; }

/* ---------- seams: a zero-height line between two sections that things hang off ---------- */
.seam{ position:relative;height:0;z-index:5;pointer-events:none;overflow-x:clip;overflow-y:visible; }
.seam--stone{ --seam-bg:var(--stone); }
.seam--peach{ --seam-bg:var(--peach); }

/* the next ground arrives as a shallow dome, the hero's badge again */
.seam-arch{
  position:absolute;left:-8vw;right:-8vw;bottom:-1px;height:clamp(44px,9vw,180px);
  background:var(--seam-bg);border-radius:50% 50% 0 0 / 100% 100% 0 0;
  transform-origin:50% 100%;will-change:transform;
}

/* or as a card laid over the section before it, as Banana Wharf already does */
.join-card{ position:relative;z-index:1;margin-top:-28px;border-radius:28px 28px 0 0; }
@media (max-width:899px){ .join-card{ margin-top:-20px;border-radius:20px 20px 0 0; } }

/* the Banana Wharf card's lift shadow is meant to fall upward on the run; keep it off the section below */
.chapter.is-overlay{ clip-path:inset(-160px 0 0 0); }

/* the venue names run in front of the palm that hangs over them, never behind it */
.intro > .register{ z-index:6; }

/* ---------- the palms from the Ocean Village boardwalk, in front of everything ---------- */
.frond{ position:absolute;z-index:5;width:var(--fw);rotate:var(--rot,0deg);pointer-events:none;will-change:transform; }
.frond-wind{ position:relative;transform-origin:var(--ox,100%) var(--oy,50%);will-change:transform; }
.frond-sway{ transform-origin:var(--ox,100%) var(--oy,50%);animation:frond-sway var(--sway,8s) ease-in-out infinite alternate; }
.frond picture,.frond img{ display:block;width:100%;height:auto; }
.frond--flip .frond-wind img{ transform:scaleX(-1); }

/* a second frond behind the first: darker, smaller, on its own slower sway */
.frond-back{ position:absolute;width:var(--bw,56%);left:var(--bl,auto);right:var(--br,auto);top:var(--bt,-38%);transform-origin:var(--ox,100%) var(--oy,50%);will-change:transform; }
.frond-back .frond-sway{ animation-duration:calc(var(--sway,8s) * 1.45);animation-direction:alternate-reverse; }
.frond-back img{ filter:brightness(.62) saturate(.8); }

@keyframes frond-sway{ from{ transform:rotate(-1.4deg); } to{ transform:rotate(1.8deg); } }
@media (prefers-reduced-motion:reduce){ .frond-sway{ animation:none; } }

/* where each one sits (desktop first). A frond may cross a photograph or a ground; the only words
   near one are the running venue names, which pass in front of it. Headings sit left, so on phones
   every frond comes in from the right. --side tells the script which way it leans in the wind,
   --travel scales how far it moves on scroll (less where words sit close by). */
.frond--intro{ --fw:clamp(240px,30vw,580px);right:-7vw;top:-14vw;--travel:.3;--ox:100%;--oy:55%;--sway:9s;--rot:4deg;--br:-4%;--bt:-44%;--bw:54%; }
.frond--intro .frond-back img{ transform:scaleX(-1); }
.frond--bw{ --fw:clamp(240px,30vw,580px);right:-6vw;top:-3vw;--ox:100%;--oy:0%;--sway:7.5s; }
.frond--ennios{ --fw:clamp(240px,30vw,580px);right:-8vw;top:-1.5vw;--travel:.3;--ox:100%;--oy:55%;--sway:8.5s;--rot:-6deg; }
.frond--gm{ --fw:clamp(230px,27vw,520px);--side:left;left:-6vw;top:-24vw;--travel:.4;--ox:0%;--oy:0%;--sway:8s;--rot:8deg; }
.frond--gm img{ filter:brightness(.6) saturate(.8); }
.frond--hire{ --fw:clamp(240px,28vw,540px);right:-6vw;top:-15vw;--ox:100%;--oy:0%;--sway:7s;--rot:7deg; }
.frond--cta{ --fw:clamp(260px,32vw,620px);right:-8vw;top:-14vw;--ox:100%;--oy:55%;--sway:10s;--rot:5deg;--br:-3%;--bt:-46%;--bw:52%; }
.frond--cta .frond-back img{ transform:scaleX(-1); }

/* phones and tablets: sized and placed off one capped width, so an iPad does not get a giant */
@media (max-width:899px){
  .frond-back{ display:none; }
  .frond{ --rot:0deg;--travel:1;top:calc(var(--fw) * -.71);right:calc(var(--fw) * -.38); }
  .frond--intro{ --fw:min(58vw,250px); }
  .frond--bw{ display:none; }
  .frond--ennios{ --fw:min(62vw,260px);top:calc(var(--fw) * -.65); }
  .frond--gm{ --fw:min(44vw,200px);--side:right;left:auto;top:calc(var(--fw) * -.91);--ox:100%; }
  .frond--gm .frond-wind img{ transform:scaleX(-1); }
  .frond--hire{ --fw:min(46vw,210px);top:calc(var(--fw) * -.93); }
  .frond--cta{ --fw:min(58vw,250px); }
}
