/* ============================================================
   ACT I — the sticker. Clinical white room, one huge price label.
   The peel is driven by js/sticker.js via element styles.
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vh, 120px) 20px clamp(90px, 12vh, 140px);
}

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vh, 46px);
  width: 100%;
}

/* ---------- the rig: registration marks around the specimen ---------- */
.sticker-rig {
  position: relative;
  width: min(840px, 94vw);
  transform: rotate(-1.6deg);
}
.sticker-rig::before, .sticker-rig::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 0 solid rgba(22,20,15,0.35);
  pointer-events: none;
}
.sticker-rig::before { top: -26px; left: -26px; border-left-width: 1px; border-top-width: 1px; }
.sticker-rig::after { bottom: -26px; right: -26px; border-right-width: 1px; border-bottom-width: 1px; }

.sticker-rig .fig-note {
  position: absolute; bottom: -34px; left: 2px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

/* ---------- sticker body ---------- */
.sticker {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 5;
  cursor: grab;
  touch-action: pan-y;   /* horizontal drags are ours */
  user-select: none;
  -webkit-user-select: none;
}
.sticker:active { cursor: grabbing; }
.sticker.peeling { cursor: grabbing; }

/* ---------- layer 1: what geography hides ---------- */
.sticker-under {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0) 34%),
    var(--fluoro-green);
  box-shadow: inset 0 0 0 1px rgba(22,20,15,0.18), inset 0 0 44px rgba(22,20,15,0.06);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-items: center;
  justify-items: center;
  /* biased right so the reveal lands mid-peel, before the flap clears */
  padding: clamp(16px, 4%, 34px) clamp(16px, 4%, 34px) clamp(16px, 4%, 34px) 20%;
  text-align: center;
}
.under-kicker {
  font: 700 clamp(9px, 1.4vw, 12px)/1 var(--mono);
  letter-spacing: 0.34em;
  color: rgba(22,20,15,0.62);
}
.under-country {
  font-family: var(--stamp);
  font-size: clamp(30px, 7vw, 64px);
  letter-spacing: 0.02em;
  align-self: end;
}
.under-price {
  font-family: var(--stamp);
  font-size: clamp(56px, 13vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.under-badge {
  margin-top: clamp(6px, 1.5vw, 14px);
  font-family: var(--stamp);
  font-size: clamp(14px, 2.6vw, 24px);
  color: var(--red);
  border: 3px solid var(--red);
  padding: 4px 14px 3px;
  transform: rotate(-3deg);
  filter: url(#stamp-bleed);
}
.under-note {
  margin-top: clamp(8px, 1.6vw, 14px);
  font: 500 clamp(9px, 1.5vw, 12px)/1.4 var(--mono);
  letter-spacing: 0.08em;
  color: rgba(22,20,15,0.6);
}

/* shadow the lifted paper casts onto the layer beneath — js drives */
.sticker-lift-shadow {
  position: absolute; top: -2%; bottom: -2%;
  z-index: 2;
  width: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(12,10,6,0.42), rgba(12,10,6,0.12) 45%, transparent);
  filter: blur(6px);
  opacity: 0;
}

/* ---------- layer 3: the printed face ---------- */
.sticker-front {
  position: absolute; inset: 0;
  z-index: 3;
  background:
    linear-gradient(158deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 30%),
    linear-gradient(340deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 26%),
    var(--fluoro-orange);
  box-shadow:
    inset 0 0 0 1px rgba(22,20,15,0.22),
    0 1px 2px rgba(22,20,15,0.25);
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 4.4%, 40px);
  color: var(--ink);
}
.front-kicker {
  width: 100%;
  font: 700 clamp(9px, 1.4vw, 13px)/1 var(--mono);
  letter-spacing: 0.3em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: clamp(10px, 1.8vw, 16px);
}
/* name + price stack on the left; the empty right is where you grab to
   peel — and where TURKEY punches in during the reveal */
.front-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(6px, 1.4vw, 16px);
  /* keep the tall type clear of the right half the peel exposes */
  padding-right: 22%;
}
.front-name {
  font-family: var(--stamp);
  font-size: clamp(30px, 5.6vw, 62px);
  line-height: 0.92;
  letter-spacing: 0.01em;
}
.front-price {
  font-family: var(--stamp);
  font-size: clamp(60px, 12vw, 128px);
  line-height: 0.82;
  letter-spacing: -0.02em;
}
.front-country {
  margin-top: clamp(4px, 1vw, 10px);
  font: 700 clamp(11px, 1.8vw, 15px)/1 var(--mono);
  letter-spacing: 0.26em;
  background: var(--ink);
  color: var(--fluoro-orange);
  padding: 6px 10px 5px;
  white-space: nowrap;
}
.front-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
}
.front-barcode {
  width: clamp(110px, 26vw, 190px);
  height: clamp(22px, 4.5vw, 38px);
  background: repeating-linear-gradient(
    to right,
    var(--ink) 0 2px, transparent 2px 4px,
    var(--ink) 4px 7px, transparent 7px 9px,
    var(--ink) 9px 10px, transparent 10px 14px,
    var(--ink) 14px 18px, transparent 18px 20px
  );
}
.front-sku {
  text-align: right;
  font: 500 clamp(8px, 1.3vw, 11px)/1 var(--mono);
  letter-spacing: 0.12em;
  color: rgba(22,20,15,0.7);
}

