/* CL Hero widget. Builds on the homepage stylesheet (cl-uplift.css: .hero, .parallax, .sun,
   .logo-strip, .hero-l1/.hero-l2/.hand); everything here is scoped to .clh and driven by the
   CSS variables the widget prints. */
.clh{background:var(--clh-bg,var(--g800))}
.clh .hero-text{z-index:var(--clh-text-z,15)}
.clh .parallax{aspect-ratio:var(--clh-ratio,1600/1120);max-height:var(--clh-maxh,120vh)}
/* the headline stops shrinking at ~1170px but the scene keeps scaling, so on narrower desktops pull the scene up less (1.13.16: keeps the A to Z stack off Ben Nevis) */
@media (min-width:990px){.clh .parallax{margin-top:clamp(-300px,calc(-19vw + max(0px,(1920px - 100vw) * .2)),-60px)}}
.clh .header-overlay{z-index:var(--clh-ov-z,16)}
.clh .logo-strip{z-index:var(--clh-strip-z,18)}

/* ---- layers ---- */
.clh .clh-layer{z-index:var(--z,1)}
.clh .clh-img{position:absolute;left:var(--l,0%);bottom:var(--b,0%);width:var(--w,100%);max-width:none;height:auto;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none}
@media (max-width:989px){
  .clh .clh-img{left:var(--pl,var(--l,0%));bottom:var(--pb,var(--b,0%));width:var(--pw,var(--w,100%))}
  .clh .clh-hide-phone{display:none!important}
}
@media (min-width:990px){.clh .clh-hide-desk{display:none!important}}

