:root{
  /* Robinhood accent. Change --rh-accent-rgb only — every accent in this file
     is derived from it. */
  --rh-accent-rgb:180,255,0;
  --rh-accent:rgb(var(--rh-accent-rgb));
  --rh-accent-soft:rgba(var(--rh-accent-rgb),.30);
  --rh-accent-glow:rgba(var(--rh-accent-rgb),.55);

  --bg:#000000;
  --ink:#ffffff;
  --scene: min(94vw, 66vh);
}

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

html,body{
  height:100%;
  background:var(--bg);
  overflow:hidden;
  -webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;
  user-select:none;
  touch-action:manipulation;
  overscroll-behavior:none;
}

body{
  font-family:ui-sans-serif,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  cursor:pointer;
  background-image:
    radial-gradient(70% 55% at 38% 55%, rgba(var(--rh-accent-rgb),.10) 0%, rgba(0,0,0,0) 70%),
    radial-gradient(100% 100% at 50% 50%, #040502 0%, #000000 100%);
}

.stars{
  position:fixed;
  inset:-2px;
  background:url("../public/images/stars.png") repeat;
  background-size:512px 512px;
  opacity:.45;
  pointer-events:none;
  animation:drift 240s linear infinite;
}
@keyframes drift{to{background-position:512px 256px}}

/* ---------- background logo ---------- */
.brandmark{
  position:fixed;
  left:50%;
  top:50%;
  width:min(72vw, 72vh);
  aspect-ratio:1/1;
  transform:translate(-50%,-50%);
  /* Masked, not background-image: the source logo is near-black and would be
     invisible on the night sky. The mask keeps its shape, the colour is ours. */
  background-color:var(--rh-accent);
  -webkit-mask-image:var(--brand-logo);
  mask-image:var(--brand-logo);
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-size:contain;
  mask-size:contain;
  opacity:var(--brand-watermark-opacity, .05);
  pointer-events:none;
  z-index:1;
}

/* ---------- counter ---------- */
.top{
  position:fixed;
  top:0;left:0;right:0;
  display:flex;
  justify-content:center;
  padding:calc(env(safe-area-inset-top,0px) + 18px) 16px 0;
  pointer-events:none;
  z-index:3;
}

.count{
  font-size:clamp(34px, 11vw, 72px);
  font-weight:800;
  line-height:1;
  letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
  color:var(--rh-accent);
  text-shadow:0 0 22px var(--rh-accent-glow), 0 0 60px var(--rh-accent-soft);
  transition:transform .09s ease-out;
  will-change:transform;
}
.count.pop{transform:scale(1.06)}

/* ---------- scene ---------- */
.stage{
  position:relative;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
}

.scene{
  position:relative;
  width:var(--scene);
  aspect-ratio:1/1;
  opacity:0;
  transition:opacity .5s ease;
}
.scene.ready{opacity:1}

.earth{
  position:absolute;
  left:4%;
  top:34%;
  width:46%;
  aspect-ratio:1/1;
  border-radius:50%;
  box-shadow:
    0 0 0 1px rgba(var(--rh-accent-rgb),.16),
    0 0 26px 4px rgba(var(--rh-accent-rgb),.28),
    0 0 90px 14px rgba(var(--rh-accent-rgb),.16);
}

#globe{
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
}

.cat{
  position:absolute;
  left:48.2%;
  top:19.6%;
  width:50%;
  aspect-ratio:281/252;
  background-image:url("../public/images/cat-lick.webp");
  background-repeat:no-repeat;
  background-size:1300% 100%;
  background-position:0% 0;
  filter:drop-shadow(0 10px 26px rgba(0,0,0,.55));
  will-change:background-position;
}

/* The cap sits inside .cat, so it is positioned against the cat's own box and
   scales with it at every viewport. The head is static across all 13 lick
   frames — only the tongue and body move — so one still image stays put.
   The tilt is baked into hat.png; there is no transform here on purpose. */
.cat .hat{
  position:absolute;
  left:8.5%;
  top:30.5%;
  width:43%;
  aspect-ratio:457/262;
  background:url("../public/images/hat.png") no-repeat center/contain;
  pointer-events:none;
  will-change:transform;   /* main.js rides it along with the head each frame */
}

/* ---------- links ---------- */
.links{
  position:fixed;
  left:0;right:0;
  bottom:calc(env(safe-area-inset-bottom,0px) + 18px);
  display:flex;
  justify-content:center;
  gap:14px;
  z-index:4;
}

.link{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:rgba(var(--rh-accent-rgb),.07);
  border:1px solid rgba(var(--rh-accent-rgb),.22);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition:transform .16s ease, background .16s ease, border-color .16s ease;
}
.link img{
  width:26px;
  height:26px;
  object-fit:contain;
  display:block;
  pointer-events:none;
}
.link:hover{
  transform:translateY(-3px);
  background:rgba(var(--rh-accent-rgb),.14);
  border-color:var(--rh-accent);
}
.link:active{transform:translateY(-1px) scale(.96)}

@media (orientation:portrait){
  :root{--scene: min(98vw, 62vh)}
}

@media (max-width:380px){
  .link{width:46px;height:46px;border-radius:14px}
  .link img{width:23px;height:23px}
  .links{gap:11px}
}

@media (orientation:landscape) and (max-height:520px){
  :root{--scene: min(72vw, 76vh)}
  .count{font-size:clamp(24px,5vh,40px)}
}

@media (prefers-reduced-motion:reduce){
  .stars{animation:none}
}
