/* ============ PIGLET — tokens ============ */
:root {
  --bg: #faf3ef;
  --blush: #f7e3dc;
  --pink: #f3b9be;
  --pink-deep: #e98fa0;
  --charcoal: #2e2a2b;
  --ink: #423a3c;
  --display: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.05; }

/* ============ PRELOADER ============ */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--blush);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity .7s cubic-bezier(.6,0,.3,1), visibility .7s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.pre-blob-wrap { position: relative; width: 110px; height: 110px; }
.pre-blob {
  position: absolute; inset: 0;
  background: var(--pink);
  border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  animation: blobSquish 1.15s cubic-bezier(.45,0,.55,1) infinite;
  box-shadow: inset -8px -10px 0 rgba(233,143,160,.45);
}
.pre-blob-shadow {
  position: absolute; left: 10%; right: 10%; bottom: -18px; height: 12px;
  background: rgba(46,42,43,.10); border-radius: 50%;
  animation: shadowSquish 1.15s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes blobSquish {
  0%, 100% { transform: scale(1, 1); }
  50%      { transform: scale(1.22, .72) translateY(14px); }
}
@keyframes shadowSquish {
  0%, 100% { transform: scaleX(1); opacity: .6; }
  50%      { transform: scaleX(1.35); opacity: 1; }
}
.pre-word {
  font-family: var(--display); font-weight: 800; letter-spacing: .42em;
  font-size: 15px; color: var(--charcoal); text-indent: .42em;
}
.pre-count {
  font-family: var(--body); font-weight: 500; font-variant-numeric: tabular-nums;
  font-size: 13px; color: var(--pink-deep);
}

/* ============ SCROLL TRACKS / PIN ============ */
.track { position: relative; height: calc(var(--track-h) * 1vh); }
.pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.fill-canvas, .fill-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ============ HERO ============ */
#hero .pin { background: var(--bg); }
.hero-copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 9vh;
  text-align: center; pointer-events: none;
}
.hero-title {
  font-size: clamp(72px, 17vw, 240px);
  letter-spacing: .02em;
  color: var(--charcoal);
  display: flex;
}
.hero-title span {
  display: inline-block;
  opacity: 0; transform: translateY(.55em) rotate(6deg) scale(.8);
  animation: letterIn .8s cubic-bezier(.2,1.4,.3,1) forwards;
  animation-delay: calc(var(--i, 0) * 90ms + 200ms);
}
body.loaded .hero-title span:nth-child(1) { --i: 0; }
body.loaded .hero-title span:nth-child(2) { --i: 1; }
body.loaded .hero-title span:nth-child(3) { --i: 2; }
body.loaded .hero-title span:nth-child(4) { --i: 3; }
body.loaded .hero-title span:nth-child(5) { --i: 4; }
body.loaded .hero-title span:nth-child(6) { --i: 5; }
.hero-title span { animation-play-state: paused; }
body.loaded .hero-title span { animation-play-state: running; }
@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
.hero-sub {
  margin-top: 132px;
  font-size: clamp(20px, 2.34vw, 27px);
  font-weight: 500; color: var(--ink);
  text-shadow: 0 1px 14px rgba(250,243,239,.9), 0 0 4px rgba(250,243,239,.7);
  opacity: 0; transition: opacity .6s .9s;
}
body.loaded .hero-sub { opacity: .85; }
.hero-hint {
  position: absolute; bottom: 4.5vh; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 14px;
  background: #fff; border-radius: 999px;
  box-shadow: 0 8px 24px -8px rgba(46,42,43,.18);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--pink-deep); opacity: 0; transition: opacity .6s 1.6s;
}
body.loaded .hero-hint { opacity: .9; }
.hint-mouse { width: 24px; height: auto; color: var(--pink-deep); }
.hint-wheel {
  animation: hintWheel 1.8s cubic-bezier(.4,0,.4,1) infinite;
}
@keyframes hintWheel {
  0%        { transform: translateY(0); opacity: 1; }
  55%       { transform: translateY(9px); opacity: 0; }
  56%       { transform: translateY(-3px); opacity: 0; }
  75%, 100% { transform: translateY(0); opacity: 1; }
}

/* hero copy fades out with scroll (driven by --p) */
#hero .pin { --p: 0; }
.hero-copy { opacity: calc(1 - var(--p) * 3.2); }

