:root {
  --ink: #141414;
  --paper: #f5e9cf;
  --turquoise: #1ecbc5;
  --brown: #a75d2e;
  --lime: #d9ff49;
  --line: clamp(2px, 0.22vw, 4px);
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: var(--turquoise);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--turquoise);
}

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

button,
a {
  font: inherit;
}

.site-shell {
  position: relative;
  width: min(100vw, 1920px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
}

.world-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("assets/bullape-world.webp") center / cover no-repeat;
  transform: scale(1.025);
  animation: world-breathe 14s ease-in-out infinite alternate;
}

.paper-noise {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.14;
  background-image: repeating-linear-gradient(8deg, rgba(20, 20, 20, 0.11) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}

.sun-ring {
  position: absolute;
  z-index: -1;
  top: 8%;
  left: 42%;
  width: clamp(100px, 11vw, 210px);
  aspect-ratio: 1;
  border: clamp(8px, 0.8vw, 15px) solid rgba(245, 233, 207, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--ink), inset 0 0 0 4px var(--ink);
  opacity: 0.55;
  transform: rotate(-8deg);
}

.spark-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: var(--spark-size, 9px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  background: var(--spark-color, var(--lime));
  box-shadow: 2px 2px 0 rgba(20, 20, 20, 0.4);
  transform: rotate(45deg);
  animation: spark-drift var(--spark-speed, 5s) ease-in-out infinite alternate;
  animation-delay: var(--spark-delay, 0s);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(92vw, 1760px);
  margin: 0 auto;
  padding: clamp(18px, 2.4vh, 32px) 0;
}

.brand,
.nav-button {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.5rem, 2vw, 2.25rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand img {
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand:hover img {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(3px, 3px) rotate(-7deg);
}

.social-nav {
  display: flex;
  gap: 10px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.nav-button--dark {
  color: var(--paper);
  background: var(--ink);
}

.nav-button:hover,
.nav-button:focus-visible {
  outline: none;
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(3px, 3px) rotate(-1deg);
}

.nav-button:focus-visible {
  background: var(--lime);
  color: var(--ink);
}

.hero {
  position: relative;
  width: min(92vw, 1760px);
  height: calc(100svh - clamp(88px, 11vh, 124px));
  margin: 0 auto;
}

.hero-copy {
  position: absolute;
  z-index: 4;
  top: 8%;
  left: 0;
  width: min(36vw, 610px);
}

.eyebrow,
.lore-index {
  margin: 0 0 10px;
  font-size: clamp(0.72rem, 0.8vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.18em;
}

h1 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(5rem, 9vw, 10.4rem);
  line-height: 0.72;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  -webkit-text-stroke: 2px var(--ink);
}

h1 span:last-child {
  margin-left: 0.48em;
  color: var(--brown);
  text-shadow: 6px 6px 0 var(--paper), 10px 10px 0 var(--ink);
}

h1 span:first-child {
  transform-origin: left bottom;
  animation: title-nudge 5.6s steps(1, end) infinite;
}

h1 span:last-child {
  transform-origin: center;
  animation: title-scroll 5.6s steps(1, end) infinite;
}

.hero-tagline {
  display: inline-block;
  margin: 28px 0 10px;
  padding: 8px 14px;
  border: var(--line) solid var(--ink);
  background: var(--lime);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.5rem);
  font-weight: 900;
  transform: rotate(-1.5deg);
}

.hero-intro {
  max-width: 510px;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.45;
}

.instinct-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.instinct-switch span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(245, 233, 207, 0.84);
  font-size: clamp(0.7rem, 0.75vw, 0.82rem);
  font-weight: 900;
}

.instinct-switch i {
  width: 9px;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  animation: status-blink 1.5s steps(2, end) infinite;
}

.instinct-switch span:last-child i {
  background: var(--brown);
  animation-delay: 0.45s;
}

.hero-actions {
  margin-top: 22px;
}

.ca-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 10px 18px 10px 22px;
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 7px 7px 0 var(--brown);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.ca-button:hover,
.ca-button:focus-visible {
  outline: none;
  box-shadow: 2px 2px 0 var(--brown);
  transform: translate(5px, 5px) rotate(0.6deg);
}

.ca-button:active {
  transform: translate(7px, 7px) scale(0.98);
}

.ca-label {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  letter-spacing: 0.04em;
}

.ca-hint {
  padding: 7px 9px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
}

.character-stage {
  --look-x: 0;
  --look-y: 0;
  position: absolute;
  z-index: 3;
  right: -2%;
  bottom: 7%;
  width: min(70vw, 1240px);
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transform: translate3d(calc(var(--look-x) * 1px), calc(var(--look-y) * 1px), 0)
    rotate(calc(var(--look-x) * 0.025deg));
  transform-origin: 50% 65%;
  transition: transform 110ms linear;
  -webkit-tap-highlight-color: transparent;
}

.character-stage:focus-visible {
  outline: 4px dashed var(--lime);
  outline-offset: 12px;
}

.bullape-character {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(12px 18px 0 rgba(20, 20, 20, 0.2));
  transform-origin: 50% 74%;
  animation: bullape-idle 4.4s ease-in-out infinite;
  will-change: transform;
}

.character-stage:hover .bullape-character {
  animation-duration: 2.2s;
}

.character-stage.is-arguing .bullape-character {
  animation: bullape-argue 620ms steps(2, end) 1;
}

.character-shadow {
  position: absolute;
  right: 6%;
  bottom: 5%;
  left: 8%;
  height: 12%;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.24);
  filter: blur(12px);
  animation: shadow-pulse 4.4s ease-in-out infinite;
}

.speech-bubble {
  position: absolute;
  z-index: 5;
  display: inline-block;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 16px 18px 12px 20px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(0.9rem, 1.1vw, 1.25rem);
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  animation: bubble-float 2.8s ease-in-out infinite alternate;
}

.speech-bubble::after {
  position: absolute;
  bottom: -12px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  content: "";
  transform: rotate(45deg);
}

.speech-bubble--bull {
  top: 11%;
  left: 7%;
  transform: rotate(-5deg);
}

.speech-bubble--bull::after {
  left: 30%;
}

.speech-bubble--ape {
  top: 7%;
  right: 5%;
  color: var(--paper);
  background: var(--brown);
  transform: rotate(4deg);
  animation-delay: -1.1s;
}

.speech-bubble--ape::after {
  right: 28%;
  background: var(--brown);
}

.character-stage.is-arguing .speech-bubble {
  animation: bubble-pop 620ms ease 1;
}

.phone-ping {
  position: absolute;
  z-index: 4;
  top: 35%;
  right: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
}

.phone-ping i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-top: 4px solid var(--lime);
  border-right: 4px solid var(--lime);
  border-radius: 0 100% 0 0;
  opacity: 0;
  transform-origin: bottom right;
}

