/* ============================================================
   GOBLINHOOD — $GHOOD · one-page landing
   ============================================================ */

:root {
  --bg: #0a0d05;
  --lime: #cfec28;
  --lime-soft: #e6ff5c;
  --gold: #eac244;
  --ink: #0d1107;
  --text: #f0f4da;
  --dim: #9aa877;
  --mono: "Space Mono", monospace;
  --display: "Titan One", "Rubik", sans-serif;
  --body: "Rubik", system-ui, sans-serif;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

/* ---------------- Atmosphere ---------------- */

.glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      ellipse 50% 42% at 50% 58%,
      rgba(207, 236, 40, 0.17),
      transparent 65%
    ),
    radial-gradient(
      ellipse 80% 55% at 50% 115%,
      rgba(207, 236, 40, 0.12),
      transparent 60%
    );
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
  z-index: 0;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1.15;
  }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      rgba(255, 255, 255, 0.012) 2px 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 2px,
      rgba(0, 0, 0, 0.02) 2px 3px
    );
}

/* drifting embers */

.dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.dust i {
  position: absolute;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0;
  animation: drift 11s linear infinite;
}

.dust i:nth-child(1) {
  left: 6%;
  animation-delay: 0s;
  scale: 0.7;
}
.dust i:nth-child(2) {
  left: 15%;
  animation-delay: 2.8s;
  scale: 1.1;
}
.dust i:nth-child(3) {
  left: 24%;
  animation-delay: 6.4s;
  scale: 0.5;
}
.dust i:nth-child(4) {
  left: 33%;
  animation-delay: 1.6s;
  scale: 0.9;
}
.dust i:nth-child(5) {
  left: 41%;
  animation-delay: 8.2s;
  scale: 0.6;
}
.dust i:nth-child(6) {
  left: 52%;
  animation-delay: 4.4s;
  scale: 1;
}
.dust i:nth-child(7) {
  left: 60%;
  animation-delay: 9.6s;
  scale: 0.8;
}
.dust i:nth-child(8) {
  left: 69%;
  animation-delay: 0.9s;
  scale: 0.55;
}
.dust i:nth-child(9) {
  left: 77%;
  animation-delay: 5.5s;
  scale: 1.15;
}
.dust i:nth-child(10) {
  left: 85%;
  animation-delay: 3.2s;
  scale: 0.65;
}
.dust i:nth-child(11) {
  left: 92%;
  animation-delay: 7.3s;
  scale: 0.9;
}
.dust i:nth-child(12) {
  left: 97%;
  animation-delay: 10.2s;
  scale: 0.5;
}

@keyframes drift {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.75;
  }
  60% {
    opacity: 0.45;
    transform: translateY(-58vh) translateX(-14px);
  }
  100% {
    transform: translateY(-104vh) translateX(12px);
    opacity: 0;
  }
}

/* ---------------- Topbar ---------------- */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.brand em {
  color: var(--lime);
  font-style: normal;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img {
  transform: rotate(360deg) scale(1.12);
}

.top-links {
  display: flex;
  gap: 0.6rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(207, 236, 40, 0.45);
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: var(--lime);
}

.icon-btn:hover {
  background: rgba(207, 236, 40, 0.14);
  border-color: var(--lime);
  transform: translateY(-2px) rotate(-6deg);
}

/* ---------------- Stage ---------------- */

.stage {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 1.25rem 4rem;
  gap: 0.35rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid rgba(207, 236, 40, 0.3);
  border-radius: 999px;
  padding: 0.42rem 1.05rem;
  margin-bottom: 0.9rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.title {
  font-family: var(--display);
  font-size: clamp(3.4rem, 11.5vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.015em;
  color: var(--text);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.55), 0 0 70px rgba(207, 236, 40, 0.3);
}

.title span {
  background: linear-gradient(115deg, var(--lime) 25%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-family: var(--display);
  font-size: clamp(0.95rem, 2.6vw, 1.35rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lime);
  margin-top: 0.5rem;
}

.tagline b {
  color: var(--gold);
}

/* ---------------- Goblin ---------------- */

.goblin-wrap {
  position: relative;
  margin: 1.1rem 0 0.9rem;
  display: grid;
  place-items: center;
}

.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(5rem, 22vw, 15rem);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(207, 236, 40, 0.13);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  animation: breathe 7s ease-in-out infinite;
}

.goblin {
  position: relative;
  height: clamp(230px, 34vh, 340px);
  width: auto;
  cursor: pointer;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.55));
  animation: levitate 5.5s ease-in-out infinite;
  transition: transform 0.3s ease;
  z-index: 2;
}

