/* GENERATED by scripts/build-g4-divi.py from g4.html - do not edit.
   Edit g4.html and re-run the script. */

/* --- SplashCursor: the fluid, fixed over the whole page --------
   The demo cages it in a 1080×1080 div; that is the demo, not the
   component. pointer-events:none keeps every link underneath live. */
#fluid{
  position:fixed; inset:0; z-index:50;
  width:100vw; height:100vh; display:block;
  pointer-events:none;
}

/* --- Noise: the library's grain canvas, fixed instead of absolute
   so it holds still while the page scrolls ---------------------- */
#grain{
  position:fixed; inset:0; z-index:1;
  width:100vw; height:100vh;
  image-rendering:pixelated; pointer-events:none;
}

/* --- StarBorder: two radial gradients travelling the long way
   around the pill. Library ships black on #222; here the inner
   content keeps the theme's neon-pill look and only the travelling
   light is new. ------------------------------------------------- */
.star-border{
  display:inline-block; position:relative; overflow:hidden;
  padding:1px 0; border-radius:999px;
}
.star-border > .star-bottom,
.star-border > .star-top{
  position:absolute; width:300%; height:50%;
  opacity:.7; border-radius:50%; z-index:0; pointer-events:none;
  /* the library passes colour and speed as inline props; here they
     are custom properties, so a ghost button only overrides one */
  background:radial-gradient(circle,var(--star-color,var(--sun)),transparent 10%);
  animation-duration:var(--star-speed,6s);
}
.star-border > .star-bottom{ bottom:-11px; right:-250%; animation-name:star-bottom; animation-timing-function:linear; animation-iteration-count:infinite; animation-direction:alternate; }
.star-border > .star-top{    top:-11px;    left:-250%;  animation-name:star-top;    animation-timing-function:linear; animation-iteration-count:infinite; animation-direction:alternate; }
.star-border > .btn{ position:relative; z-index:1; }

@keyframes star-bottom{ 0%{ transform:translate(0,0); opacity:1; } 100%{ transform:translate(-100%,0); opacity:0; } }
@keyframes star-top{    0%{ transform:translate(0,0); opacity:1; } 100%{ transform:translate(100%,0);  opacity:0; } }

/* --- SpotlightCard: radial glow tracking the pointer ----------- */
.spotlight{
  position:relative; overflow:hidden;
  --mouse-x:50%; --mouse-y:50%;
  --spotlight-color:rgb(var(--sun-rgb)/.22);
  border:1px solid var(--line); border-radius:4px;
  padding:1.2rem;
  background:linear-gradient(170deg,rgb(var(--raise-rgb)/.9),rgb(var(--coal-rgb)/.6));
  transition:border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease;
}
.spotlight::before{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(circle at var(--mouse-x) var(--mouse-y),var(--spotlight-color),transparent 80%);
  opacity:0; transition:opacity .5s ease;
}
.spotlight:hover::before,
.spotlight:focus-within::before{ opacity:.75; }
.spotlight:hover{ border-color:var(--sun); box-shadow:0 0 26px rgb(var(--sun-rgb)/.22); transform:translateY(-2px); }
.spotlight > *{ position:relative; z-index:1; }

/* the date rows are spotlights too, but flat - a table, not a card */
.spotlight-row{
  background:none; border:0; border-bottom:1px solid var(--line); border-radius:0;
  --spotlight-color:rgb(var(--uvy-rgb)/.16);
}
.spotlight-row:hover{ border-color:transparent; border-bottom-color:var(--uvy); box-shadow:none; transform:none; }

/* --- GlareHover: a sheen sweeping across on hover -------------- */
.glare{
  position:relative; overflow:hidden;
  border:1px solid var(--line); border-radius:4px;
  background:var(--coal-2);
  --gh-angle:-45deg;
  --gh-duration:650ms;
  --gh-size:250%;
  --gh-rgba:rgb(var(--uvy-rgb)/.35);
}
.glare::before{
  content:""; position:absolute; inset:0; z-index:3; pointer-events:none;
  background:linear-gradient(var(--gh-angle),
    hsla(0,0%,0%,0) 60%,
    var(--gh-rgba) 70%,
    hsla(0,0%,0%,0),
    hsla(0,0%,0%,0) 100%);
  background-size:var(--gh-size) var(--gh-size),100% 100%;
  background-repeat:no-repeat;
  background-position:-100% -100%,0 0;
  transition:var(--gh-duration) ease;
}
.glare:hover::before{ background-position:100% 100%,0 0; }
.glare:hover{ border-color:var(--ember); }