/* beat 1 — Born calm. */
.beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.beat h2 { font-size: clamp(44px, 7.5vw, 110px); color: var(--charcoal); }
.beat p { margin-top: 18px; font-size: clamp(15px, 1.6vw, 19px); font-weight: 600; color: var(--ink); opacity: .8; }
.beat-born {
  opacity: 0; transform: translateY(30px);
  transition: opacity .5s, transform .5s;
}
.beat-born.on { opacity: 1; transform: none; transition: opacity .7s .1s, transform .7s .1s cubic-bezier(.2,1,.3,1); }

/* ============ LOUD ============ */
#loud .pin { background: var(--charcoal); color: var(--bg); }
.loud-veil { position: absolute; inset: 0; background: rgba(46,42,43,.42); }
.loud-copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3vh; text-align: center; padding: 0 6vw;
}
.loud-head { font-size: clamp(40px, 6.5vw, 96px); color: #fff; }
.loud-words { display: flex; flex-direction: column; gap: .4vh; }
.slam {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(26px, 4vw, 54px);
  color: var(--pink);
  opacity: 0; transform: scale(1.7) rotate(-2deg);
  filter: blur(6px);
}
.slam.on {
  opacity: 1; transform: none; filter: none;
  transition: opacity .28s, transform .28s cubic-bezier(.2,1.2,.3,1), filter .28s;
}
.slam:nth-child(2).on { transition-delay: .05s; }
.loud-tail {
  font-size: clamp(15px, 1.7vw, 20px); font-weight: 500; color: #fff;
  opacity: 0; transform: translateY(14px);
}
.loud-tail.on { opacity: .9; transform: none; transition: opacity .6s .15s, transform .6s .15s; }

/* ============ CALLING ============ */
#calling .pin { background: var(--blush); }
.calling-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250,243,239,.15) 30%, rgba(250,243,239,.92) 78%);
}
.calling-copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 7vh; text-align: center;
}
.calling-copy h2 { font-size: clamp(38px, 6vw, 88px); color: var(--charcoal); }
.calling-line { margin-top: 14px; color: var(--ink); font-size: clamp(14px, 1.5vw, 18px); opacity: .85; }
.specs {
  margin-top: 4.5vh; list-style: none;
  display: flex; gap: clamp(18px, 4vw, 64px); flex-wrap: wrap; justify-content: center;
}
.specs li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; transform: translateY(18px);
}
.specs li.on { opacity: 1; transform: none; transition: opacity .55s, transform .55s cubic-bezier(.2,1,.3,1); }
.specs li:nth-child(2).on { transition-delay: .08s; }
.specs li:nth-child(3).on { transition-delay: .16s; }
.specs li:nth-child(4).on { transition-delay: .24s; }
.specs strong {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(26px, 3.4vw, 46px); color: var(--pink-deep);
}
.specs span {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); opacity: .7;
}

/* ============ GIFT ============ */
#gift { padding: 16vh 6vw; background: #ff9db8; }
.gift-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.gift-video {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  display: block;
  border-radius: 28px;
  box-shadow: 0 30px 80px -30px rgba(191,84,110,.6);
  background: #fff;
}
.gift-quote p {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 52px); line-height: 1.15; color: var(--charcoal);
}
.gift-quote cite {
  display: block; margin-top: 18px; font-style: normal;
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--charcoal); opacity: .55;
}

/* ============ SQUEEZE CHAMBER ============ */
#squeeze {
  min-height: 100vh; padding: 12vh 6vw 10vh;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
}
.squeeze-inner { width: min(1100px, 100%); text-align: center; }
.squeeze-title { font-size: clamp(40px, 6vw, 84px); color: var(--charcoal); }
.squeeze-columns {
  margin-top: 6vh;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  text-align: center;
}
.squeeze-right { display: flex; flex-direction: column; align-items: center; }
.squeeze-stage {
  position: relative; margin: 0 auto;
  width: min(520px, 92vw);
}
#squeezeCanvas {
  width: 100%; height: auto; display: block;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 40px 90px -40px rgba(46,42,43,.35);
}
#camPreview {
  position: absolute; right: 14px; bottom: 14px;
  width: 132px; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 16px; border: 3px solid #fff;
  box-shadow: 0 10px 30px rgba(46,42,43,.25);
  transform: scaleX(-1);
  display: none; background: var(--charcoal);
}
#camPreview.on { display: block; }
.oink-bubble {
  position: absolute; left: 50%; top: 5%;
  transform: translateX(-50%) scale(0);
  transform-origin: bottom center;
  background: #fff; color: var(--charcoal);
  font-family: var(--display); font-weight: 800;
  font-size: clamp(20px, 4vw, 30px); line-height: 1;
  padding: 12px 24px 13px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(46,42,43,.2);
  pointer-events: none;
  transition: transform .18s cubic-bezier(.2,1.6,.3,1);
}
.oink-bubble::after {
  content: ''; position: absolute;
  bottom: -9px; left: 50%; transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 11px solid #fff;
}
.oink-bubble.on { transform: translateX(-50%) scale(1); }

