@font-face {
  font-family: Pangolin;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/pangolin.woff2") format("woff2");
}

:root {
  --space: #100028;
  --ink: #fff6e8;
  --ink-dim: #d9c7ff;
  --orange: #f27c21;
  --gold: #ffe15a;
  --peach: #ffb347;
  --face: #7eb8ef;
  --stroke: #1a0a14;
  --panel: #2a0a55;
  --star-x: 34.7%;
  --star-y: 9.9%;
  --hand-x: 86%;
  --hand-y: 92%;
  --font: Pangolin, "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  color-scheme: dark;
}

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

html {
  background: var(--space);
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}

html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--font);
  background: transparent;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- space backdrop ---- */
.space {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--space);
  pointer-events: none;
}

.space-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 2800px;
  transform-origin: 50% 18%;
  will-change: transform;
}

.space-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

#dust {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* ---- landing stage ---- */
.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100svh;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wordmark {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 6.2vw, 2.6rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: #ffd27a;
  text-shadow:
    0 0 18px rgba(242, 124, 33, 0.7),
    0 0 3px rgba(255, 225, 90, 0.85),
    0 2px 0 rgba(26, 10, 20, 0.45);
}

/* ---- character ---- */
.wojak {
  position: relative;
  width: min(72vw, 36svh, 380px);
  aspect-ratio: 1089 / 1371;
  margin: 0 0 1.2svh;
  will-change: transform;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
}

.wojak-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.star-glow {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);
  z-index: 1;
  width: 28%;
  height: 22%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 236, 150, 0.95) 0%,
    rgba(255, 180, 50, 0.45) 34%,
    rgba(255, 140, 20, 0.0) 70%
  );
  filter: blur(2px);
  animation: twinkle 1.7s ease-in-out infinite;
  pointer-events: none;
}

.hand-spark {
  position: absolute;
  left: var(--hand-x);
  top: var(--hand-y);
  z-index: 3;
  width: 16%;
  height: 13%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 230, 0.9) 0%,
    rgba(255, 200, 80, 0.35) 40%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  animation: thumb-spark 4.8s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.88); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes thumb-spark {
  0%, 18%, 32%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  24% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.15); }
  28% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
}

/* ---- titles ---- */
.titles { margin: 0; }

h1 {
  margin: 0;
  line-height: 0.92;
  font-weight: 400;
}

h1 .name {
  display: block;
  font-size: clamp(1.05rem, 3.6vw, 1.7rem);
  letter-spacing: 0.06em;
  color: #f3e7ff;
  text-shadow: 0 0 12px rgba(163, 75, 255, 0.45);
}

h1 .ticker {
  display: block;
  margin-top: 0.08em;
  font-size: clamp(2.5rem, 11vw, 5.6rem);
  letter-spacing: 0.03em;
  color: var(--ink);
  text-shadow:
    0 0 22px rgba(242, 124, 33, 0.55),
    0 0 6px rgba(255, 225, 90, 0.45),
    0 2px 0 rgba(26, 10, 20, 0.5);
}

.tagline {
  margin: 0.35rem 0 0;
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ---- buttons ---- */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(14px, 2.6svh, 28px);
}

.pill {
  --fill: #ff9a3c;
  --ink-btn: #1a0a14;
  appearance: none;
  border: 3px solid var(--stroke);
  background: var(--fill);
  color: var(--ink-btn);
  min-width: 92px;
  padding: 0.42em 0.95em 0.5em;
  border-radius: 999px;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow:
    0 3px 0 var(--stroke),
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease-out, filter 0.16s ease-out;
}

.pill-buy { --fill: #ff9a3c; }
.pill-ca { --fill: #ffe15a; }
.pill-chart { --fill: #7eb8ef; }

.pill:hover {
  transform: rotate(-7deg) scale(1.07);
  filter: brightness(1.06);
}

.pill:active {
  transform: rotate(-3deg) scale(0.96) translateY(2px);
  box-shadow:
    0 1px 0 var(--stroke),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

.pill:focus-visible,
.orb:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: clamp(12px, 2.2svh, 24px);
}

.orb {
  appearance: none;
  text-decoration: none;
  width: clamp(58px, 8.4vw, 78px);
  height: clamp(58px, 8.4vw, 78px);
  padding: 0;
  border: 3px solid var(--stroke);
  border-radius: 50%;
  background: #6ec8c4;
  box-shadow:
    0 3px 0 var(--stroke),
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease-out;
  display: grid;
  place-items: center;
}

.orb:hover { transform: rotate(-8deg) scale(1.08); }
.orb:active { transform: rotate(-3deg) scale(0.95); }

.orb-face {
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  color: #ff4fd0;
  text-shadow: 0 1px 0 rgba(26, 10, 20, 0.35);
  line-height: 1;
  letter-spacing: 0.02em;
}

.disclaimer {
  margin: clamp(12px, 2svh, 20px) auto 0;
  max-width: 36rem;
  font-size: clamp(0.72rem, 2.4vw, 0.88rem);
  line-height: 1.35;
  color: rgba(217, 199, 255, 0.72);
  letter-spacing: 0.01em;
}

/* ---- toasts ---- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  background: #2a0a55;
  color: var(--ink);
  border: 3px solid var(--stroke);
  border-radius: 16px;
  padding: 0.65rem 1rem 0.7rem;
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  box-shadow: 0 3px 0 var(--stroke), 0 12px 24px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.28s ease-out;
}

.toast.is-out { animation: toast-out 0.22s ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* ---- entrance ---- */
.reveal {
  animation: rise 0.7s ease both;
}

.wordmark.reveal { animation-delay: 0.05s; }
.wojak.reveal { animation-delay: 0.16s; }
.titles.reveal { animation-delay: 0.32s; }
.actions.reveal { animation-delay: 0.46s; }
.socials.reveal { animation-delay: 0.58s; }
.disclaimer.reveal { animation-delay: 0.7s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.wojak.reveal {
  animation-name: rise-wojak;
}

@keyframes rise-wojak {
  from { opacity: 0; transform: translateY(28px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* ---- roomier viewports ---- */
@media (min-height: 740px) {
  .wojak { width: min(74vw, 42svh, 420px); }
  .stage { padding-top: 22px; }
}

@media (min-height: 900px) {
  .wojak { width: min(70vw, 46svh, 460px); }
}

@media (min-width: 1280px) {
  .wordmark { margin-bottom: 8px; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .star-glow,
  .hand-spark,
  .toast,
  .toast.is-out {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .star-glow { opacity: 0.7; }
  .hand-spark { opacity: 0; }
  .pill, .orb { transition: none; }
}
