/* =====================================================================================
   HERO  ·  "SCROLL TO EXPLORE" CUE  ·  CONTROL PANEL
   Everything about the cue is controlled from the block below. Change a value, save, refresh.
   Sizes marked [u] are in "units": 1 unit = 1% of the page width (about 4 px on a phone).
   Behaviour (delay, when it hides, label text, on/off) is in js/config.js -> heroCue.
   ===================================================================================== */
.hero{
  /* ---- POSITION & GAPS ---- */
  --cue-bottom: 5;                 /* [u] distance of the whole cue from the bottom edge of the screen */
  --cue-gap: 2;                    /* [u] gap between the text and the arrow */

  /* ---- TEXT ---- */
  --cue-label-color: #ffffff;
  --cue-label-size: 2.7;           /* [u] font size */
  --cue-label-weight: 600;         /* 400 light ... 700 bold */
  --cue-label-tracking: .42em;     /* space between letters */
  --cue-label-transform: uppercase;/* uppercase | none | capitalize */
  --cue-label-opacity-min: .8;     /* the text gently "breathes" between this and 1 (set 1 for no breathing) */
  --cue-text-shadow-color: rgba(0,0,0,.55);
  --cue-font: var(--font-display);

  /* ---- ARROW (line + head share the same stroke) ---- */
  --cue-stroke: 2px;               /* thickness of the line AND the arrow head (px) */
  --cue-line-length: 11;           /* [u] total height of the arrow, tip included */
  --cue-arrow-size: 2.4;           /* [u] size of the arrow head (bigger = broader head) */
  --cue-line-color: #ffffff;
  --cue-arrow-color: #ffffff;
  --cue-line-fade: 40%;            /* the top of the line fades in; 0% = solid from the top, 100% = long fade */
  --cue-line-shadow-color: rgba(0,0,0,.35);

  /* ---- TRAVELLING LIGHT DROP ---- */
  --cue-drop-color: #ffffff;
  --cue-drop-length: 5.5;          /* [u] length of the light streak */
  --cue-drop-glow: 1.4;            /* [u] glow around it (0 = none) */
  --cue-speed: 2.2s;               /* one full loop (arrow head glows when the drop arrives) */
  --cue-speed-fast: 1.4s;          /* loop speed after the "nudge" (guest has not scrolled for a few seconds) */

  /* ---- OPTIONAL BOX BEHIND THE CUE (off by default = fully transparent) ---- */
  --cue-box-bg: rgba(8,28,56,0);   /* e.g. rgba(8,28,56,.4) to switch a dark glass box on */
  --cue-box-border-color: rgba(255,255,255,0);   /* e.g. rgba(255,255,255,.35) */
  --cue-box-border-width: 1px;
  --cue-box-radius: 8;             /* [u] corner roundness */
  --cue-box-blur: 0px;             /* e.g. 6px for frosted glass */
  --cue-box-pad-x: 6;              /* [u] */
  --cue-box-pad-y: 2;              /* [u] */

  /* ---- DARK FADE AT THE BOTTOM OF THE SCREEN (helps white text stay readable) ---- */
  --cue-scrim-opacity: .62;        /* DARKNESS of the bottom shade, exact to 2 decimals: 0 = none, .30 = light, .62 = current, .80 = strong, 1 = solid at the very bottom */
  --cue-scrim-color: 14,8,3;       /* R,G,B of the fade (14,8,3 = warm dark brown, 0,0,0 = black) */
  --cue-scrim-mid: .48;            /* how dark the shade still is halfway up, as a share of the above (0 = fades out fast, 1 = stays dark longer) */
  --cue-scrim-height: 40;          /* [u] how far up the fade reaches */

  /* ---- APPEAR / DISAPPEAR ---- */
  --cue-fade: .9s;                 /* fade in/out time */
  --cue-enter-shift: 3;            /* [u] how far it floats up while appearing */
}

/* =========================== styles (you normally do not need to touch below) =========================== */
.hero{--cue-u:calc(var(--W)*.01)}

.hero__cue{position:absolute;z-index:6;left:50%;bottom:calc(var(--cue-u)*var(--cue-bottom) + env(safe-area-inset-bottom,0px));
  transform:translate(-50%,calc(var(--cue-u)*var(--cue-enter-shift)));display:flex;flex-direction:column;align-items:center;
  padding:calc(var(--cue-u)*var(--cue-box-pad-y)) calc(var(--cue-u)*var(--cue-box-pad-x));
  background:var(--cue-box-bg);border:var(--cue-box-border-width) solid var(--cue-box-border-color);border-radius:calc(var(--cue-u)*var(--cue-box-radius));
  -webkit-backdrop-filter:blur(var(--cue-box-blur));backdrop-filter:blur(var(--cue-box-blur));
  color:var(--cue-label-color);font-family:var(--cue-font);cursor:pointer;
  opacity:0;visibility:hidden;pointer-events:none;-webkit-tap-highlight-color:transparent;
  transition:opacity calc(var(--cue-fade)*.8) ease,transform calc(var(--cue-fade)*.8) cubic-bezier(.2,.7,.2,1),visibility 0s calc(var(--cue-fade)*.8)}