.cam-status {
  position: absolute; left: 14px; bottom: 14px;
  font-size: 12px; font-weight: 500; letter-spacing: .06em;
  background: rgba(255,255,255,.85); color: var(--ink);
  padding: 7px 12px; border-radius: 999px;
  display: none;
}
.cam-status.on { display: block; }

.squeeze-tally {
  margin-top: 18px;
  font-size: 13px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); opacity: .7;
}
.squeeze-tally span {
  font-family: var(--display); font-weight: 700;
  color: var(--pink-deep);
  font-size: 15px; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.gesture-guide {
  margin-top: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 3vw, 28px);
  color: var(--charcoal);
}
.g-step { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.g-step svg { width: clamp(58px, 9vw, 84px); height: auto; display: block; }
.g-num {
  position: absolute; top: -6px; left: calc(50% - 46px);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--pink-deep); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.g-label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); opacity: .75;
}
.g-next { width: 20px; color: var(--pink-deep); opacity: .8; margin-bottom: 22px; }
.g-next svg { width: 100%; height: auto; display: block; }

.squeeze-controls { margin-top: 3vh; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.btn-cam {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  color: #111; background: #ff8bac;
  border: none; border-radius: 999px;
  padding: 16px 30px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  transition: transform .25s cubic-bezier(.2,1.4,.3,1), background .25s, box-shadow .25s;
  box-shadow: 0 14px 34px -12px rgba(233,143,160,.7);
}
.btn-cam:hover { transform: translateY(-2px) scale(1.03); background: #ff9db8; }
.btn-cam:active { transform: scale(.97); }
.btn-cam[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-cam-dot { width: 9px; height: 9px; border-radius: 50%; background: #111; }
.btn-cam.live .btn-cam-dot { background: #ff5d5d; animation: liveBlink 1.2s infinite; }
@keyframes liveBlink { 50% { opacity: .3; } }

.squeeze-fallback { display: flex; flex-direction: column; gap: 10px; width: min(380px, 80vw); }
.squeeze-fallback label {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); opacity: .65;
}
#squeezeSlider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 12px; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
  outline: none; cursor: pointer;
}
#squeezeSlider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 4px solid var(--pink-deep);
  box-shadow: 0 4px 14px rgba(46,42,43,.25);
  transition: transform .15s;
}
#squeezeSlider::-webkit-slider-thumb:hover { transform: scale(1.15); }
#squeezeSlider::-moz-range-thumb {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 4px solid var(--pink-deep);
  box-shadow: 0 4px 14px rgba(46,42,43,.25);
}
.squeeze-note { margin-top: 26px; font-size: 12.5px; color: var(--ink); opacity: .55; }

/* ============ FOOTER ============ */
footer {
  background: var(--charcoal); color: var(--bg);
  padding: 6vh 6vw 4vh; text-align: center;
}
.foot-pig {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; background: #fff;
  animation: pigBounce 2.4s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes pigBounce {
  0%, 100% { transform: translateY(0) scale(1,1); }
  42%      { transform: translateY(-16px) scale(.96,1.05); }
  55%      { transform: translateY(0) scale(1.08,.9); }
  62%      { transform: translateY(-4px) scale(1,1.02); }
  68%      { transform: translateY(0) scale(1,1); }
}
.foot-line {
  margin-top: 26px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 3vw, 38px);
}
.foot-tiny { margin-top: 14px; font-size: 12.5px; opacity: .45; letter-spacing: .05em; }
.foot-tiny a {
  color: inherit; text-decoration: underline;
  text-underline-offset: 3px; transition: color .2s;
}
.foot-tiny a:hover { color: var(--pink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .squeeze-columns { grid-template-columns: 1fr; }
  .squeeze-right { margin-top: 1vh; }
}

@media (max-width: 760px) {
  .gift-inner { grid-template-columns: 1fr; }
  .gift-quote { text-align: center; }
  #camPreview { width: 96px; right: 10px; bottom: 10px; }
  .specs { gap: 22px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .pre-blob, .pre-blob-shadow, .hint-wheel, .foot-pig { animation: none; }
  .hero-title span { animation-duration: .01s; animation-delay: 0s; }
}
