:root {
  color-scheme: dark;
  --ink: #f7edda;
  --muted: #d7c9aa;
  --forest-950: #0b130c;
  --forest-900: #121c12;
  --forest-800: #1b2b19;
  --forest-700: #2c4427;
  --moss: #738658;
  --gold: #f3c56c;
  --gold-soft: #ffe3a5;
  --brown: #6a432c;
  --glass: rgba(19, 31, 18, 0.58);
  --line: rgba(255, 236, 190, 0.24);
  --mouse-x: 50%;
  --mouse-y: 50%;
  --bg-x: 0px;
  --bg-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--forest-950);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--forest-950);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  background: #182217;
}

.backdrop,
.backdrop-wash,
.mist,
.fireflies,
.cursor-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: -5;
  inset: -3%;
  background-image: url("assets/velvetwood-background.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(0.88) contrast(1.04) brightness(0.78);
  transform: translate3d(var(--bg-x), var(--bg-y), 0) scale(1.04);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.backdrop-wash {
  z-index: -4;
  background:
    linear-gradient(90deg, rgba(7, 14, 8, 0.96) 0%, rgba(9, 17, 10, 0.86) 28%, rgba(12, 21, 12, 0.34) 61%, rgba(8, 14, 8, 0.28) 100%),
    linear-gradient(180deg, rgba(7, 13, 7, 0.42), transparent 35%, rgba(7, 13, 7, 0.58));
}

.mist {
  z-index: -2;
  width: 52vw;
  height: 25vh;
  inset: auto auto 2% 31%;
  border-radius: 50%;
  background: rgba(224, 230, 199, 0.1);
  filter: blur(52px);
  animation: mist-drift 16s ease-in-out infinite alternate;
}

.mist-two {
  width: 32vw;
  height: 18vh;
  left: 58%;
  bottom: 30%;
  opacity: 0.45;
  animation-duration: 21s;
  animation-direction: alternate-reverse;
}

.cursor-glow {
  z-index: 7;
  inset: 0;
  opacity: 0.65;
  background: radial-gradient(circle 160px at var(--mouse-x) var(--mouse-y), rgba(255, 214, 127, 0.11), transparent 74%);
  mix-blend-mode: screen;
}

.fireflies {
  z-index: 1;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--left);
  top: var(--top);
  border-radius: 50%;
  background: #ffe7a0;
  box-shadow: 0 0 9px 3px rgba(255, 207, 97, 0.65);
  opacity: 0;
  animation: firefly var(--duration) ease-in-out var(--delay) infinite;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 8vw, 1740px);
  height: 104px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255, 235, 193, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 157, 0.45);
  border-radius: 50%;
  background: rgba(247, 234, 205, 0.88);
  box-shadow: 0 0 0 6px rgba(255, 230, 173, 0.06);
}

.brand-mark img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  transform: scale(1.26) translateY(3px);
}

.brand-word {
  font-size: 1.05rem;
  letter-spacing: 0.13em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  position: relative;
  padding: 12px 2px;
  color: rgba(247, 237, 218, 0.75);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 200ms ease;
}

.nav-link::after {
  position: absolute;
  right: 50%;
  bottom: 5px;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--gold);
  transition: right 200ms ease, left 200ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-soft);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  right: 0;
  left: 0;
}

.hero {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(570px, 0.97fr) minmax(560px, 1.03fr);
  align-items: center;
  width: min(100% - 8vw, 1740px);
  height: calc(100svh - 176px);
  min-height: 520px;
  margin: 0 auto;
}

.story {
  position: relative;
  z-index: 5;
  align-self: center;
  max-width: 780px;
  padding: 24px 0 40px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--gold-soft);
  font-size: clamp(0.72rem, 0.72vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(243, 197, 108, 0.12), 0 0 22px rgba(243, 197, 108, 0.8);
  animation: pulse 2.8s ease-in-out infinite;
}

