/* ═══════════════════════════════════════════════
   VIVAN STUDIOS — cartoon studio stylesheet
   paper + ink + stickers + chaos
   ═══════════════════════════════════════════════ */

:root {
  --paper: #FFF6E7;
  --paper-deep: #FBEAC9;
  --ink: #22252F;
  --ink-soft: #4A4E5C;
  --red: #FF5D5D;
  --orange: #FF9F2E;
  --yellow: #FFC93C;
  --green: #59C97B;
  --sky: #6BC7F2;
  --blue: #4D89FF;
  --purple: #9B6BF2;
  --brown: #B07B4F;
  --white: #FFFFFF;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --border: 3px solid var(--ink);
  --f-display: "Luckiest Guy", "Comic Sans MS", cursive;
  --f-body: "Fredoka", "Comic Sans MS", sans-serif;
  --f-hand: "Gochi Hand", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background-color: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  /* subtle paper dots */
  background-image: radial-gradient(rgba(34, 37, 47, 0.07) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}

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

img { max-width: 100%; display: block; }

/* ─────────────── preloader ─────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-badge {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--yellow); border: var(--border); box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  animation: boing .9s cubic-bezier(.28,.84,.42,1) infinite;
}
.preloader-v { font-family: var(--f-display); font-size: 52px; line-height: 1; transform: translateY(5px); }
.preloader-text { font-family: var(--f-hand); font-size: 22px; color: var(--ink-soft); }
@keyframes boing {
  0%, 100% { transform: scale(1) translateY(0); }
  30% { transform: scale(1.06, .92) translateY(6px); }
  60% { transform: scale(.96, 1.06) translateY(-10px); }
}

/* ─────────────── confetti canvas ─────────────── */
#confetti-canvas {
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none; width: 100vw; height: 100vh;
}

/* ─────────────── custom cursor ─────────────── */
.cursor-dot, .cursor-pencil { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot {
    display: block; position: fixed; z-index: 9500; pointer-events: none;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--ink); left: 0; top: 0;
    transform: translate(-50%, -50%);
  }
  .cursor-pencil {
    display: block; position: fixed; z-index: 9499; pointer-events: none;
    font-size: 22px; left: 0; top: 0;
    transform: translate(6px, -26px) rotate(10deg);
    transition: transform .15s ease;
  }
  body.cursor-press .cursor-pencil { transform: translate(6px, -22px) rotate(35deg) scale(.9); }
}

