:root {
  --cream: #fff8ed;
  --cream-deep: #f8ead8;
  --peach: #f6b38d;
  --peach-hot: #ee8d65;
  --honey: #f4bd62;
  --cocoa: #3b241b;
  --cocoa-soft: #6d493b;
  --white-glass: rgba(255, 252, 246, 0.68);
  --line: rgba(91, 57, 41, 0.18);
  --shadow: 0 24px 70px rgba(111, 69, 43, 0.18);
  --ease-bounce: cubic-bezier(0.2, 0.9, 0.25, 1.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--cocoa);
  background: var(--cream);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cocoa);
  outline-offset: 4px;
}

.scene {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #fae9d7;
}

.background {
  position: absolute;
  z-index: -4;
  inset: -3%;
  background-image: linear-gradient(90deg, rgba(255, 249, 241, 0.56) 0%, rgba(255, 249, 241, 0.2) 42%, rgba(255, 244, 230, 0.03) 100%), url("assets/plush-sky.png");
  background-position: center;
  background-size: cover;
  animation: background-breathe 14s ease-in-out infinite alternate;
}

.soft-grain {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

.scene::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 48%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 26%);
}

.cursor-glow {
  position: fixed;
  z-index: 7;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  filter: blur(26px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.68), rgba(255, 203, 151, 0.14) 48%, transparent 70%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 300ms ease;
}

.cursor-glow.is-visible {
  opacity: 0.64;
}

.topbar,
.hero,
.footer {
  width: min(100% - clamp(2rem, 6vw, 8rem), 1760px);
  margin-inline: auto;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(1.15rem, 2.2vh, 2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cocoa);
  font-size: clamp(1rem, 1.15vw, 1.3rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(92, 53, 32, 0.17);
  place-items: center;
  background: #f8d9bd;
}

.brand-mark img {
  width: 128%;
  height: 128%;
  object-fit: contain;
  transform: translateY(8%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 10px 35px rgba(86, 52, 37, 0.1);
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 243, 0.55);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--cocoa);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease-bounce), background-color 180ms ease;
}

.nav-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.58);
}

.nav-link--accent {
  color: #fffaf2;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 8px 22px rgba(75, 43, 31, 0.2);
  background: var(--cocoa);
}

.nav-link--accent:hover {
  background: #513328;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 4rem);
  min-height: 0;
  padding-block: clamp(1rem, 2.8vh, 2.5rem);
}

.copy-panel {
  position: relative;
  z-index: 4;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 clamp(0.75rem, 1.6vh, 1.3rem);
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: var(--cocoa-soft);
  font-size: clamp(0.75rem, 0.8vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(92, 55, 37, 0.08);
  backdrop-filter: blur(12px);
  background: rgba(255, 250, 244, 0.6);
}

.eyebrow-dot {
  width: 0.68rem;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(238, 141, 101, 0.18);
  background: var(--peach-hot);
  animation: pulse 2.6s ease-in-out infinite;
}

.hero-title {
  margin: 0;
  color: var(--cocoa);
  font-size: clamp(4.6rem, 7.35vw, 9rem);
  font-weight: 1000;
  line-height: 0.72;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 #fff6e9,
    0 10px 30px rgba(114, 72, 48, 0.11);
}

.title-line {
  display: block;
  white-space: nowrap;
}

.title-line--bottom {
  position: relative;
  color: var(--peach-hot);
  -webkit-text-stroke: 2px rgba(83, 47, 32, 0.08);
}

.title-line span {
  display: inline-block;
  animation: letter-float 3.8s ease-in-out infinite;
}

.title-line span:nth-child(2) { animation-delay: -0.35s; }
.title-line span:nth-child(3) { animation-delay: -0.7s; }
.title-line span:nth-child(4) { animation-delay: -1.05s; }
.title-line span:nth-child(5) { animation-delay: -1.4s; }

.title-star {
  position: absolute;
  top: -0.28em;
  right: -0.18em;
  color: var(--honey);
  font-size: 0.28em;
  -webkit-text-stroke: 0;
  animation: star-spin 8s linear infinite;
}

.tagline {
  max-width: 620px;
  margin: clamp(1rem, 2.3vh, 1.7rem) 0 0;
  color: var(--cocoa-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 1.55vw, 1.75rem);
  line-height: 1.32;
}

.tagline em {
  position: relative;
  color: var(--cocoa);
  font-weight: 700;
}

.tagline em::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.16em;
  left: 0;
  height: 0.18em;
  border-radius: 999px;
  transform: rotate(-1.5deg);
  background: var(--peach);
}

.actions {
  margin-top: clamp(1rem, 2.2vh, 1.6rem);
}

.ca-button {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.65rem;
  width: min(100%, 540px);
  min-height: 68px;
  padding: 0.75rem 0.9rem 0.75rem 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  color: var(--cocoa);
  cursor: pointer;
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.74);
  background: rgba(255, 250, 244, 0.72);
  backdrop-filter: blur(16px);
  transition: transform 180ms var(--ease-bounce), box-shadow 180ms ease;
}