.title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(6.4rem, 9vw, 10.8rem);
  font-weight: 400;
  letter-spacing: -0.09em;
  line-height: 0.72;
  text-transform: lowercase;
  text-shadow: 0 5px 40px rgba(0, 0, 0, 0.36);
}

.title-muse,
.title-hood {
  display: inline-block;
}

.title-muse {
  color: #fff4df;
}

.title-hood {
  color: var(--gold);
  font-style: italic;
  background: linear-gradient(115deg, #dca94d 15%, #ffe4a2 48%, #c98d36 78%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-shimmer 7s ease-in-out infinite;
}

.tagline {
  margin: 35px 0 24px;
  color: #fff3db;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 1.65vw, 2rem);
  font-style: italic;
  line-height: 1.22;
}

.lore-card {
  position: relative;
  max-width: 690px;
  padding: 22px 26px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(27, 44, 25, 0.78), rgba(13, 23, 14, 0.46));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(15px);
}

.lore-card::before {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 231, 177, 0.17);
  border-radius: 16px;
  content: "";
  pointer-events: none;
}

.lore-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lore-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(247, 237, 218, 0.82);
  font-size: clamp(0.92rem, 0.93vw, 1.08rem);
  line-height: 1.6;
}

.creed {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: rgba(255, 230, 177, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.creed i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 22px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.action:hover {
  transform: translateY(-3px);
}

.action:active {
  transform: translateY(0) scale(0.98);
}

.action-primary {
  color: #1e2617;
  background: var(--gold);
  box-shadow: 0 10px 30px rgba(229, 170, 70, 0.28);
}

.action-primary:hover {
  background: #ffdb8d;
  box-shadow: 0 14px 35px rgba(229, 170, 70, 0.38);
}

.action-glass,
.action-ca {
  border-color: rgba(255, 235, 191, 0.24);
  background: rgba(17, 29, 17, 0.68);
  backdrop-filter: blur(12px);
}

.action-glass:hover,
.action-ca:hover {
  border-color: rgba(255, 220, 147, 0.58);
  background: rgba(36, 53, 31, 0.86);
}

.action-ca {
  color: var(--gold-soft);
}

.ca-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #deb257;
  box-shadow: 0 0 10px rgba(243, 197, 108, 0.8);
}

.character-stage {
  position: relative;
  align-self: stretch;
  min-width: 0;
  perspective: 1000px;
}

.character-button {
  position: absolute;
  z-index: 5;
  right: -2%;
  bottom: -5%;
  width: min(49vw, 820px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 260ms ease;
}

.character-button:hover {
  filter: drop-shadow(0 0 26px rgba(248, 207, 116, 0.2));
}

.character-button:focus-visible {
  border-radius: 45%;
  outline: 3px solid var(--gold);
  outline-offset: -45px;
}

.character-float {
  display: block;
  width: 100%;
  height: 100%;
  animation: character-float 6.2s ease-in-out infinite;
}

.character {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 38px 35px rgba(0, 0, 0, 0.38));
  transform-origin: 50% 82%;
  animation: character-breathe 4.8s ease-in-out infinite;
}

.character-button.is-hopping .character-float {
  animation: character-hop 720ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.character-shadow {
  position: absolute;
  z-index: 1;
  right: 9%;
  bottom: 5.5%;
  width: 66%;
  height: 7%;
  border-radius: 50%;
  background: rgba(5, 9, 4, 0.7);
  filter: blur(20px);
  animation: shadow-breathe 4.8s ease-in-out infinite;
}

.orbit {
  position: absolute;
  z-index: 2;
  right: 4%;
  bottom: 7%;
  width: min(43vw, 735px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 224, 158, 0.14);
  border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(245, 195, 96, 0.04), 0 0 90px rgba(245, 195, 96, 0.06);
  animation: orbit-spin 28s linear infinite;
}

.orbit::before,
.orbit::after {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  content: "";
  background: var(--gold-soft);
  box-shadow: 0 0 18px 5px rgba(245, 195, 96, 0.52);
}

.orbit::before {
  top: 14%;
  left: 15%;
}

.orbit::after {
  right: 8%;
  bottom: 24%;
}

.orbit-two {
  right: 13%;
  bottom: 15%;
  width: min(32vw, 560px);
  border-style: dashed;
  opacity: 0.48;
  animation-direction: reverse;
  animation-duration: 39s;
}

.speech {
  position: absolute;
  z-index: 8;
  top: 15%;
  right: 3%;
  max-width: 220px;
  padding: 14px 18px;
  border: 1px solid rgba(95, 66, 35, 0.2);
  border-radius: 17px 17px 4px 17px;
  color: #273220;
  background: rgba(255, 243, 217, 0.95);
  box-shadow: 0 16px 50px rgba(4, 9, 4, 0.22);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(12px) rotate(2deg) scale(0.94);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.speech.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(2deg) scale(1);
}

.tap-note {
  position: absolute;
  z-index: 8;
  right: 5%;
  bottom: 5%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 242, 215, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tap-pulse {
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  animation: tap-pulse 2s ease-out infinite;
}

.footer {
  position: absolute;
  z-index: 15;
  right: 4vw;
  bottom: 20px;
  left: 4vw;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(246, 234, 207, 0.48);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.footer-line {
  width: 30px;
  height: 1px;
  background: rgba(255, 233, 186, 0.28);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 28px;
  bottom: 28px;
  padding: 15px 20px;
  border: 1px solid rgba(255, 226, 166, 0.32);
  border-radius: 14px;
  color: #263020;
  background: #ffedc7;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  font-size: 0.85rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(130%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease, visibility 0s linear 360ms;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.page-ready .reveal {
  animation: reveal 850ms cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.page-ready .reveal-one { animation-delay: 90ms; }
.page-ready .reveal-two { animation-delay: 170ms; }
.page-ready .reveal-three { animation-delay: 280ms; }
.page-ready .reveal-four { animation-delay: 370ms; }
.page-ready .reveal-five { animation-delay: 470ms; }
.page-ready .reveal-character { animation-delay: 260ms; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes character-float {
  0%, 100% { transform: translateY(0) rotate(-0.35deg); }
  50% { transform: translateY(-13px) rotate(0.35deg); }
}

@keyframes character-breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.012, 0.994); }
}

@keyframes character-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  34% { transform: translateY(-46px) scale(0.98, 1.04) rotate(-2deg); }
  66% { transform: translateY(-12px) scale(1.03, 0.97) rotate(1deg); }
}

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

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes title-shimmer {
  0%, 70%, 100% { background-position: 0 0; }
  86% { background-position: 100% 0; }
}

@keyframes firefly {
  0%, 100% { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.7); }
  20% { opacity: 0.9; }
  52% { opacity: 0.28; transform: translate3d(24px, -28px, 0) scale(1.1); }
  78% { opacity: 0.75; }
}

@keyframes mist-drift {
  from { transform: translateX(-3%) scale(0.95); }
  to { transform: translateX(8%) scale(1.08); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.86); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes tap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 224, 162, 0.55); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(255, 224, 162, 0); }
}