.hero__cue.is-on{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0);
  transition:opacity var(--cue-fade) ease,transform var(--cue-fade) cubic-bezier(.2,.7,.2,1),visibility 0s}

.cue__label{font-size:calc(var(--cue-u)*var(--cue-label-size));font-weight:var(--cue-label-weight);letter-spacing:var(--cue-label-tracking);
  margin-right:calc(var(--cue-label-tracking)*-1);text-transform:var(--cue-label-transform);white-space:nowrap;
  text-shadow:0 0 calc(var(--cue-u)*2) var(--cue-text-shadow-color),0 1px calc(var(--cue-u)*.8) var(--cue-text-shadow-color)}

/* the arrow = one stem + one head, same stroke; the stem stops just short of the tip so nothing crosses the head */
.cue__arrow{position:relative;display:block;width:var(--cue-stroke);height:calc(var(--cue-u)*var(--cue-line-length));margin-top:calc(var(--cue-u)*var(--cue-gap))}
.cue__stem{position:absolute;left:0;right:0;top:0;bottom:calc(var(--cue-stroke)*.8);
  background:linear-gradient(to bottom,transparent,var(--cue-line-color) var(--cue-line-fade));
  clip-path:inset(0 -10px 0 -10px);filter:drop-shadow(0 0 calc(var(--cue-u)*.8) var(--cue-line-shadow-color))}
.cue__stem::after{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--cue-u)*var(--cue-drop-length));border-radius:var(--cue-stroke);
  background:linear-gradient(to bottom,transparent,var(--cue-drop-color));box-shadow:0 0 calc(var(--cue-u)*var(--cue-drop-glow)) var(--cue-drop-color);opacity:0}
.cue__head{position:absolute;left:50%;top:100%;box-sizing:border-box;width:calc(var(--cue-u)*var(--cue-arrow-size));height:calc(var(--cue-u)*var(--cue-arrow-size));
  border:solid var(--cue-arrow-color);border-width:0 var(--cue-stroke) var(--cue-stroke) 0;
  transform:translate(-50%,-50%) translateY(calc(var(--cue-u)*var(--cue-arrow-size)*-.7071)) rotate(45deg);
  filter:drop-shadow(0 0 calc(var(--cue-u)*.8) var(--cue-line-shadow-color))}

/* animation */
.hero__cue.is-on .cue__stem::after{animation:cue-drop var(--cue-speed) cubic-bezier(.55,0,.35,1) infinite}
.hero__cue.is-on .cue__head{animation:cue-head var(--cue-speed) ease-in-out infinite}
.hero__cue.is-on .cue__label{animation:cue-breathe calc(var(--cue-speed)*1.4) ease-in-out infinite}
.hero__cue.is-nudge .cue__stem::after,.hero__cue.is-nudge .cue__head{animation-duration:var(--cue-speed-fast)}
@keyframes cue-drop{0%{transform:translateY(calc(var(--cue-u)*var(--cue-drop-length)*-1));opacity:0}15%{opacity:1}80%{opacity:1}100%{transform:translateY(calc(var(--cue-u)*var(--cue-line-length)));opacity:0}}
@keyframes cue-head{0%,55%{opacity:.85}85%{opacity:1;filter:drop-shadow(0 0 calc(var(--cue-u)*1.4) var(--cue-drop-color))}100%{opacity:.85}}
@keyframes cue-breathe{0%,100%{opacity:var(--cue-label-opacity-min)}50%{opacity:1}}

/* dark fade at the bottom (follows the cue's visibility) */
.hero__scrim{position:absolute;z-index:5;left:0;right:0;bottom:0;height:calc(var(--cue-u)*var(--cue-scrim-height));pointer-events:none;opacity:0;transition:opacity var(--cue-fade) ease;
  background:linear-gradient(to top,rgba(var(--cue-scrim-color),var(--cue-scrim-opacity)),rgba(var(--cue-scrim-color),calc(var(--cue-scrim-opacity)*var(--cue-scrim-mid))) 50%,rgba(var(--cue-scrim-color),0))}
.hero__cue.is-on + .hero__scrim{opacity:1}

@media (prefers-reduced-motion:reduce){.hero__cue.is-on .cue__stem::after,.hero__cue.is-on .cue__head,.hero__cue.is-on .cue__label{animation:none}.hero__cue.is-on .cue__stem::after{opacity:0}}