/* --- Magnet: wrapper is static, inner one gets the translate --- */
.magnet{ position:relative; display:inline-block; }
.magnet-inner{ display:inline-block; will-change:transform; transition:transform .5s ease-in-out; }
.magnet.is-pulled .magnet-inner{ transition:transform .3s ease-out; }

/* A SplashCursor bed scoped to one section - the fluid from the demo,
   sized to its host instead of the viewport. Touch only: a cursor
   device already has the fluid across the whole page. */
.fluid-bed{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.fluid-bed canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }
#story > *:not(.fluid-bed),
#sets > *:not(.fluid-bed),
#dates > *:not(.fluid-bed),
#contact > *:not(.fluid-bed){ position:relative; z-index:1; }

/* --- touch: the two hover-driven bits, driven by the viewport ---
   GlareHover and SpotlightCard both hang off :hover, and a touch device
   never delivers one - so on a phone they are inert markup rather than
   effects. Same components, same declarations; an IntersectionObserver
   supplies the trigger the pointer cannot. Scoped to touch so the
   pointer-driven behaviour is untouched on desktop. */
@media (hover:none),(pointer:coarse){
  /* Brighter and quicker than the desktop hover versions, deliberately.
     A cursor rests on a tile for seconds; a scrolling thumb gives it a
     fraction of one, so the hover values are not subtle on a phone -
     they are invisible. Sheen 0.35 -> 0.55 alpha, 650ms -> 480ms; the
     card glow 0.45 -> 0.8 opacity over a stronger tint, plus the edge
     lift the pointer version gets on hover. */
  .glare{ --gh-rgba:rgb(var(--uvy-rgb)/.55); }

  /* A sweep fired once on arrival cannot survive every scroll speed:
     fling past and the window is missed, and any lead time big enough
     to fix that makes it finish before the tile arrives on a slow
     scroll. So on touch the sheen is an animation rather than a
     transition, running only while the tile is actually in view - at
     any speed there is always another pass coming. */
  .glare.is-swept::before{
    animation:glare-sweep 3.2s var(--glare-delay,0s) ease-in-out infinite;
  }
  .glare.is-swept{ border-color:var(--ember); }

  @keyframes glare-sweep{
    0%   { background-position:-100% -100%,0 0; }
    38%  { background-position:100% 100%,0 0; }
    100% { background-position:100% 100%,0 0; }
  }

  .spotlight{ --spotlight-color:rgb(var(--sun-rgb)/.5); }
  .spotlight.is-lit::before{ opacity:.8; }
  .spotlight.is-lit{
    border-color:rgb(var(--sun-rgb)/.6);
    box-shadow:0 0 26px rgb(var(--sun-rgb)/.18);
  }
  .spotlight-row{ --spotlight-color:rgb(var(--uvy-rgb)/.38); }
  .spotlight-row.is-lit{
    border-color:transparent; border-bottom-color:var(--uvy); box-shadow:none;
  }
}

/* --- no cursor, no cursor effects ------------------------------
   The JS never starts the two canvases on a touch device (see
   HAS_CURSOR below); this keeps them out of the layer tree too. */
@media (hover:none),(pointer:coarse){
  #fluid,#grain{ display:none; }
}


/* ------------------------------------------------------------------
   Divi wiring. The classes above are g4's; these are the ones Divi's
   layout emits. The JS adds g4's class to each, so every rule above
   applies unchanged rather than being duplicated for Divi's markup.
   Listed here only for the two that need a size or a stacking context.
   ------------------------------------------------------------------ */

/* Selectors here are deliberately OURS, not Divi's. Divi 5.11 still
   emits et_pb_* on the front end (it renders the D4 layouts through its
   legacy framework), but a page re-saved in the D5 Visual Builder
   converts to the block format, and nothing promises those generated
   class names survive it. module_id and module_class do survive - Divi
   carries them through either format - so everything below hangs off
   the ids and classes divi/layouts/ sets itself. */

/* a section holding a fluid bed must be a positioning context, and its
   own content has to sit above the canvas */
.g4-has-bed{ position:relative; }
.g4-has-bed > *:not(.fluid-bed){ position:relative; z-index:1; }

/* gallery tiles become GlareHover tiles */
.h-gallery-divi .g4-tile{ position:relative; overflow:hidden; }

/* .spotlight brings a card's padding with it; tod.css already gave the
   date row its own, so hand it back. .spotlight-row covers the rest
   (background, border, radius). */
.tod-date.spotlight{ padding:1rem .2rem; }