@media (max-width: 1320px) {
  .topbar,
  .hero {
    width: min(100% - 6vw, 1240px);
  }

  .hero {
    grid-template-columns: minmax(500px, 1fr) minmax(450px, 0.9fr);
  }

  .story {
    max-width: 650px;
  }

  .title {
    font-size: clamp(5.5rem, 8.6vw, 8rem);
  }

  .lore-card {
    padding: 18px 22px 16px;
  }

  .character-button {
    right: -7%;
    width: min(53vw, 720px);
  }
}

@media (max-width: 980px) {
  .site-shell {
    height: auto;
    min-height: 100svh;
    overflow: hidden auto;
  }

  .topbar {
    height: 86px;
  }

  .nav {
    gap: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
    height: calc(100svh - 140px);
    min-height: 690px;
  }

  .story {
    padding-bottom: 70px;
  }

  .eyebrow {
    margin-bottom: 20px;
    letter-spacing: 0.17em;
  }

  .title {
    font-size: clamp(4.6rem, 9.5vw, 6.2rem);
  }

  .tagline {
    margin-top: 28px;
  }

  .lore-card p {
    font-size: 0.88rem;
  }

  .character-button {
    right: -25%;
    bottom: 3%;
    width: min(65vw, 650px);
  }

  .orbit {
    right: -10%;
  }

  .speech {
    right: 0;
  }

  .tap-note {
    display: none;
  }
}

