/* =========================================================================
   Federico Estudillo Production | Coming Soon
   Flat-colour motion graphics in realistic deep space (navy, not purple).
   Purple lives only in the logo and the 3D block under COMING SOON. No gradients.
   One 10s loop: slash + flash reveal -> logo -> COMING SOON -> wipe out.
   Keyframe percentages map to seconds as  t(s) x 10 = %.
   ========================================================================= */

:root {
  --base: #0a1024;      /* deep-space navy (page) */
  --deep: #151e3d;      /* bands, buttons, wipe */
  --soft: #a9b6d8;      /* secondary text */
  --ice: #dbe4f7;       /* light lines, rings */
  --line: rgba(255, 255, 255, .14);
  --violet: #7c3aed;
  --neon: #a855f7;
  --lilac: #c084fc;
  --mist: #e9d5ff;
  --white: #ffffff;

  --cycle: 10s;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --beat: 5.6s;
}

/* Values the script changes every frame. Registered as non-inheriting so
   an update restyles only the element that uses it, not everything inside. */
@property --cam-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --cam-y { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --cam-z { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --cam-r { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --rx    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --ry    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --pump  { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --hrx   { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --hry   { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --ly    { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --ls    { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --lr    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --sway  { syntax: '<angle>';  inherits: false; initial-value: 0deg; }

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

/* the whole sky is a toy: drag spins the Earth */
html { cursor: grab; }
html.dragging,
html.dragging * { cursor: grabbing !important; }

body {
  min-height: 100svh;
  overflow: hidden;
  background: var(--base);
  color: var(--white);
  font-family: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: pinch-zoom;
  -webkit-user-select: none;
          user-select: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* =========================================================================
   BACKGROUND
   ========================================================================= */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }

/* star field: drifting layers, parallax with the mouse */
.stars { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* realistic spinning Earth (WebGL), fades in once its photo has loaded */
.globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.globe-ready .globe { opacity: 1; }

/* canvas: flight arcs, city pings, cursor trail, sparks */
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ticker band across the top */
.marquee {
  position: absolute;
  left: -6vw; right: -6vw;
  top: clamp(10px, 3vh, 26px);
  height: clamp(30px, 4.2vh, 40px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--deep);
  rotate: -2deg;
}
.marquee__track {
  display: flex;
  flex: none;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  flex: none;
  font-family: "Unbounded", "Arial Black", sans-serif;
  font-weight: 800;
  font-size: clamp(11px, 1.3vw, 15px);
  letter-spacing: .16em;
  color: var(--soft);
}
.marquee__track b { color: var(--white); font-weight: 800; padding: 0 1.1em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================================
   STAGE
   ========================================================================= */

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.45rem, 1.6vh, 1.1rem);
  padding: 7vh 4vw 7vh;
  text-align: center;
}

/* camera layer: logo + headline, moved by the JS camera (--cam-*) */
.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: inherit;
  transform:
    translate(var(--cam-x, 0px), var(--cam-y, 0px))
    scale(var(--cam-z, 1))
    rotate(var(--cam-r, 0deg));
}

.logo {
  position: relative;
  width: min(92vw, 1020px, 80vh);
  aspect-ratio: 1983 / 787;
  perspective: 1400px;
}

/* the loop: slams in, holds, flies out. This animation is also the clock
   the script follows. The blur + flash on the way in and out is added by
   js/main.js only for those moments: a filter left on the whole logo for
   the full loop made the browser redraw it every frame. */
.logo__reveal { position: relative; width: 100%; height: 100%; }
.js .logo__reveal { opacity: 0; }
.is-live .logo__reveal { animation: logo-cycle var(--cycle) linear infinite both; }
@keyframes logo-cycle {
  0%, 4% {
    opacity: 0;
    transform: translateX(0) scale(1.4);
    animation-timing-function: cubic-bezier(.5, 0, .9, .4);
  }
  7.2% {
    opacity: 1;
    transform: translateX(0) scale(.965);
    animation-timing-function: cubic-bezier(.3, .7, .3, 1);
  }
  9.2% { transform: translateX(0) scale(1.012); }
  11.2%, 86% { opacity: 1; transform: translateX(0) scale(1); }
  88.4% {
    opacity: 1;
    transform: translateX(0) scale(1.03);
    animation-timing-function: cubic-bezier(.6, 0, .9, .5);
  }
  92%, 100% { opacity: 0; transform: translateX(-8%) scale(.86); }
}

.logo__tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
}
.logo__pump { width: 100%; height: 100%; transform: scale(var(--pump, 1)); }

.logo__float {
  position: relative;
  width: 100%;
  height: 100%;
  animation: float 6.4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(-1.6%) rotate(-.7deg); }
  50%      { transform: translateY(1.6%)  rotate(.7deg); }
}

.logo__img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 .6vw 1.2vw rgba(2, 4, 14, .55));
  animation: img-glitch var(--beat) steps(1) 2.4s infinite;
}

/* chrome light sweep, masked by the logo's own alpha */
.logo__shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask: url("../assets/logo-1200.webp") center / 100% 100% no-repeat;
          mask: url("../assets/logo-1200.webp") center / 100% 100% no-repeat;
}
/* two flat light bars (thick + thin) sweep across the chrome */
.logo__shine::before,
.logo__shine::after {
  content: "";
  position: absolute;
  top: -20%; bottom: -20%;
  left: -45%;
  width: 6%;
  background: rgba(255, 255, 255, .34);
  transform: translateX(0) skewX(-18deg);
  animation: shine var(--beat) var(--ease-in-out) 1.6s infinite;
}
.logo__shine::after {
  left: -33%;
  width: 1.8%;
  background: rgba(255, 255, 255, .55);
  animation-delay: 1.66s;
}
@keyframes shine {
  0%        { transform: translateX(0) skewX(-18deg); }
  34%, 100% { transform: translateX(560%) skewX(-18deg); }
}

/* video-signal glitch: two tinted copies flash in for a few frames */
.logo__glitch { position: absolute; inset: 0; pointer-events: none; }
.logo__glitch img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  mix-blend-mode: screen;
}
.logo__glitch img:first-child { filter: hue-rotate(-75deg) saturate(2.4); animation: glitch-a var(--beat) steps(1) 2.4s infinite; }
.logo__glitch img:last-child  { filter: hue-rotate(80deg) saturate(2.4);  animation: glitch-b var(--beat) steps(1) 2.4s infinite; }
@keyframes glitch-a {
  0%, 86%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
  87% { opacity: .85; transform: translateX(-1.4%); clip-path: inset(12% 0 58% 0); }
  88% { opacity: .85; transform: translateX(1.1%);  clip-path: inset(52% 0 20% 0); }
  89% { opacity: .7;  transform: translateX(-.6%);  clip-path: inset(30% 0 40% 0); }
  90% { opacity: .85; transform: translateX(1.6%);  clip-path: inset(70% 0 6% 0); }
  91% { opacity: .5;  transform: translateX(-.8%);  clip-path: inset(0 0 80% 0); }
}
@keyframes glitch-b {
  0%, 86%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
  87% { opacity: .8; transform: translateX(1.2%);  clip-path: inset(40% 0 35% 0); }
  88% { opacity: .8; transform: translateX(-1.5%); clip-path: inset(8% 0 70% 0); }
  89% { opacity: .6; transform: translateX(.9%);   clip-path: inset(62% 0 12% 0); }
  90% { opacity: .8; transform: translateX(-1%);   clip-path: inset(22% 0 52% 0); }
  91% { opacity: .4; transform: translateX(.5%);   clip-path: inset(84% 0 0 0); }
}
@keyframes img-glitch {
  0%, 86%, 92%, 100% { transform: none; }
  87% { transform: translateX(.5%) skewX(-2deg); }
  88% { transform: translateX(-.7%); }
  89% { transform: translateX(.3%) skewX(1.5deg); }
  90% { transform: translateX(-.4%); }
  91% { transform: none; }
}

/* four-point twinkles on the logo's own stars (flat white) */
.sparks { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--s) * 1%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0);
  animation: twinkle var(--t) ease-in-out var(--d) infinite;
}
.spark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  clip-path: polygon(50% 0, 55% 45%, 100% 50%, 55% 55%, 50% 100%, 45% 55%, 0 50%, 45% 45%);
}
@keyframes twinkle {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(0deg);    opacity: 0; }
  10%  { transform: translate(-50%, -50%) scale(1.15) rotate(30deg); opacity: 1; }
  22%  { transform: translate(-50%, -50%) scale(.75) rotate(60deg);  opacity: .9; }
  34%  { transform: translate(-50%, -50%) scale(0) rotate(90deg);    opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(0) rotate(90deg);    opacity: 0; }
}