.ca-button:hover {
  transform: translateY(-3px) rotate(-0.4deg);
  box-shadow: 0 28px 60px rgba(104, 63, 41, 0.2), inset 0 1px rgba(255, 255, 255, 0.9);
}

.ca-button:active {
  transform: translateY(1px) scale(0.985);
}

.ca-label {
  color: var(--peach-hot);
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  font-weight: 1000;
}

.ca-button strong {
  max-width: 250px;
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-icon {
  display: grid;
  justify-self: end;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 14px;
  color: #fff8ef;
  background: var(--cocoa);
  place-items: center;
}

.copy-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.copy-hint {
  position: absolute;
  right: 4.1rem;
  bottom: 0.36rem;
  color: rgba(84, 54, 42, 0.56);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lore-card {
  width: min(100%, 670px);
  margin-top: clamp(1rem, 2.4vh, 1.75rem);
  padding: clamp(1rem, 1.35vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 14px 45px rgba(110, 66, 41, 0.1);
  backdrop-filter: blur(20px);
  background: var(--white-glass);
}

.lore-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  color: var(--peach-hot);
  font-size: 0.8rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lore-number {
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(238, 141, 101, 0.34);
  border-radius: 50%;
  font-size: 0.68rem;
  place-items: center;
}

.lore-card p {
  margin: 0;
  color: var(--cocoa-soft);
  font-size: clamp(0.92rem, 0.95vw, 1.06rem);
  font-weight: 600;
  line-height: 1.55;
}

.character-zone {
  position: relative;
  align-self: stretch;
  display: grid;
  min-height: 0;
  place-items: center;
  perspective: 1100px;
}

.character-button {
  position: relative;
  display: grid;
  width: min(46vw, 760px);
  max-height: 76vh;
  aspect-ratio: 1 / 1.03;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  place-items: center;
  transform-style: preserve-3d;
}

.character-halo {
  position: absolute;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  box-shadow:
    0 0 0 26px rgba(255, 255, 255, 0.11),
    0 0 80px rgba(248, 179, 119, 0.34);
  animation: halo-pulse 4.8s ease-in-out infinite;
}

.character {
  position: relative;
  z-index: 2;
  width: 94%;
  height: 94%;
  object-fit: contain;
  filter: drop-shadow(0 28px 30px rgba(99, 61, 40, 0.2));
  transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(var(--float-y, 0px));
  transform-origin: 50% 72%;
  animation: character-float 5.5s ease-in-out infinite;
  transition: transform 280ms ease-out, filter 240ms ease;
  will-change: transform;
}

.character-button:hover .character {
  filter: drop-shadow(0 34px 36px rgba(98, 57, 35, 0.25)) saturate(1.04);
}

.character-shadow {
  position: absolute;
  z-index: 0;
  bottom: 4%;
  width: 58%;
  height: 10%;
  border-radius: 50%;
  opacity: 0.42;
  filter: blur(18px);
  background: rgba(91, 57, 39, 0.32);
  animation: shadow-breathe 5.5s ease-in-out infinite;
}

.speech-bubble {
  position: absolute;
  z-index: 4;
  top: 7%;
  right: 3%;
  padding: 0.85rem 1.15rem;
  border: 2px solid var(--cocoa);
  border-radius: 22px 22px 22px 5px;
  color: var(--cocoa);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.15vw, 1.3rem);
  font-style: italic;
  font-weight: 800;
  opacity: 0;
  box-shadow: 5px 6px 0 rgba(59, 36, 27, 0.12);
  background: #fff9ef;
  transform: translateY(10px) scale(0.7) rotate(4deg);
  transform-origin: left bottom;
  transition: opacity 180ms ease, transform 360ms var(--ease-bounce);
}

.character-button.is-booped .speech-bubble {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(-3deg);
}

.character-button.is-booped .character {
  animation: character-boop 700ms var(--ease-bounce) both;
}

.thought {
  position: absolute;
  z-index: 1;
  display: grid;
  width: clamp(76px, 6.5vw, 126px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 42% 58% 54% 46% / 48% 44% 56% 52%;
  color: rgba(94, 58, 42, 0.62);
  font-size: clamp(0.62rem, 0.7vw, 0.82rem);
  font-weight: 1000;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 12px 40px rgba(100, 61, 39, 0.1);
  backdrop-filter: blur(12px);
  background: rgba(255, 250, 244, 0.56);
  place-items: center;
}

.thought--one {
  top: 18%;
  left: -2%;
  animation: thought-float 5.7s ease-in-out infinite;
}

.thought--two {
  right: 1%;
  bottom: 22%;
  width: clamp(64px, 5.2vw, 96px);
  animation: thought-float 4.9s ease-in-out -1.5s infinite reverse;
}

.orbit {
  position: absolute;
  z-index: 0;
  border: 1px dashed rgba(133, 80, 51, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.orbit--one {
  width: 82%;
  aspect-ratio: 1;
  transform: rotate(-8deg);
  animation: orbit-spin 28s linear infinite;
}

.orbit--two {
  width: 64%;
  aspect-ratio: 1;
  transform: rotate(12deg);
  animation: orbit-spin 21s linear infinite reverse;
}

.tap-note {
  position: absolute;
  right: 3%;
  bottom: 2%;
  margin: 0;
  color: rgba(74, 44, 32, 0.66);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.9rem, 0.95vw, 1.06rem);
  font-style: italic;
  font-weight: 700;
  transform: rotate(-2deg);
}

.tap-note span {
  display: inline-block;
  color: var(--peach-hot);
  font-size: 1.8em;
  animation: note-nudge 2s ease-in-out infinite;
}

.footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(1rem, 2.1vh, 1.9rem);
  color: rgba(78, 48, 35, 0.58);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 2rem;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  color: #fff9f0;
  font-size: 0.9rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  box-shadow: 6px 7px 0 rgba(59, 36, 27, 0.13);
  background: var(--cocoa);
  transform: translate(-50%, 20px) scale(0.9);
  transition: opacity 180ms ease, transform 320ms var(--ease-bounce);
}

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

@keyframes background-breathe {
  to { transform: scale(1.035) translate3d(-0.3%, 0.3%, 0); }
}

@keyframes pulse {
  50% { transform: scale(0.76); opacity: 0.72; }
}

@keyframes letter-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-0.035em) rotate(-0.5deg); }
}