.goblin:hover {
  transform: scale(1.04) rotate(-2deg);
}

@keyframes levitate {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -16px;
  }
}

.shadow {
  position: absolute;
  bottom: -14px;
  width: 130px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(207, 236, 40, 0.3),
    transparent 70%
  );
  animation: shadow-pulse 5.5s ease-in-out infinite;
}

@keyframes shadow-pulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.9;
  }
  50% {
    transform: scaleX(0.72);
    opacity: 0.5;
  }
}

/* ---------------- CA capsule ---------------- */

.ca-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(207, 236, 40, 0.06);
  border: 1px dashed rgba(207, 236, 40, 0.5);
  border-radius: 12px;
  padding: 0.68rem 1.05rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  max-width: 92vw;
}

.ca-capsule:hover {
  border-color: var(--lime);
  background: rgba(207, 236, 40, 0.12);
  transform: translateY(-2px);
}

.ca-tag {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-family: var(--body);
  border-radius: 6px;
  padding: 0.08rem 0.5rem;
  font-size: 0.78rem;
}

.ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-capsule svg {
  width: 15px;
  height: 15px;
  fill: var(--lime);
  flex-shrink: 0;
}

/* ---------------- Links ---------------- */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.btn {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.78rem 1.7rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-solid {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0 26px rgba(207, 236, 40, 0.35);
}

.btn-solid:hover {
  background: var(--lime-soft);
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 0 44px rgba(207, 236, 40, 0.55);
}

.btn-line {
  color: var(--lime);
  border: 1.5px solid rgba(207, 236, 40, 0.55);
}

.btn-line:hover {
  background: rgba(207, 236, 40, 0.12);
  border-color: var(--lime);
  transform: translateY(-3px) rotate(1deg);
}

.footnote {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  opacity: 0.8;
  margin-top: 1.5rem;
}

/* ---------------- Ticker ---------------- */

.ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--lime);
  padding: 0.52rem 0;
  overflow: hidden;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.08em;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(207, 236, 40, 0.3);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0.35s;
  visibility: hidden;
  z-index: 200;
  white-space: nowrap;
  max-width: 92vw;
  text-overflow: ellipsis;
  overflow: hidden;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

/* ---------------- Coin burst ---------------- */

.burst-coin {
  position: fixed;
  width: 42px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 150;
  animation: coin-fall 1.4s ease-in forwards;
}

@keyframes coin-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.6);
    opacity: 1;
  }
  100% {
    transform: translateY(55vh) rotate(360deg) scale(1);
    opacity: 0;
  }
}

/* ---------------- Entrance ---------------- */

.rise {
  opacity: 0;
  translate: 0 26px;
  animation: rise 0.8s cubic-bezier(0.22, 0.9, 0.36, 1) forwards;
}

.r1 {
  animation-delay: 0.05s;
}
.r2 {
  animation-delay: 0.16s;
}
.r3 {
  animation-delay: 0.28s;
}
.r4 {
  animation-delay: 0.4s;
}
.r5 {
  animation-delay: 0.55s;
}
.r6 {
  animation-delay: 0.68s;
}
.r7 {
  animation-delay: 0.82s;
}

@keyframes rise {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 540px) {
  .goblin {
    height: clamp(200px, 30vh, 280px);
  }

  .btn {
    font-size: 0.92rem;
    padding: 0.7rem 1.35rem;
  }

  .links {
    gap: 0.6rem;
  }

  .ca-capsule {
    font-size: 0.8rem;
  }
}

@media (max-height: 720px) {
  .goblin {
    height: clamp(180px, 28vh, 260px);
  }

  .stage {
    gap: 0.2rem;
  }

  .footnote {
    margin-top: 1rem;
  }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rise {
    opacity: 1;
    translate: 0 0;
  }
}