/* pulse rings on the play button & Twitch badge */
.ping {
  position: absolute;
  border-radius: 24%;
  border: 2px solid var(--ice);
  opacity: 0;
  pointer-events: none;
  animation: ping 2.4s var(--ease-out) infinite;
}
.ping--play   { left: 49.9%; top: 84.6%; width: 9.2%; aspect-ratio: 1.75; animation-delay: 2s; }
.ping--twitch { left: 95.8%; top: 66.2%; width: 3.8%; aspect-ratio: 1;    animation-delay: 3.2s; }
@keyframes ping {
  0%   { transform: translate(-50%, -50%) scale(.96); opacity: .95; }
  100% { transform: translate(-50%, -50%) scale(1.9);  opacity: 0; }
}

/* ---- orbit rings with travelling comets (behind the logo) ---- */
.orbits {
  position: absolute;
  left: 50%; top: 50%;
  z-index: -1;
  width: 124%;
  translate: -50% -50%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}
.is-live .orbits {
  animation:
    orbits-cycle var(--cycle) linear infinite both,
    orbits-wobble 7s ease-in-out infinite;
}
@keyframes orbits-cycle {
  0%, 5.6%    { opacity: 0; scale: .35; }
  10.4%, 86%  { opacity: 1; scale: 1; }
  91%, 100%   { opacity: 0; scale: 1.35; }
}
@keyframes orbits-wobble {
  0%, 100% { rotate: -7deg; }
  50%      { rotate: -2deg; }
}
.orbit { fill: none; vector-effect: non-scaling-stroke; }
.orbit--base { stroke: var(--ice); stroke-opacity: .28; stroke-width: 1.5; }
.orbit--run {
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 42;
  animation: orbit-run var(--t) linear infinite var(--dir, normal);
}
.orbit--a { --t: 4s; }
.orbit--b { --t: 5.5s; --dir: reverse; stroke: var(--ice); }
.orbit--c { --t: 7s; stroke-dasharray: 4 21; }
@keyframes orbit-run { to { stroke-dashoffset: -100; } }