@keyframes star-spin {
  50% { transform: rotate(180deg) scale(1.15); }
  to { transform: rotate(360deg); }
}

@keyframes halo-pulse {
  50% { transform: scale(1.055); opacity: 0.66; }
}

@keyframes character-float {
  0%, 100% { --float-y: 0px; }
  50% { --float-y: -13px; }
}

@keyframes character-boop {
  0% { transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) scale(1); }
  35% { transform: rotateX(0) rotateY(0) scale(0.95, 1.05) translateY(-8px); }
  70% { transform: rotateX(0) rotateY(0) scale(1.04, 0.96) translateY(3px); }
  100% { transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) scale(1); }
}

@keyframes shadow-breathe {
  50% { transform: scale(0.86); opacity: 0.28; }
}

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

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

@keyframes note-nudge {
  50% { transform: translate(-4px, -4px); }
}

@media (min-width: 1024px) and (min-height: 720px) {
  body {
    overflow: hidden;
  }

  .scene {
    height: 100vh;
    max-height: 1080px;
  }
}

@media (min-width: 1700px) and (min-height: 950px) {
  .hero {
    grid-template-columns: 0.98fr 1.02fr;
  }

  .copy-panel {
    transform: translateY(-0.5rem);
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
    gap: 0;
  }

  .hero-title {
    font-size: clamp(4rem, 8vw, 6.2rem);
  }

  .character-button {
    width: min(48vw, 590px);
  }

  .thought--one {
    left: -5%;
  }
}

@media (max-width: 820px) {
  .scene {
    min-height: 100svh;
    overflow: hidden;
  }

  .topbar,
  .hero,
  .footer {
    width: min(100% - 1.5rem, 680px);
  }

  .topbar {
    align-items: flex-start;
  }

  .brand > span:last-child,
  .nav-link:first-child {
    display: none;
  }

  .nav {
    gap: 0.2rem;
  }

  .nav-link {
    min-height: 42px;
    padding: 0.65rem 0.78rem;
    font-size: 0.76rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 1.2rem;
  }

  .copy-panel {
    text-align: center;
  }

  .eyebrow {
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: clamp(4.35rem, 20.5vw, 7.8rem);
  }

  .tagline {
    margin-inline: auto;
    font-size: clamp(1.1rem, 4.7vw, 1.45rem);
  }

  .actions {
    display: flex;
    justify-content: center;
  }

  .lore-card {
    margin-inline: auto;
    text-align: left;
  }

  .character-zone {
    min-height: 430px;
    margin-top: 1rem;
  }

  .character-button {
    width: min(100%, 520px);
    max-height: none;
  }

  .tap-note {
    right: 4%;
    bottom: 0;
  }

  .thought--one {
    left: 4%;
  }

  .footer {
    gap: 1rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 520px) {
  .background {
    background-position: 61% center;
  }

  .hero-title {
    font-size: clamp(3.8rem, 19.5vw, 5.8rem);
  }

  .ca-button {
    min-height: 62px;
  }

  .copy-hint {
    display: none;
  }

  .character-zone {
    min-height: 360px;
  }

  .thought--two,
  .orbit--one {
    display: none;
  }

  .tap-note {
    font-size: 0.8rem;
  }

  .footer p:first-child {
    display: none;
  }

  .footer {
    justify-content: center;
  }
}

@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 {
    display: none;
  }
}