/* ---------- layer 4: the folded-back flap (adhesive side) ---------- */
.sticker-flap {
  position: absolute; top: 0; bottom: 0; left: 0;
  z-index: 4;
  width: 0;
  pointer-events: none;
  filter: drop-shadow(-10px 6px 14px rgba(12,10,6,0.38));
  will-change: width, left, transform;
}
.flap-inner {
  position: absolute; inset: 0;
  overflow: hidden;
}
/* mirrored clone of the face is injected here by js — .flap-mirror */
.flap-mirror {
  position: absolute; top: 0; left: 0; height: 100%;
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 1 !important;     /* the clone carries .sticker-front's z-index:3 */
}
/* milky adhesive skin over the mirrored print */
.flap-adhesive {
  position: absolute; inset: 0;
  z-index: 2;
  background:
    linear-gradient(to left,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.86) 22%,
      rgba(244,242,235,0.94) 60%,
      rgba(228,224,214,0.97) 100%),
    repeating-linear-gradient(115deg, rgba(0,0,0,0.02) 0 3px, transparent 3px 7px);
  box-shadow: inset 0 0 0 1px rgba(22,20,15,0.08);
}
/* bright roll of light along the grab edge */
.flap-curl {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: clamp(10px, 6%, 26px);
  z-index: 3;
  background: linear-gradient(to right,
    rgba(120,112,96,0.45) 0%,
    rgba(255,255,255,0.95) 40%,
    rgba(255,255,255,0.1) 100%);
}

/* ---------- lifted corner: a dog-eared top-right that shows it peels ---------- */
.peel-corner {
  position: absolute;
  z-index: 5;
  top: -1px; right: -1px;
  width: clamp(46px, 7%, 72px);
  height: clamp(46px, 7%, 72px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
/* the exposed green underside where the corner has lifted */
.peel-corner-under {
  position: absolute; inset: 0;
  background: linear-gradient(225deg, var(--fluoro-green) 0%, #b9d000 60%, #9fb400 100%);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  box-shadow: inset 0 0 0 1px rgba(22,20,15,0.14);
}
/* the folded-back triangle of paper, curling toward us with a shadow */
.peel-corner-fold {
  position: absolute; inset: 0;
  clip-path: polygon(100% 0, 34% 0, 100% 66%);
  background: linear-gradient(215deg, #fff 0%, #efeadd 42%, #d7d1c2 100%);
  box-shadow: -3px 3px 7px rgba(22,20,15,0.34);
  transform-origin: 100% 0;
  animation: cornerFlutter 3s ease-in-out infinite;
}
@keyframes cornerFlutter {
  0%, 100% { transform: skewX(0deg) scaleX(1); }
  40% { transform: skewX(-5deg) scaleX(1.08); }
}

/* ---------- peel hint: a fluoro sticker slapped on the grab edge ---------- */
.peel-hint {
  position: absolute;
  z-index: 6;
  right: -18px;
  top: 30%;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--stamp);
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--fluoro-green);
  padding: 10px 13px 9px;
  transform: rotate(4deg);
  box-shadow: -4px 4px 0 rgba(22,20,15,0.28), inset 0 0 0 1px rgba(22,20,15,0.2);
  animation: hintTug 1.8s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.peel-hint-grab { font-size: 1.1em; transform: rotate(-18deg); }
.peel-hint-arrow { font-family: var(--mono); font-weight: 700; }
/* fade the prompts only while actively peeling or once peeled open —
   they come back when the sticker is stuck flat again */
.sticker.peeling .peel-hint,
.sticker.peeled .peel-hint { opacity: 0; }
.sticker.peeling .peel-corner,
.sticker.peeled .peel-corner { opacity: 0; }
@keyframes hintTug {
  0%, 100% { transform: rotate(4deg) translateX(0); }
  50% { transform: rotate(3deg) translateX(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .peel-hint, .peel-corner-fold { animation: none; }
}

/* ---------- copy under the specimen ---------- */
.hero-tag {
  font: 500 clamp(15px, 2.4vw, 20px)/1.5 var(--mono);
  text-align: center;
  letter-spacing: 0.01em;
}
.hero-tag em {
  font-style: normal;
  background: var(--fluoro-green);
  padding: 2px 6px;
  box-shadow: 1px 2px 0 rgba(22,20,15,0.16);
}

/* ---------- torn paper edge into the dark bench ---------- */
.hero-tear-edge {
  position: absolute;
  left: -2%; right: -2%; bottom: -34px;
  height: 36px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 28%, 97.2% 62%, 94.8% 30%, 92% 74%, 89.4% 38%, 86.5% 80%, 83.8% 34%, 81% 66%, 78.2% 28%, 75.5% 76%, 72.6% 42%, 69.8% 84%, 67% 36%, 64.2% 70%, 61.4% 26%, 58.5% 64%, 55.8% 88%, 53% 40%, 50.2% 74%, 47.4% 30%, 44.5% 68%, 41.8% 90%, 39% 44%, 36.2% 78%, 33.4% 32%, 30.5% 62%, 27.8% 86%, 25% 38%, 22.2% 72%, 19.4% 28%, 16.5% 58%, 13.8% 82%, 11% 36%, 8.2% 66%, 5.4% 90%, 2.6% 46%, 0 70%);
  z-index: 4;
  pointer-events: none;
}

@media (max-width: 560px) {
  .sticker-rig { transform: rotate(-1.2deg); }
  .sticker { aspect-ratio: 4 / 3.6; }
  .front-main { padding-right: 8%; }
  .front-name { font-size: clamp(30px, 9vw, 46px); }
  .front-price { font-size: clamp(58px, 19vw, 88px); }
}
