/* The Bewty Story. Phones: full screen. Laptops: inside a phone on the zebra print.
   Legal pages keep styles.css. Text always sits on a solid plate, never straight on a print. */
:root {
  color-scheme: light;
  --peach: #FF8F70; --peach-ink: #C4553A; --lavender: #B9A7E8; --cream: #FFF9F5; --plum: #342536;
  --muted: #6B5258; --label: #7D5F66;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #1A1A1A; color: var(--cream); font: 400 16px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font: 400 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin: 0; }

/* Laptop frame */
body { background: #1A1A1A url("/zebra.jpg") center / cover fixed; }
.stage { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; grid-template-rows: 1fr auto; gap: 14px; padding: 18px 0; }
.phone {
  position: relative; overflow: hidden; background: #000; isolation: isolate; container-type: size;
  width: min(390px, 100vw, calc((100vh - 90px) * .4621));
  width: min(390px, 100vw, calc((100svh - 90px) * .4621));
  height: min(844px, calc(100vh - 90px)); height: min(844px, calc(100svh - 90px));
  border-radius: 44px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7), 0 0 0 10px #1A1A1A;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.legal { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; padding: 8px 16px; border-radius: 999px;
  background: var(--cream); font: 600 13px var(--sans); color: var(--muted); }
.legal a { color: var(--muted); text-underline-offset: 3px; }

/* Phone: full screen */
@media (max-width: 500px), (max-height: 520px) {
  body { background: #000; }
  .stage { padding: 0; gap: 0; grid-template-rows: 1fr; }
  .phone { width: 100vw; height: 100vh; height: 100svh; border-radius: 0; box-shadow: none; }
  .stage > .legal { display: none; }
}

/* Slides */
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 220ms ease-out, visibility 0s 220ms; }
.slide.on { opacity: 1; visibility: visible; transition: opacity 220ms ease-out; }
.slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone.ready .slide.on .bg { animation: drift 7s linear forwards; }
.phone.paused .slide.on .bg { animation-play-state: paused; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.05); } }
.slide::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%); }
.slide.lav { background: radial-gradient(70% 50% at 20% 10%, rgba(255,255,255,.55), transparent 70%), linear-gradient(160deg, #C9B9F0, #B9A7E8 55%, #FFB49E); }
.slide.lav::after { display: none; }

/* Words: Instagram-style highlight plates */
.words { position: absolute; z-index: 4; left: 20px; right: 20px; top: 22%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.words p { margin: 0; padding: 8px 14px 10px; border-radius: 14px; background: var(--cream); color: var(--plum);
  font: 400 38px/1.02 var(--serif); font-size: clamp(27px, 9.7cqw, 38px); letter-spacing: -.02em; transform: rotate(-2deg); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.words p.big { font-size: 44px; font-size: clamp(30px, 11.3cqw, 44px); }
.words p.small { font: 700 19px/1.25 var(--sans); font-size: clamp(15px, 4.9cqw, 19px); letter-spacing: 0; background: var(--peach); transform: rotate(1.5deg); }
.words p.plum { background: var(--plum); color: var(--cream); }
.words p.cream { background: var(--cream); }
.slide.on .words p { animation: pop 260ms var(--ease) both; }
.slide.on .words p:nth-child(2) { animation-delay: 700ms; }
.slide.on .words p:nth-child(3) { animation-delay: 1500ms; }
@keyframes pop { from { opacity: 0; transform: scale(.94) rotate(-2deg); } }

/* Stickers: our own pack, plus the OKURRR text sticker */
.st { position: absolute; z-index: 4; transform: rotate(var(--r)); filter: drop-shadow(0 8px 12px rgba(0,0,0,.3)); pointer-events: none; }
.tsticker { position: absolute; z-index: 4; transform: rotate(var(--r)); padding: 8px 16px 10px; border-radius: 16px;
  background: var(--peach); color: var(--plum); font: 800 34px/1 var(--sans); font-size: clamp(24px, 8.7cqw, 34px); letter-spacing: .02em;
  box-shadow: 0 0 0 5px #fff, 0 12px 20px rgba(0,0,0,.35); pointer-events: none; }
.slide.on .st, .slide.on .tsticker { animation: stick 320ms var(--ease) 900ms both; }
@keyframes stick { from { opacity: 0; transform: scale(.6) rotate(-6deg); } }

/* Story chrome */
.bars { position: absolute; z-index: 5; top: max(12px, env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; pointer-events: none; }
.bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.bars i { display: block; height: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.head { position: absolute; z-index: 6; top: calc(max(12px, env(safe-area-inset-top)) + 12px); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--cream); box-shadow: 0 0 0 2px var(--peach); }
.who-block { min-width: 0; }
.who-line { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { font-weight: 700; }
.when { opacity: .75; font-size: 13px; }
.when.short { display: none; }
@container (max-width: 340px) { .when.long { display: none; } .when.short { display: inline; } }
.music { display: block; border: 0; background: none; padding: 2px 0; min-height: 24px; color: #fff; opacity: .9; font: 600 12px var(--sans); text-align: left; }
.music:hover { opacity: 1; text-decoration: underline; }
.playpause { margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.18); display: grid; place-items: center; }
.playpause::before, .playpause::after { content: ""; grid-area: 1 / 1; }
.playpause::before { width: 12px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; box-sizing: border-box; }
.playpause[aria-pressed="true"]::before { width: 0; height: 0; border: 0; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }

.tap { position: absolute; inset: 0; z-index: 3; touch-action: none; }
.hint { position: absolute; z-index: 5; left: 50%; bottom: 82px; transform: translateX(-50%); margin: 0; font: 400 10px var(--mono);
  letter-spacing: .12em; text-transform: uppercase; opacity: .7; white-space: nowrap; pointer-events: none; }
.phone.last .hint { display: none; }

/* Reply bar */
.reply { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.reply button { flex: 1; min-height: 48px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.7); background: rgba(0,0,0,.2);
  color: #fff; font: 600 15px var(--sans); text-align: left; padding: 0 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.reply button.join { flex: none; border: 0; background: var(--peach); color: var(--plum); font-weight: 700; text-align: center; }
.reply button.join:disabled { opacity: .85; cursor: default; }

/* Peachy: tap her and she jumps and talks */
.peachy-btn { position: absolute; z-index: 7; right: 12px; bottom: 112px; width: 150px; width: clamp(110px, 38cqw, 150px); padding: 0; border: 0; background: none; transform: rotate(8deg); }
.peachy-btn img { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 12px 16px rgba(0,0,0,.4)); }
.slide.on .peachy-btn { animation: stick 320ms var(--ease) 400ms both; }
.peachy-btn.jump img { animation: jump 520ms var(--ease); }
@keyframes jump { 35% { transform: translateY(-46px) scale(1.08) rotate(-6deg); } 70% { transform: scale(.96, 1.04); } }
.float-peachy { display: none; }
.float-peachy.show { display: block; animation: stick 300ms var(--ease) both; }
.say { position: absolute; z-index: 8; right: 24px; bottom: 278px; max-width: 230px; margin: 0; padding: 12px 14px; border-radius: 18px 18px 4px 18px;
  background: var(--cream); color: var(--plum); font: 600 16px/1.25 var(--sans); box-shadow: 0 14px 30px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity 180ms ease-out, transform 180ms ease-out; pointer-events: none; }
.say.show { opacity: 1; transform: none; }

/* Slider sticker (last slide) */
.poll { position: absolute; z-index: 5; left: 50%; top: 44%; width: 300px; width: min(300px, 80cqw); padding: 26px 26px 30px; border-radius: 26px; background: #fff;
  transform: translate(-50%, -50%) rotate(-14deg); box-shadow: 0 24px 50px -16px rgba(52,37,54,.45); color: var(--plum); text-align: center; }
.poll h2 { margin: 0 0 22px; font: 700 26px/1.1 var(--sans); letter-spacing: -.01em; }
.track { position: relative; height: 12px; border-radius: 999px; background: #E7E2EA; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--peach), #FFB49E); }
.thumb { position: absolute; top: 50%; left: 0; width: 64px; height: 44px; transform: translate(-32px, -50%);
  background: center / contain no-repeat; cursor: grab; touch-action: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.poll .after { margin: 18px 0 0; font: 400 30px/1 var(--serif); opacity: 0; transform: scale(.9); transition: opacity 200ms ease-out, transform 200ms ease-out; }
.poll.done .after { opacity: 1; transform: scale(1); }
/* "···" menu: legal links live here on phones */
.more-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.18); color: #fff; font: 800 18px/1 var(--sans); letter-spacing: 1px; }
.more-links { display: grid; margin-top: 6px; }
.more-links a { display: flex; align-items: center; min-height: 48px; padding: 0 4px; color: var(--plum); font: 600 17px var(--sans);
  text-decoration: none; border-bottom: 1px solid rgba(52,37,54,.08); }
.more .fine { margin: 14px 4px 0; font-size: 13px; color: var(--muted); }

/* The reward: back-side peaches rain down */
.rain { position: absolute; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.rain img { position: absolute; top: -90px; width: var(--s); animation: fall var(--d) cubic-bezier(.45,.05,.55,.95) var(--delay) forwards; }
@keyframes fall { to { transform: translateY(calc(100svh + 180px)) rotate(var(--spin)); } }

/* Sheets (waitlist, radio) slide up inside the phone */
.sheet { position: absolute; z-index: 9; left: 10px; right: 10px; bottom: 10px; padding: 22px 20px 20px; border-radius: 28px;
  background: var(--cream); color: var(--plum); box-shadow: 0 -10px 60px rgba(0,0,0,.45); animation: up 260ms var(--ease) both; }
.sheet[hidden] { display: none; }
.sheet { user-select: text; -webkit-user-select: text; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet .close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; color: var(--plum); }
.sheet .face { display: block; width: 130px; height: auto; margin: -70px auto 0; filter: drop-shadow(0 10px 18px rgba(52,37,54,.3)); }
.sheet .line { margin: 8px 0 14px; text-align: center; font: 400 27px/1.1 var(--serif); }
.sheet form { display: grid; gap: 10px; }
.sheet input[type=email] { min-height: 52px; border-radius: 16px; border: 1.5px solid rgba(52,37,54,.15); padding: 0 16px; font: 400 17px var(--sans); background: #fff; color: var(--plum); }
.pill { min-height: 52px; border: 0; border-radius: 999px; background: var(--peach); color: var(--plum); font: 700 16px var(--sans); box-shadow: 0 12px 24px -10px rgba(255,143,112,.8); }
.pill:disabled { opacity: .4; cursor: default; }
.text-btn { min-height: 44px; border: 0; background: none; color: var(--muted); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wiggle { animation: wiggle 420ms var(--ease); }
@keyframes wiggle { 25% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } 75% { transform: rotate(-2deg); } }
.radio .label { margin: 4px 0 12px 4px; }
.radio iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }

.noscript { max-width: 520px; margin: 40px auto; padding: 24px; border-radius: 24px; background: var(--cream); color: var(--plum); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .poll.done .after, .say.show { opacity: 1; transform: none; }
}