.phone-ping i:nth-child(2) {
  width: 48px;
  height: 48px;
}

.phone-ping i:nth-child(3) {
  width: 68px;
  height: 68px;
}

.phone-ping.is-ringing i {
  animation: phone-ring 900ms ease-out 1;
}

.phone-ping.is-ringing i:nth-child(2) {
  animation-delay: 110ms;
}

.phone-ping.is-ringing i:nth-child(3) {
  animation-delay: 220ms;
}

.tap-note {
  position: absolute;
  z-index: 5;
  right: 23%;
  bottom: 0;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  background: var(--lime);
  font-size: clamp(0.62rem, 0.75vw, 0.8rem);
  font-weight: 900;
  transform: rotate(-2deg);
  transition: opacity 180ms ease, transform 180ms ease;
}

.character-stage:hover .tap-note,
.character-stage:focus-visible .tap-note {
  opacity: 0;
  transform: translateY(8px) rotate(2deg);
}

.lore-card {
  position: absolute;
  z-index: 4;
  top: 3%;
  right: auto;
  left: 43%;
  width: min(27vw, 440px);
  padding: 18px 22px;
  border: var(--line) solid var(--ink);
  border-radius: 22px 14px 26px 12px;
  background: rgba(245, 233, 207, 0.95);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-0.8deg);
}

