/* A soft, always-flowing gradient behind the whole page (owner's request). Four
   blurred colour fields drift slowly on their own; shared/aura.js sets their
   colours from the brand of the project in view, blending as the visitor scrolls
   from one project to the next. The project blocks are made see-through so it
   shows behind them. */
#aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--aura-base, #0A0A0B); }
#aura i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .55; scale: 1.06; will-change: transform; } /* no blur filter: it made scrolling lag (owner's report); the soft gradients below give the same look */
#aura i:nth-child(1) { left: -22vmax; top: -24vmax; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--aura-1) 80%, transparent) 0%, color-mix(in srgb, var(--aura-1) 70%, transparent) 24%, color-mix(in srgb, var(--aura-1) 48%, transparent) 48%, color-mix(in srgb, var(--aura-1) 24%, transparent) 70%, color-mix(in srgb, var(--aura-1) 8%, transparent) 87%, transparent 100%); animation: aura-a 26s ease-in-out infinite alternate; }
#aura i:nth-child(2) { right: -26vmax; top: -8vmax; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--aura-2) 80%, transparent) 0%, color-mix(in srgb, var(--aura-2) 70%, transparent) 24%, color-mix(in srgb, var(--aura-2) 48%, transparent) 48%, color-mix(in srgb, var(--aura-2) 24%, transparent) 70%, color-mix(in srgb, var(--aura-2) 8%, transparent) 87%, transparent 100%); animation: aura-b 31s ease-in-out infinite alternate; }
#aura i:nth-child(3) { left: 8vmax; bottom: -34vmax; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--aura-3) 80%, transparent) 0%, color-mix(in srgb, var(--aura-3) 70%, transparent) 24%, color-mix(in srgb, var(--aura-3) 48%, transparent) 48%, color-mix(in srgb, var(--aura-3) 24%, transparent) 70%, color-mix(in srgb, var(--aura-3) 8%, transparent) 87%, transparent 100%); animation: aura-c 23s ease-in-out infinite alternate; }
#aura i:nth-child(4) { right: -10vmax; bottom: -30vmax; width: 52vmax; height: 52vmax; opacity: .4; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--aura-1) 80%, transparent) 0%, color-mix(in srgb, var(--aura-1) 70%, transparent) 24%, color-mix(in srgb, var(--aura-1) 48%, transparent) 48%, color-mix(in srgb, var(--aura-1) 24%, transparent) 70%, color-mix(in srgb, var(--aura-1) 8%, transparent) 87%, transparent 100%); animation: aura-d 37s ease-in-out infinite alternate; }
@keyframes aura-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18vw, 14vh) scale(1.15); } 100% { transform: translate(6vw, 30vh) scale(.92); } }
@keyframes aura-b { 0% { transform: translate(0, 0) scale(1.05); } 50% { transform: translate(-20vw, 18vh) scale(.9); } 100% { transform: translate(-8vw, 36vh) scale(1.12); } }
@keyframes aura-c { 0% { transform: translate(0, 0) scale(.95); } 50% { transform: translate(22vw, -16vh) scale(1.1); } 100% { transform: translate(34vw, -6vh) scale(1); } }
@keyframes aura-d { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-26vw, -20vh) scale(1.2); } 100% { transform: translate(-12vw, -34vh) scale(.95); } }
@media (prefers-reduced-motion: reduce) { #aura i { animation: none; } }

/* Dark page (owner's request): black behind everything, the brand colours glowing
   through. The project blocks are see-through so the gradient shows behind them. */
html { color-scheme: dark; }
body { background: #0A0A0B; }
body #kedaipal, body #aislelys, body #sgcards, body #logos, body #deqly { background: transparent; }

/* text that sits on the background (headlines, "What you just watched", labels)
   turns light; the apps inside the windows keep their own colours */
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .hero h1, body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after h2, body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .cols h3, body #kedaipal .lab { color: #F4F4F5; }
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .hero p, body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .cols p, body #kedaipal .lab small, body :is(#kedaipal, #aislelys, #sgcards, #deqly) .hint { color: #A1A1AA; }
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .cols .k { border-top-color: rgba(255,255,255,.3); }
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .hint i { border-color: rgba(255,255,255,.25); }
/* each brand's label colour, lightened to read on black */
body #kedaipal .eyebrow, body #kedaipal .cols .k { color: #34D399; }
body #aislelys .eyebrow, body #aislelys .cols .k { color: #D9BC8C; }
body #aislelys .hero h1 em { color: #D9BC8C; }
body #sgcards .eyebrow, body #sgcards .cols .k { color: #FF6B63; }
body #deqly .eyebrow, body #deqly .cols .k { color: #FF7A7A; }
/* a faint light glow so the phones' black bezels stand off the black page; no dark
   shadow underneath (owner's request: it showed as a dark band below the phone) */
body #kedaipal .phone, body #aislelys .phone, body #sgcards .phone, body #deqly .phone {
  filter: drop-shadow(0 0 28px rgba(255,255,255,.10));
}

/* body text in every project's write-up (and the logo section's line) in a light,
   almost-white grey (owner's request) */
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .cols p, body #logos .lead { color: #E4E4E7; }
/* the dividing lines above each column, in the same almost-white grey (owner's request) */
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .cols .k { border-top-color: #E4E4E7; }

/* White grid over the whole page (owner's request, from a reference image): fixed
   behind the content, 20% opacity, fading out towards the corners and in soft patches.
   The pattern and its patches live on an inner layer that grid.js slides with a
   transform as the page scrolls, so the browser moves an already-drawn layer instead
   of repainting the masked grid every frame (owner's report: scrolling lagged).
   The layer repeats every 1440 px (9 grid tiles; 12 on the phone), so sliding it by
   scrollY % 1440 looks exactly like one endless sheet. */
#grid { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 45%, transparent 100%); }
#grid i { position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 1440px); will-change: transform;
  background: url(grid.svg) 0 0 / 160px 160px repeat;
  -webkit-mask-image: radial-gradient(circle at 20% 360px, transparent 0, #000 26vmax), radial-gradient(circle at 78% 1080px, transparent 0, #000 24vmax);
  mask-image: radial-gradient(circle at 20% 360px, transparent 0, #000 26vmax), radial-gradient(circle at 78% 1080px, transparent 0, #000 24vmax);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  -webkit-mask-size: 100% 1440px; mask-size: 100% 1440px;
  -webkit-mask-repeat: repeat-y; mask-repeat: repeat-y; }
@media (max-width: 699px) { #grid i { background-size: 120px 120px; } }

/* Phone: side room for body text and descriptions, 34 px a side (owner's requests:
   first 56 px, then 40% less),
   clear of the project indicator and its Navigation label on the right edge */
@media (max-width: 699px) {
  body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .inner { padding-left: 18px; padding-right: 18px; }
  body :is(#kedaipal, #aislelys, #sgcards, #deqly) .hero p { max-width: calc(100vw - 68px); margin-left: auto; margin-right: auto; }
  body #logos .lead { padding-left: 18px; padding-right: 18px; }
}

/* the write-ups are pulled up over the bottom of their stage; let clicks through
   their empty top so the "Visit live site" link under the window stays clickable */
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after { pointer-events: none; }
body :is(#kedaipal, #aislelys, #sgcards, #deqly) .after .inner { pointer-events: auto; }

/* light on the grid (shared/gridfx.js, owner's request): beams travelling between
   crosshairs and crosshairs glinting like stars as the visitor scrolls. Same corner
   fade as the grid; kept faint. */
#gridfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .7;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 45%, transparent 100%); }

/* Phone: the projects' headlines 15% bigger (owner's request; were 34 px, Aislelys 38 px).
   The wordmark logo under them keeps its size. */
@media (max-width: 699px) {
  body :is(#kedaipal, #sgcards, #deqly) .hero h1 { font-size: 39.1px; }
  body #aislelys .hero h1 { font-size: 43.7px; }
}