@media (max-width: 760px) {
  .backdrop {
    position: fixed;
    background-position: 68% center;
  }

  .backdrop-wash {
    position: fixed;
    background: linear-gradient(180deg, rgba(7, 14, 8, 0.9), rgba(10, 19, 10, 0.52) 45%, rgba(7, 13, 7, 0.9));
  }

  .topbar {
    width: calc(100% - 36px);
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand-mark img {
    width: 46px;
    height: 46px;
  }

  .brand-word {
    font-size: 0.88rem;
  }

  .nav .nav-link:first-child {
    display: none;
  }

  .nav {
    gap: 14px;
  }

  .nav-link {
    font-size: 0.68rem;
  }

  .hero {
    display: flex;
    flex-direction: column;
    width: calc(100% - 36px);
    height: auto;
    min-height: 0;
    padding: 48px 0 110px;
  }

  .story {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .eyebrow {
    font-size: 0.67rem;
  }

  .title {
    font-size: clamp(4rem, 21vw, 7rem);
    line-height: 0.78;
  }

  .tagline {
    font-size: 1.35rem;
  }

  .lore-card {
    max-width: none;
  }

  .creed {
    gap: 8px;
    font-size: 0.63rem;
  }

  .actions {
    align-items: stretch;
  }

  .action {
    min-height: 48px;
    flex: 1 1 auto;
    padding: 0 16px;
    font-size: 0.68rem;
  }

  .character-stage {
    width: 100%;
    height: min(115vw, 620px);
    margin-top: 20px;
  }

  .character-button {
    right: 50%;
    bottom: -7%;
    width: min(120vw, 660px);
    transform: translateX(50%) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  }

  .orbit {
    right: 50%;
    bottom: 2%;
    width: min(100vw, 560px);
    transform: translateX(50%);
    animation: none;
  }

  .orbit-two {
    width: min(76vw, 430px);
  }

  .character-shadow {
    right: 16%;
    bottom: 3%;
    width: 68%;
  }

  .speech {
    top: 9%;
    right: 2%;
    max-width: 185px;
    font-size: 0.82rem;
  }

  .footer {
    position: absolute;
    bottom: 22px;
    justify-content: center;
    text-align: center;
  }

  .footer > :not(:first-child) {
    display: none;
  }
}

@media (max-height: 780px) and (min-width: 761px) {
  .topbar {
    height: 78px;
  }

  .hero {
    height: calc(100svh - 120px);
  }

  .story {
    padding-bottom: 30px;
  }

  .eyebrow {
    margin-bottom: 17px;
  }

  .title {
    font-size: clamp(5rem, 7.8vw, 8.2rem);
  }

  .tagline {
    margin: 24px 0 16px;
    font-size: 1.3rem;
  }

  .lore-card {
    padding-top: 17px;
    padding-bottom: 14px;
  }

  .lore-card p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .creed {
    margin-top: 10px;
  }

  .actions {
    margin-top: 15px;
  }

  .action {
    min-height: 44px;
  }
}

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

  .cursor-glow,
  .fireflies,
  .tap-note {
    display: none;
  }
}