/* ---- shockwaves at the reveal ---- */
.logo__shock {
  position: absolute;
  left: 50%; top: 50%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--white);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}
.logo__shock--late { border-color: var(--ice); border-width: 8px; }
.is-live .logo__shock { animation: shock-cycle var(--cycle) linear infinite both; }
.is-live .logo__shock--late { animation-delay: .16s; }
@keyframes shock-cycle {
  0%, 4%     { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  4.1%       { opacity: 1; transform: translate(-50%, -50%) scale(.2); animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  13%, 100%  { opacity: 0; transform: translate(-50%, -50%) scale(5); }
}

/* ---- slash bars that shoot across at the reveal ---- */
.slashes {
  position: fixed;
  left: 0; right: 0;
  top: var(--logo-cy, 40%);
  z-index: 1;
  height: 0;
  pointer-events: none;
}
.slash {
  position: absolute;
  left: 0;
  width: 70vw;
  top: var(--y);
  height: var(--h);
  background: var(--c);
  transform: translateX(-120vw) skewX(-24deg);
}
.slash--1 { --y: -9vh; --h: 10px; --c: var(--white); }
.slash--2 { --y: -2vh; --h: 26px; --c: var(--violet); }
.slash--3 { --y: 7vh;  --h: 6px;  --c: var(--ice); }
.slash--4 { --y: 12vh; --h: 16px; --c: var(--deep); }
.is-live .slash { animation: slash-cycle var(--cycle) linear infinite both; }
.is-live .slash--2 { animation-delay: .06s; }
.is-live .slash--3 { animation-delay: .12s; animation-direction: reverse; }
.is-live .slash--4 { animation-delay: .04s; animation-direction: reverse; }
@keyframes slash-cycle {
  0%, 3%     { transform: translateX(-120vw) skewX(-24deg); animation-timing-function: cubic-bezier(.7, 0, .3, 1); }
  8%, 100%   { transform: translateX(130vw) skewX(-24deg); }
}

/* =========================================================================
   COMING SOON (the original white + violet block letters, now chrome)
   Each letter is a stack of flat layers, no gradients:
     face      chrome bands: white top, light silver, a white horizon line,
               violet steel below it, a lighter band at the bottom
     ::before  the 3D block: the original violet extrusion, deeper
     shine     a reflection that sweeps across the word: a steel band
               (shade) framed by two thin white glints (shine)
     flick     the original lilac wave, now a fading layer
     echo      a lilac outline that ripples out behind the letter
   Mouse + camera: the 3D block leans away (--ex / --ey), the chrome
   reflections slide up and down (--bs) and the headline tilts (--hrx / --hry).
   Letters lean toward the mouse (--ly / --ls / --lr are set from JS).
   ========================================================================= */

@property --p { syntax: '<percentage>'; inherits: false; initial-value: -60%; }

.soon {
  /* chrome bands, top to bottom */
  --m1: #ffffff;
  --m2: #d3cce8;
  --m3: #ffffff;
  --m4: #5d4f8f;
  --m5: #b4a7df;
  /* where each band starts down the letter box
     (Unbounded caps run from 14% to 86% of it); --bs slides them */
  --b1: 42.8%;
  --b2: 52.1%;
  --b3: 55.4%;
  --b4: 68.7%;
  --bs: 0%;
  /* the 3D block */
  --ex: .08em;
  --ey: .15em;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: .36em;
  row-gap: .12em;
  margin-top: clamp(.2rem, 1vh, .6rem);
  font-family: "Unbounded", "Arial Black", "Segoe UI Black", sans-serif;
  font-weight: 900;
  font-size: clamp(2.1rem, min(7.2vw, 8.6vh), 5.6rem);
  line-height: 1.04;
  letter-spacing: .035em;
  perspective: 700px;
  transform: perspective(900px) rotateX(var(--hrx, 0deg)) rotateY(var(--hry, 0deg));
}
.soon__word { display: inline-flex; white-space: nowrap; isolation: isolate; }

.soon__ch {
  position: relative;
  display: inline-block;
  color: var(--m1);
  transform-origin: 50% 85%;
  translate: 0 var(--ly, 0em);
  scale: var(--ls, 1);
  rotate: var(--lr, 0deg);
}
.soon__ch::before,
.soon__ch::after { content: attr(data-ch); }
.soon__ch::before,
.soon__ch::after,
.soon__m,
.soon__flick,
.soon__shade,
.soon__shine,
.soon__echo {
  position: absolute;
  left: 0; top: 0;
  font-style: inherit;
  pointer-events: none;
}

/* the 3D block, behind the face */
.soon__ch::before {
  z-index: -1;
  color: var(--violet);
  text-shadow:
    calc(var(--ex) * 0.1) calc(var(--ey) * 0.1) 0 var(--mist),
    calc(var(--ex) * 0.2) calc(var(--ey) * 0.2) 0 var(--violet),
    calc(var(--ex) * 0.3) calc(var(--ey) * 0.3) 0 var(--violet),
    calc(var(--ex) * 0.4) calc(var(--ey) * 0.4) 0 var(--violet),
    calc(var(--ex) * 0.5) calc(var(--ey) * 0.5) 0 var(--violet),
    calc(var(--ex) * 0.6) calc(var(--ey) * 0.6) 0 var(--violet),
    calc(var(--ex) * 0.7) calc(var(--ey) * 0.7) 0 var(--violet),
    calc(var(--ex) * 0.8) calc(var(--ey) * 0.8) 0 var(--violet),
    calc(var(--ex) * 0.9) calc(var(--ey) * 0.9) 0 #5b21b6,
    var(--ex) var(--ey) 0 #4c1d95,
    calc(var(--ex) * 1.12) calc(var(--ey) * 1.12) 0 #2e1065;
}

/* chrome bands over the face */
.soon__ch::after { color: var(--m2); clip-path: inset(calc(var(--b1) + var(--bs)) -.3em calc(100% - var(--b2) - var(--bs)) -.3em); }
.soon__m--line   { color: var(--m3); clip-path: inset(calc(var(--b2) + var(--bs)) -.3em calc(100% - var(--b3) - var(--bs)) -.3em); }
.soon__m--dark   { color: var(--m4); clip-path: inset(calc(var(--b3) + var(--bs)) -.3em calc(100% - var(--b4) - var(--bs)) -.3em); }
.soon__m--low    { color: var(--m5); clip-path: inset(calc(var(--b4) + var(--bs)) -.3em -.1em -.3em); }

/* the sweeping reflection, slanted: a wide steel band framed by two thin
   white glints. It shows on the white top and on the darker bands alike. */
.soon__flick { z-index: 1; color: var(--lilac); opacity: 0; }
.soon__shade,
.soon__shine { z-index: 2; --p: -60%; }
.soon__shade {
  color: #8576bd;
  clip-path: polygon(
    calc(var(--p) + 8%) 0%, calc(var(--p) + 30%) 0%,
    var(--p) 100%, calc(var(--p) - 22%) 100%);
}
.soon__shine {
  color: #fff;
  clip-path: polygon(
    var(--p) 0%, calc(var(--p) + 4%) 0%, calc(var(--p) - 26%) 100%,
    calc(var(--p) + 4%) 100%, calc(var(--p) + 34%) 0%, calc(var(--p) + 40%) 0%,
    calc(var(--p) + 10%) 100%, calc(var(--p) - 30%) 100%);
}

/* outline echo, furthest back */
.soon__echo {
  z-index: -2;
  color: transparent;
  -webkit-text-stroke: .03em var(--lilac);
  opacity: 0;
}

/* The letters' moves (fly in, hop, glitch, fly out) and the shine, flick,
   ripple and glitch slice are played from js/main.js, each only at its
   moment in the loop. As endless 10s CSS loops they kept every letter layer
   restyling on every frame even while nothing moved, which made phones lag. */
.js .soon:not(.is-shown) .soon__ch { opacity: 0; }

/* =========================================================================
   SOCIAL LINKS: the original pills (icon + handle, a light running around
   the border), each one floating on its own around the Earth.
   JS places them (--x / --y); without JS they sit in a row under the text.
   ========================================================================= */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  max-width: 1000px;
  margin-top: clamp(.2rem, 1vh, .6rem);
}
.float-socials .socials {
  position: fixed;
  inset: 0;
  z-index: 3;
  max-width: none;
  margin: 0;
  pointer-events: none;
}
.social {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px 0 16px;
  border-radius: 22px;
  border: 1.5px solid rgba(192, 132, 252, .5);
  background: #24064d;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: auto;
  transition: background-color .25s ease, border-color .25s ease;
}
.float-socials .social {
  position: absolute;
  left: 0;
  top: 0;
  translate: calc(var(--x, -999px) - 50%) calc(var(--y, -999px) - 50%);
  rotate: var(--sway, 0deg);
}
.social__icon { width: 20px; height: 20px; flex: none; }
.social__handle { white-space: nowrap; }

/* light that runs around each button's border */
.social__run {
  position: absolute;
  inset: -1.5px;
  width: calc(100% + 3px);
  height: calc(100% + 3px);
  overflow: visible;
  pointer-events: none;
}
.social__run rect {
  fill: none;
  stroke: var(--white);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 14 86;
  animation: run 3.2s linear infinite;
  animation-delay: calc(var(--i) * -.8s);
}
@keyframes run { to { stroke-dashoffset: -100; } }

.js .social { opacity: 0; }
.is-live .social { animation: social-in .8s var(--ease-out) calc(1.8s + var(--i) * .12s) both; }
@keyframes social-in {
  from { opacity: 0; transform: translateY(18px) scale(.9); }
  to   { opacity: 1; transform: none; }
}
.social:hover,
.social:focus-visible {
  background: var(--violet);
  border-color: var(--mist);
}
.social:hover .social__icon,
.social:focus-visible .social__icon { animation: wiggle .5s ease-in-out; }
.social:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@keyframes wiggle {
  0%, 100% { transform: none; }
  25% { transform: rotate(-14deg) scale(1.15); }
  60% { transform: rotate(10deg) scale(1.1); }
}

/* =========================================================================
   TRANSITIONS & OVERLAYS
   ========================================================================= */

/* swoosh that carries the logo away at the end of every loop */
.wipe { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.wipe__bar {
  position: absolute;
  top: -15%;
  height: 130%;
  left: 0;
  width: var(--w);
  background: var(--c);
  transform: translateX(-80vw) skewX(-16deg);
}
.wipe__bar--1 { --w: 1.4vw; --c: var(--white); }
.wipe__bar--2 { --w: 12vw;  --c: var(--ice); }
.wipe__bar--3 { --w: 46vw;  --c: var(--deep); }
.is-live .wipe__bar { animation: wipe-cycle var(--cycle) linear infinite both; }
.is-live .wipe__bar--2 { animation-delay: .07s; }
.is-live .wipe__bar--3 { animation-delay: .14s; }
@keyframes wipe-cycle {
  0%, 87%    { transform: translateX(-80vw) skewX(-16deg); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  95%, 100%  { transform: translateX(180vw) skewX(-16deg); }
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--white);
  opacity: 0;
}
.is-live .flash { animation: flash-cycle var(--cycle) linear infinite both; }
@keyframes flash-cycle {
  0%, 3.8%    { opacity: 0; }
  4.2%        { opacity: .7; }
  7.2%, 100%  { opacity: 0; }
}

/* =========================================================================
   HINT: tells visitors the Earth can be spun; fades after the first drag
   ========================================================================= */

.hint {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 2.4vh, 22px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--deep);
  color: var(--ice);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  translate: -50% 0;
  animation: hint-in .9s var(--ease-out) 3.2s both;
}
.hint svg { width: 18px; height: 18px; flex: none; animation: hint-hand 2.2s ease-in-out infinite; }
.hint-done .hint { animation: hint-out .6s var(--ease-out) both; }
@keyframes hint-in  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hint-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px); } }
@keyframes hint-hand {
  0%, 100% { transform: translateX(-3px) rotate(-8deg); }
  50%      { transform: translateX(4px) rotate(8deg); }
}

/* =========================================================================
   SMALL SCREENS
   ========================================================================= */

@media (max-width: 640px) {
  .stage { padding: 9vh 4vw 9vh; gap: .55rem; }
  .logo { width: 94vw; }
  .soon {
    flex-direction: column;
    align-items: center;
    font-size: clamp(2.2rem, 12.5vw, 4rem);
    row-gap: 0;
  }
  .social { height: 42px; font-size: 13px; }
  .hint { font-size: 11.5px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .stage { padding: 6vh 3vw 6vh; gap: .3rem; }
  .logo { width: min(60vw, 92vh); }
  .soon { font-size: clamp(1.5rem, 8vh, 2.8rem); }
  .social { height: 36px; font-size: 12px; }
  .hint { display: none; }
}