/* ---- sun ---- */
.clh .sun{left:var(--sun-x,21%);top:var(--sun-y,26%);z-index:var(--sun-z,5);width:calc(clamp(120px,13.6vw,196px)*var(--sun-s,1));margin-left:calc(clamp(120px,13.6vw,196px)*var(--sun-s,1) / -2);font-size:calc(clamp(12px,1.25vw,18px)*var(--sun-s,1));background:var(--sun-bg,var(--yellow));color:var(--sun-fg,#1F2B13)}
@media (min-width:990px){.clh .sun[style*="--sun-xc"]{left:max(var(--sun-x,21%),calc(50% + var(--sun-xc)))}}
@media (max-width:989px){.clh .sun{left:var(--sun-px,19%);top:var(--sun-y,26%);z-index:var(--sun-pz,var(--sun-z,5))}}
.clh .sun.clh-pulse{animation:clhPulse 3.2s ease-in-out infinite}
@keyframes clhPulse{0%,100%{box-shadow:0 0 60px 12px color-mix(in srgb,var(--sun-bg,#E4D29C) 35%,transparent)}50%{box-shadow:0 0 90px 26px color-mix(in srgb,var(--sun-bg,#E4D29C) 55%,transparent)}}

/* ---- text lines: size (--s) and colour (--c) overrides on the existing styles ---- */
.clh .clh-line{--s:1}
.clh .hero-l1{font-size:calc(clamp(4.2rem,15vw,11rem)*var(--s));color:var(--c,#fff)}
.clh .hero-l2{font-size:calc(clamp(2.9rem,10.4vw,7.6rem)*var(--s));background-image:linear-gradient(180deg,var(--c,#fff) 10%,color-mix(in srgb,var(--c,#fff) 45%,transparent) 95%)}
.clh .hero-l2 .w,.clh .hero-l2 .l{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent}
.clh .hand{font-size:calc(clamp(1.4rem,2.8vw,2.3rem)*var(--s));color:var(--c,var(--yellow))}
.clh .clh-label{display:block;margin:0 0 1.2em;font:500 calc(clamp(11px,1vw,14px)*var(--s)) var(--mono,monospace);letter-spacing:.22em;text-transform:uppercase;color:var(--c,rgba(255,255,255,.8))}
.clh .clh-body{max-width:38em;margin:.9em auto 0;font:400 calc(clamp(15px,1.3vw,19px)*var(--s))/1.6 var(--sans,sans-serif);color:var(--c,rgba(255,255,255,.85))}
.clh .clh-line .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em;margin-bottom:-.08em}
.clh .clh-line .l{display:inline-block;will-change:transform}
.clh .clh-line[data-fx="wave"] .w{overflow:visible}

/* ---- sky extras (behind every layer) ---- */
.clh .clh-sky{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.clh .clh-star{position:absolute;border-radius:50%;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.7);animation:clhTwinkle 4s ease-in-out infinite}
@keyframes clhTwinkle{0%,100%{opacity:.15}50%{opacity:.95}}
.clh .clh-cloud{position:absolute;left:0;width:var(--cw,24vw);height:calc(var(--cw,24vw)*.28);border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.9),rgba(255,255,255,0));filter:blur(8px);animation:clhDrift 100s linear infinite}
@keyframes clhDrift{from{transform:translateX(-45vw)}to{transform:translateX(125vw)}}
.clh .clh-bird{position:absolute;left:0;width:calc(34px*var(--bs,1));animation:clhFly 34s linear infinite}
.clh .clh-bird svg{display:block;width:100%;fill:none;stroke:var(--clh-bird,rgba(226,234,228,.6));stroke-width:2.2;stroke-linecap:round;animation:clhFlap .55s ease-in-out infinite alternate;transform-origin:50% 60%}
@keyframes clhFly{from{transform:translate(-10vw,0)}50%{transform:translate(55vw,-3vh)}to{transform:translate(115vw,1vh)}}
@keyframes clhFlap{from{transform:scaleY(1)}to{transform:scaleY(-.35)}}
@media (prefers-reduced-motion:reduce){.clh .clh-star,.clh .clh-cloud,.clh .clh-bird,.clh .clh-bird svg,.clh .sun.clh-pulse{animation:none}.clh .clh-cloud,.clh .clh-bird{display:none}}

/* ---- Elementor editor: show the finished state (no load curtain, no scroll timeline) ---- */
.elementor-editor-active .clh .logo-strip{opacity:1}
.clh h1 .clh-line{display:block}
/* ---- sun as an award rosette (sun_style = rosette) ---- */
.clh .sun.clh-rosette{display:block;text-transform:none;letter-spacing:0;aspect-ratio:240/300;border-radius:0;background:none;box-shadow:none;filter:drop-shadow(0 14px 22px rgba(0,23,13,.5))}
.clh .sun.clh-rosette::before{content:"";position:absolute;left:8%;top:0;width:84%;aspect-ratio:1;border-radius:50%;box-shadow:0 0 70px 14px color-mix(in srgb,var(--sun-bg,#E4D29C) 30%,transparent);pointer-events:none}
.clh .sun.clh-rosette .ros-svg{transform-origin:50% 37%;transition:transform .8s cubic-bezier(.25,.46,.45,.94)}
.clh .sun.clh-rosette.clh-sway .ros-svg{animation:clhRosSway 7s ease-in-out infinite}
.clh .sun.clh-rosette:hover .ros-svg{animation-play-state:paused;transform:rotate(-5deg) scale(1.04)}
@keyframes clhRosSway{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(3deg)}}
@media (prefers-reduced-motion:reduce){.clh .sun.clh-rosette .ros-svg{animation:none}}
@media (max-width:989px){.clh .sun.clh-rosette{top:auto;bottom:9%;width:92px;margin-left:-46px}}
/* ---- A to Z line: the A and Z are filled with miniscule place names (tile built in cl-hero.js) ---- */
.clh .clh-atoz{margin:.3em auto 0;text-shadow:0 0 10px rgba(0,46,26,.9),0 0 22px rgba(0,46,26,.6);font:500 calc(clamp(.95rem,1.25vw,1.22rem)*var(--s))/1.1 var(--sans,sans-serif);letter-spacing:.01em;color:var(--c,#FBF6F2)}
.clh .atz{display:inline-block;position:relative;font:600 4.4em/.8 var(--serif,serif);letter-spacing:0;vertical-align:-.27em;padding:0 .02em;color:rgba(228,210,156,.9);-webkit-text-stroke:1px rgba(228,210,156,.85)}
.clh .atz.atz-ready{color:transparent;background-color:transparent;background-repeat:repeat-y,no-repeat;-webkit-background-clip:text;background-clip:text}
.clh .atz.atz-go{animation:atzRush 2.2s cubic-bezier(.12,.75,.2,1) both,atzFlow var(--atz-t,60s) linear 2.2s infinite}
@keyframes atzRush{from{background-position:var(--atz-x,0) calc(var(--atz-h,300px) * -6),0 0}to{background-position:var(--atz-x,0) 0,0 0}}
@keyframes atzFlow{from{background-position:var(--atz-x,0) 0,0 0}to{background-position:var(--atz-x,0) var(--atz-h,300px),0 0}}
.clh .atz-to{position:relative;display:inline-block;font-family:var(--hand,cursive);font-size:1.25em;color:var(--yellow,#E4D29C);padding:0 .1em}
.clh .atz-to svg{position:absolute;left:50%;bottom:-.55em;width:2.6em;height:.6em;transform:translateX(-50%);overflow:visible;fill:none;stroke:var(--yellow,#E4D29C);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.clh .atz-to path{stroke-dasharray:1;stroke-dashoffset:0}
.clh .clh-atoz.atz-wait .atz-to path{stroke-dashoffset:1}
.clh .clh-atoz.atz-draw .atz-to path{transition:stroke-dashoffset .9s cubic-bezier(.6,0,.3,1) .5s;stroke-dashoffset:0}
.clh .clh-atoz.atz-draw .atz-to path+path{transition-delay:1.35s;transition-duration:.3s}
.clh .clh-atoz + .hand{margin-top:.12em;line-height:1}
.clh .hand + .clh-label{margin-top:.5em}
.clh .clh-atoz + .hand,.clh .hand + .clh-label{text-shadow:0 0 8px rgba(0,46,26,.95),0 0 18px rgba(0,46,26,.85),0 0 34px rgba(0,46,26,.6)}
.clh .atz{text-shadow:none}
@media (prefers-reduced-motion:reduce){.clh .atz.atz-go{animation:none}.clh .clh-atoz.atz-wait .atz-to path{stroke-dashoffset:0}}
/* ---- "Words arrive" effect: .w stays put for the route spine, the inner .l / element units move ---- */
.clh .clh-line .w.aw{overflow:visible}
.clh .clh-line .aw .l,.clh .clh-line .aw-el{will-change:transform,opacity}
.clh .hero-l2 .aw .l{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent}
.clh .aw-p{display:none}
/* ---- rotating headline: the H1 and the .clh-slide siblings share one grid cell ---- */
.clh .clh-rot{display:grid;justify-items:center}
.clh .clh-rot>h1,.clh .clh-rot>.clh-slide{grid-area:1/1;align-self:center;margin:0}
.clh .clh-slide{visibility:hidden}
.clh .clh-slide .clh-line{display:block}
.clh .hero-l2 .aw{background:inherit;-webkit-background-clip:text;background-clip:text;color:transparent}
.clh .clh-slide .atz{font-size:1em;line-height:inherit;vertical-align:baseline;padding:0;-webkit-text-stroke:2px rgba(228,210,156,.85)}
.clh .clh-slide .atz-to{font:italic 500 .4em/1 var(--serif,serif);letter-spacing:0;color:#fff;vertical-align:.5em;margin:0 .2em}

.clh .clh-rot + .hand{margin-top:.45em}

/* A to Z slide: the same silver serif as "from", larger; the names are a dark engraving inside the silver */
.clh .clh-slide .hero-l2 .atz{font-size:1.55em;font-weight:500;-webkit-text-stroke:0}
.clh .clh-slide .atz.atz-silver{-webkit-text-stroke:.6px rgba(255,255,255,.35)}
.clh .clh-slide .hero-l2 .atz-to{font:500 .5em/1 var(--serif,serif);font-style:normal;letter-spacing:-.02em;background:linear-gradient(180deg,#fff 10%,rgba(255,255,255,.45) 95%);-webkit-background-clip:text;background-clip:text;color:transparent;vertical-align:.35em;margin:0 .15em}
/* word swap inside a slide ("homes > offices > memories"): the words share one grid cell */
.clh .clh-alts{display:grid;justify-items:center}
.clh .clh-alts>.clh-line{grid-area:1/1}
.clh .clh-alt+.clh-alt .l{opacity:0}
/* "(aside)" in a slide: handwritten, sits where the line under the headline is (that line steps out meanwhile) */
.clh .clh-rot{position:relative}
.clh .clh-aside,.clh .clh-pay{position:absolute;left:0;right:0;top:100%;margin-top:.3em;text-align:center;opacity:0;font-family:var(--hand,cursive);font-size:clamp(1.4rem,2.8vw,2.3rem);line-height:1.05;color:var(--yellow,#E4D29C);transform-origin:50% 50%;pointer-events:none;text-shadow:0 0 8px rgba(0,46,26,.95),0 0 18px rgba(0,46,26,.85),0 0 34px rgba(0,46,26,.6)}
.clh .clh-pay-long{font-size:clamp(1.1rem,1.95vw,1.6rem)}
/* handwriting reveal: payoffs, asides and the line under the rotating headline are written left to right (cl-hero.js tweens --w);
   they size to their text so the sweep covers only the words, and they sit straight */
.clh .clh-pay,.clh .clh-aside{left:0;right:0;margin-inline:auto;width:max-content;max-width:100%;transform:none}
.clh .clh-rot + .hand{width:fit-content;margin-inline:auto}
.clh .clh-pay,.clh .clh-aside,.clh .clh-rot + .hand,.clh .clh-line[data-fx="write"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(var(--w,115%) - 9%),transparent var(--w,115%));mask-image:linear-gradient(90deg,#000 calc(var(--w,115%) - 9%),transparent var(--w,115%))}
/* room inside the mask for the dark glow (padding), cancelled by margins so the text stays where it was */
.clh .clh-pay,.clh .clh-aside{padding:.4em 1em;margin-top:-.1em}
.clh .clh-rot + .hand{padding:.4em 1em;margin-top:.05em;margin-bottom:-.4em}


/* ---- phones and tablets (1.41.0): the hero fills the screen. The text is centred in the sky and the
   scene sits at the foot, scaled up with the spare height (it bleeds off both sides; 100% on short
   phones, 160% at most) so the city fills the screen rather than leaving flat sky. svh, not vh, so
   Safari's toolbar doesn't make it jump ---- */
@media (max-width:989px){
  .clh.hero{--clh-pw:clamp(100%,calc((100svh - 410px) * 1.43),160%);min-height:100vh;min-height:100svh;display:flex;flex-direction:column}
  .clh>.hero-text{margin-block:auto}
  .clh>.parallax{flex:none;width:var(--clh-pw);margin-left:calc((100% - var(--clh-pw)) / 2)}
  /* the badge's left is a % of the wider scene, so pin it to the screen's left edge instead */
  .clh .sun.clh-rosette{width:120px;margin-left:-60px;bottom:13%;left:calc(50% - 50vw + 76px)}/* 1.41.5: bigger and a little higher (was 92px at 9%) */
  .clh .clh-label{font-size:12.5px;letter-spacing:.16em;line-height:1.6}
  .clh .hand + .clh-label{margin-top:2.2em}/* room for a two-line payoff ("Aberdeen to Zetland...") */
  .clh .clh-pay,.clh .clh-aside{padding-inline:.35em;font-size:min(clamp(1.4rem,2.8vw,2.3rem),5.6vw)}
  .clh .clh-pay:not(.clh-pay-long),.clh .clh-aside{white-space:nowrap}
}
/* hero 1.0.2: phones - a long payoff ("Aberdeen to Zetland, and every town between") stays on two lines, clear of the label */
@media (max-width:989px){.clh .clh-pay-long{font-size:min(1.1rem,4.6vw)}}