/* ─────────────── header ─────────────── */
.site-header {
  position: sticky; top: 0; z-index: 800;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 246, 231, .88);
  backdrop-filter: blur(8px);
  border-bottom: var(--border);
}
.logo-badge {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--red); border: var(--border); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; text-decoration: none;
  transition: transform .2s ease;
}
.logo-badge:hover { transform: rotate(-8deg) scale(1.08); }
.logo-v { font-family: var(--f-display); color: var(--white); font-size: 22px; transform: translateY(2px); }
.site-nav { display: flex; gap: 6px; margin-left: auto; }
.site-nav a {
  font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 8px 16px; border-radius: 999px; border: 3px solid transparent;
  transition: all .15s ease;
}
.site-nav a:hover { border-color: var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.party-btn {
  font-size: 22px; width: 48px; height: 48px; border-radius: 50%;
  border: var(--border); background: var(--white); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .2s ease;
}
.party-btn:hover { transform: rotate(20deg) scale(1.1); }
.party-btn:active { transform: scale(.92); }

/* ─────────────── hero ─────────────── */
.hero {
  position: relative;
  padding: clamp(60px, 10vh, 110px) 20px clamp(70px, 12vh, 130px);
  text-align: center;
  overflow: hidden;
}
.hero-kicker {
  font-family: var(--f-hand); font-size: clamp(18px, 2.4vw, 26px);
  color: var(--ink-soft); margin-bottom: 18px;
}
.hero-title {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  line-height: .95; margin-bottom: 26px;
  user-select: none;
}
.hero-word { display: block; white-space: nowrap; }
.ltr {
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(64px, 14vw, 176px);
  -webkit-text-stroke: 3px var(--ink);
  text-stroke: 3px var(--ink);
  text-shadow: 6px 6px 0 var(--ink);
  transition: transform .15s ease;
  cursor: default;
  animation: ltr-in .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
.hero-word:nth-child(2) .ltr { animation-delay: calc(.35s + var(--i, 0) * 0s); }
.ltr:nth-child(1) { animation-delay: .05s; }
.ltr:nth-child(2) { animation-delay: .12s; }
.ltr:nth-child(3) { animation-delay: .19s; }
.ltr:nth-child(4) { animation-delay: .26s; }
.ltr:nth-child(5) { animation-delay: .33s; }
.ltr:nth-child(6) { animation-delay: .40s; }
.ltr:nth-child(7) { animation-delay: .47s; }
@keyframes ltr-in {
  from { opacity: 0; transform: translateY(60px) rotate(8deg) scale(.6); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}
.ltr:hover { animation: jiggle .45s ease; }
@keyframes jiggle {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.25, .75) rotate(-6deg); }
  50% { transform: scale(.8, 1.2) rotate(5deg) translateY(-14px); }
  75% { transform: scale(1.1, .9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
.c1 { color: var(--red); } .c2 { color: var(--yellow); } .c3 { color: var(--sky); }
.c4 { color: var(--green); } .c5 { color: var(--purple); } .c6 { color: var(--orange); }
.c7 { color: var(--blue); }

.hero-tagline {
  font-size: clamp(18px, 2.6vw, 26px); font-weight: 500;
  color: var(--ink-soft); margin-bottom: 34px; line-height: 1.45;
}
.hero-tagline em { font-family: var(--f-hand); font-style: normal; font-size: 1.15em; color: var(--red); }
.nowrap { white-space: nowrap; }

.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-family: var(--f-body); font-weight: 700; font-size: 18px;
  padding: 14px 28px; border-radius: 999px;
  border: var(--border); box-shadow: var(--shadow-sm);
  cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
  display: inline-block;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-magic { background: var(--purple); color: var(--white); }

/* peeking characters */
.hero-peek {
  position: absolute; bottom: -8px; width: clamp(110px, 16vw, 210px);
  filter: drop-shadow(4px 4px 0 rgba(34,37,47,.25));
}
.hero-peek img { border: var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }
.hero-peek-left { left: clamp(-30px, 1vw, 40px); transform: rotate(6deg); animation: peek-bob 4s ease-in-out infinite; }
.hero-peek-right { right: clamp(-30px, 1vw, 40px); transform: rotate(-5deg); animation: peek-bob 4s ease-in-out 1.2s infinite; }
@keyframes peek-bob {
  0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; }
}
.peek-bubble {
  position: absolute; top: -34px; right: -6px;
  font-family: var(--f-hand); font-size: 17px;
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 4px 12px; box-shadow: 3px 3px 0 var(--ink);
  rotate: 6deg;
}

/* floating doodles */
.hero-doodles { position: absolute; inset: 0; pointer-events: none; }
.doodle { position: absolute; opacity: .8; }
svg.doodle path, svg.doodle g { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.doodle-star { width: 36px; } .doodle-star path { fill: var(--yellow); }
.doodle-squiggle { width: 90px; } .doodle-burst { width: 44px; } .doodle-cloud { width: 90px; }
.doodle-emoji { font-size: 30px; }
.d1 { top: 12%; left: 8%; animation: floaty 6s ease-in-out infinite; }
.d2 { top: 22%; right: 10%; width: 26px; animation: floaty 7s ease-in-out 1s infinite; }
.d3 { top: 62%; left: 5%; rotate: -12deg; }
.d4 { top: 15%; right: 28%; rotate: 8deg; }
.d5 { bottom: 22%; right: 6%; animation: spin-slow 14s linear infinite; }
.d6 { top: 8%; left: 28%; animation: drift 16s ease-in-out infinite alternate; }
.d7 { top: 40%; left: 12%; rotate: -10deg; animation: floaty 5s ease-in-out .5s infinite; }
.d8 { top: 34%; right: 14%; rotate: 14deg; animation: floaty 6s ease-in-out 1.4s infinite; }
.d9 { bottom: 30%; left: 22%; animation: floaty 7s ease-in-out .8s infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@keyframes spin-slow { to { rotate: 360deg; } }
@keyframes drift { from { translate: 0 0; } to { translate: 60px 10px; } }

/* ─────────────── marquee ─────────────── */
.marquee {
  border-top: var(--border); border-bottom: var(--border);
  background: var(--ink); color: var(--yellow);
  overflow: hidden; padding: 12px 0;
  rotate: -1deg; scale: 1.02 1; transform-origin: center;
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  font-family: var(--f-display); font-size: clamp(18px, 2.4vw, 26px); letter-spacing: 2px;
  animation: marquee 22s linear infinite;
}
body.party .marquee-track { animation-duration: 4s; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────────── sections ─────────────── */
.section { padding: clamp(70px, 10vh, 120px) clamp(16px, 5vw, 48px); max-width: 1240px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vh, 64px); }
.section-kicker { font-family: var(--f-hand); font-size: 22px; color: var(--red); margin-bottom: 8px; }
.section-title {
  font-family: var(--f-display); font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05; margin-bottom: 16px;
  text-shadow: 4px 4px 0 rgba(34,37,47,.14);
}
.squig { position: relative; display: inline-block; color: var(--blue); }
.squig::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q17 0 32 8 T62 8 T92 8 T118 8' fill='none' stroke='%23FFC93C' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.section-sub { font-size: 18px; color: var(--ink-soft); line-height: 1.55; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(34px) scale(.98); transition: opacity .6s ease, transform .6s cubic-bezier(.2, 1.2, .4, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ─────────────── cast cards ─────────────── */
.cast-grid {
  display: grid; gap: clamp(20px, 3vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.card {
  position: relative;
  background: var(--white); border: var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 14px 18px 22px;
  rotate: var(--tilt, 0deg);
  transition: rotate .25s ease, translate .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.card:hover {
  rotate: 0deg; translate: 0 -8px;
  box-shadow: 10px 12px 0 var(--ink);
  z-index: 2;
}
.card:hover .card-img img { scale: 1.06; rotate: 1deg; }
.card.popped { animation: card-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes card-pop {
  0% { scale: 1; } 40% { scale: 1.06 .94; } 70% { scale: .97 1.04; } 100% { scale: 1; }
}
.card-img {
  border: var(--border); border-radius: 14px; overflow: hidden;
  background: var(--accent, var(--yellow));
  margin-bottom: 14px; aspect-ratio: 4 / 3.4;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .35s ease, rotate .35s ease; }
.card-img-dark { background: #14121C; display: grid; place-items: center; }
.card-img-dark img { object-fit: contain; }
.card-tag {
  position: absolute; top: 2px; right: 14px; translate: 0 -50%;
  font-weight: 700; font-size: 13px; letter-spacing: 1px;
  background: var(--accent, var(--yellow)); border: 2.5px solid var(--ink);
  border-radius: 999px; padding: 5px 12px; box-shadow: 3px 3px 0 var(--ink);
  rotate: 3deg;
}
.card-name { font-family: var(--f-display); font-size: 28px; margin-bottom: 6px; }
.card-bio { color: var(--ink-soft); font-size: 15.5px; line-height: 1.5; }

.card-next { display: grid; place-items: center; background: var(--paper-deep); border-style: dashed; }
.card-next-inner { text-align: center; padding: 30px 10px; }
.card-next-q {
  font-family: var(--f-display); font-size: 84px; line-height: 1; display: block; margin-bottom: 8px;
  color: var(--accent); text-shadow: 4px 4px 0 var(--ink);
  animation: floaty 3s ease-in-out infinite;
}

/* ─────────────── compare slider ─────────────── */
.sketchbook { max-width: 980px; }
.compare { outline: none; }
.compare:focus-visible .compare-frame { box-shadow: 0 0 0 4px var(--sky), var(--shadow); }
.compare-frame {
  position: relative; border: var(--border); border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow);
  background: var(--white);
  aspect-ratio: 4 / 3.2; max-height: 76vh;
  touch-action: none; user-select: none; cursor: ew-resize;
}
.compare-after, .compare-before {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.compare-before-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  background: #f4efe4;
}
.compare-frame::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 4px; background: var(--ink); translate: -50% 0;
}
.compare-handle {
  position: absolute; top: 50%; left: var(--pos, 50%);
  translate: -50% -50%; z-index: 2;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--yellow); border: var(--border); box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  font-weight: 900; font-size: 17px; letter-spacing: -1px;
  pointer-events: none;
}
.compare-label {
  position: absolute; bottom: 14px; z-index: 2;
  font-family: var(--f-display); font-size: clamp(13px, 2vw, 19px); letter-spacing: 1px;
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink);
}
.compare-label-l { left: 14px; rotate: -2deg; }
.compare-label-r { right: 14px; rotate: 2deg; background: var(--yellow); }
.compare-caption {
  text-align: center; font-family: var(--f-hand); font-size: 21px;
  color: var(--ink-soft); margin-top: 22px; rotate: -1deg;
}

/* ─────────────── about ─────────────── */
.about-grid {
  display: grid; grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(30px, 5vw, 70px); align-items: center;
}
.mascot-svg { width: 100%; overflow: visible; }
.mascot-body { fill: var(--green); stroke: var(--ink); stroke-width: 5; }
.eye-white { fill: var(--white); stroke: var(--ink); stroke-width: 4; }
.eye-pupil { fill: var(--ink); }
.mascot-smile { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.mascot-antenna { stroke: var(--ink); stroke-width: 4; }
.mascot-bulb { fill: var(--yellow); stroke: var(--ink); stroke-width: 4; animation: bulb-blink 3s ease-in-out infinite; }
@keyframes bulb-blink { 0%, 88%, 100% { fill: var(--yellow); } 92%, 96% { fill: var(--red); } }
.about-mascot { text-align: center; }
.mascot-note { font-family: var(--f-hand); font-size: 19px; color: var(--ink-soft); margin-top: 10px; rotate: -2deg; }
.about-text { font-size: 18px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 16px; max-width: 56ch; }
.about-text a { color: var(--blue); font-weight: 700; text-decoration-thickness: 3px; text-decoration-color: var(--yellow); }
.about-text a:hover { color: var(--red); }
.fact-stickers { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.fact-stickers li {
  background: var(--accent, var(--yellow)); border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 10px 16px; font-weight: 600; font-size: 15px;
  box-shadow: 3px 3px 0 var(--ink); rotate: var(--tilt, 0deg);
  transition: rotate .2s ease, scale .2s ease;
}
.fact-stickers li:hover { rotate: 0deg; scale: 1.05; }

/* ─────────────── outro ─────────────── */
.outro { padding: 20px clamp(16px, 5vw, 48px) clamp(80px, 12vh, 140px); }
.outro-card {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: var(--ink); color: var(--paper);
  border-radius: 30px; border: var(--border);
  box-shadow: 10px 10px 0 var(--yellow);
  padding: clamp(40px, 7vw, 70px) clamp(20px, 5vw, 60px);
  rotate: -1deg;
}
.outro-title { font-family: var(--f-display); font-size: clamp(36px, 6vw, 60px); line-height: 1.1; margin-bottom: 8px; }
.outro-sub { color: var(--yellow); }
.outro-text { color: #C9CBD6; font-size: 18px; margin: 14px 0 28px; }

/* ─────────────── footer ─────────────── */
.site-footer {
  border-top: var(--border); background: var(--paper-deep);
  text-align: center; padding: 44px 20px 54px;
}
.footer-brand { font-family: var(--f-display); font-size: 26px; letter-spacing: 3px; margin-bottom: 10px; }
.footer-line { color: var(--ink-soft); font-size: 15px; margin-bottom: 6px; }
.footer-gift { font-family: var(--f-hand); font-size: 20px; color: var(--red); margin-bottom: 18px; }
.footer-hint { font-size: 13px; color: var(--ink-soft); opacity: .75; }
.footer-hint kbd {
  font-family: var(--f-body); font-size: 11px; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 6px; padding: 1px 6px;
  background: var(--white); box-shadow: 2px 2px 0 var(--ink);
  margin: 0 1px;
}

/* ─────────────── party mode ─────────────── */
body.party { animation: party-bg 1.6s linear infinite; }
@keyframes party-bg {
  0% { background-color: #FFF6E7; } 25% { background-color: #FFE9F0; }
  50% { background-color: #E9F6FF; } 75% { background-color: #EDFFE9; }
  100% { background-color: #FFF6E7; }
}
body.party .ltr { animation: party-jump .55s ease-in-out infinite alternate; }
body.party .ltr:nth-child(odd) { animation-delay: .27s; }
@keyframes party-jump {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-20px) rotate(4deg); }
}
body.party .logo-badge { animation: spin-slow 1.2s linear infinite; }

/* ─────────────── responsive ─────────────── */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-mascot { max-width: 260px; margin: 0 auto; }
  .about-copy { text-align: center; }
  .about-text { margin-inline: auto; }
  .fact-stickers { justify-content: center; }
}
@media (max-width: 640px) {
  .site-nav a { padding: 7px 10px; font-size: 14px; }
  .hero-peek { width: 96px; bottom: -20px; }
  .peek-bubble { display: none; }
  .compare-frame { aspect-ratio: 3.4 / 4; }
}

/* ─────────────── reduced motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