.lore-card h2 {
  margin: 0 0 10px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.6rem, 2.1vw, 2.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.lore-card p:last-child {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
}

.lore-card .lore-rule {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 2px dashed var(--ink);
  font-size: 0.86rem;
}

.story-strip {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--lime);
  transform: rotate(-0.4deg) scale(1.01);
}

.story-strip__track {
  display: flex;
  width: max-content;
  gap: 30px;
  padding: 8px 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.35rem);
  letter-spacing: 0.08em;
  white-space: nowrap;
  animation: ticker-run 18s linear infinite;
}

.story-strip b {
  color: var(--brown);
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 28px;
  padding: 12px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 30px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes world-breathe {
  to {
    transform: scale(1.055) translate3d(-0.25%, -0.2%, 0);
  }
}

@keyframes spark-drift {
  from {
    translate: 0 -5px;
    rotate: -12deg;
  }
  to {
    translate: 12px 13px;
    rotate: 48deg;
  }
}

@keyframes title-nudge {
  0%, 88%, 100% { transform: translateX(0) rotate(0); }
  90% { transform: translateX(-4px) rotate(-1deg); }
  94% { transform: translateX(3px) rotate(0.8deg); }
}

@keyframes title-scroll {
  0%, 88%, 100% { transform: translateX(0); }
  91% { transform: translateX(7px); }
  96% { transform: translateX(-3px); }
}

@keyframes status-blink {
  50% { opacity: 0.25; }
}

@keyframes bullape-idle {
  0%, 100% { transform: translateY(0) rotate(-0.15deg) scaleX(1); }
  48% { transform: translateY(-9px) rotate(0.3deg) scaleX(1.006); }
  54% { transform: translateY(-9px) rotate(0.1deg) scaleX(0.998); }
}

@keyframes shadow-pulse {
  0%, 100% { opacity: 0.95; transform: scaleX(1); }
  50% { opacity: 0.68; transform: scaleX(0.94); }
}

@keyframes bullape-argue {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-10px, -4px) rotate(-1deg); }
  40% { transform: translate(12px, 3px) rotate(1deg); }
  60% { transform: translate(-7px, -2px) rotate(-0.5deg); }
  80% { transform: translate(6px, 1px) rotate(0.4deg); }
}

@keyframes bubble-float {
  to { translate: 0 -7px; }
}

@keyframes bubble-pop {
  0% { scale: 0.82; }
  55% { scale: 1.12; }
  100% { scale: 1; }
}

@keyframes phone-ring {
  0% { opacity: 0; transform: scale(0.55); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.18); }
}

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

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .site-shell {
    min-height: 100svh;
    overflow: hidden;
  }

  .site-header {
    align-items: flex-start;
  }

  .social-nav {
    flex-direction: column;
  }

  .nav-button {
    min-height: 42px;
    padding: 0 13px;
    font-size: 0.8rem;
  }

  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100svh - 110px);
    padding: 20px 0 42px;
  }

  .hero-copy,
  .character-stage,
  .lore-card {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
  }

  .hero-copy {
    z-index: 5;
  }

  h1 {
    font-size: clamp(4.8rem, 25vw, 8rem);
  }

  .character-stage {
    z-index: 3;
    width: 116%;
    margin: 30px -8% -20px;
  }

  .speech-bubble--bull {
    left: 4%;
  }

  .speech-bubble--ape {
    right: 3%;
  }

  .tap-note {
    right: 18%;
  }

  .lore-card {
    z-index: 5;
    margin-top: 6px;
  }

  .story-strip {
    position: relative;
    margin-top: 12px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .hero-copy {
    top: 3%;
  }

  .hero-intro {
    max-width: 470px;
    font-size: 0.98rem;
  }

  .hero-tagline {
    margin-top: 20px;
  }

  .character-stage {
    bottom: 4%;
  }

  .lore-card {
    top: 1%;
    left: 41%;
    width: min(31vw, 380px);
    padding: 12px 16px;
  }

  .lore-card h2 {
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  }

  .lore-card p {
    margin-top: 7px;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .lore-card .lore-rule {
    margin-top: 7px;
    padding-top: 7px;
  }
}

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