:root{
  --bg-deep:#14212c;
  --card:#24384a;
  --card-hover:#2d4658;
  --text:#e7edf1;
  --muted:#9db1bf;
  --accent:#e2724a;
  --accent-soft:rgba(226,114,74,0.18);
  --safe:#6fae8f;
}
*{box-sizing:border-box;}
html,body{margin:0;height:100%;background:var(--bg-deep);
  font-family:'Montserrat',sans-serif;font-size:16px;overflow:hidden;}

 section {
  color:var(--text);
 } 
/* ---------- прелоадер ---------- */
.preloader{
  position:fixed; inset:0; z-index:999;
  background:var(--bg-deep);
  display:flex; align-items:center; justify-content:center;
  transition:opacity .5s ease;
}
.preloader.hidden{ opacity:0; pointer-events:none; }
.preloader-inner{ width:min(70vw,260px); text-align:center; }
.preloader-bar-track{
  height:3px; width:100%;
  background:rgba(255,255,255,.12);
  border-radius:2px; overflow:hidden;
}
.preloader-bar-fill{
  height:100%; width:0%;
  background:var(--accent);
  transition:width .2s ease;
}
.preloader-percent{
  margin-top:10px; font-size:12px; color:var(--muted);
  letter-spacing:.04em;
}
/* --- header --- */
[data-theme="light"] .c-menu__link {
        color: #000;
    }

/* ---------- базова сцена ---------- */
.scene{
  position:fixed; inset:0;
  display:flex; align-items:flex-end; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity .4s ease;
  max-width: 2500px;
    margin-left: auto;
    margin-right: auto;
}
.scene.active{ opacity:1; pointer-events:auto; }

.scene-video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
}

.scene-content {
    position: absolute;
    z-index: 2;
    /* padding: 0 6vw 80px 6vw; */
    text-align: center;
    width: 100%;
    margin: 0px auto;
    max-width: 800px;
    font-size: clamp(18px,3.6vw,26px);
    font-weight: 600;
    padding: 20px 20px;
/*top: 50%;*/
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
	background: rgba(0, 0, 0, .5);
    border-radius: 12px;
    border: 1px solid var(--accent);
	bottom: 120px;
}
.scene-caption{
  font-size:clamp(18px,3.6vw,26px);
  font-weight:600;
  max-width:640px;
  margin:0 auto;
  line-height:1.35;
  text-shadow:0 2px 12px rgba(0,0,0,.6);
  transition:opacity .5s ease;
}
.scene-caption.small{ font-size:clamp(16px,2.6vw,22px); }

.tap-hint {
    bottom: 100px;
    left: auto;
    right: auto;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    z-index: 2;
    transition: opacity .25s ease;
    margin: auto;
	display: inline-block;
}

.global-controls{
  position:fixed; bottom:120px; right:16px; z-index:50;
  display:flex; flex-direction:column; align-items:center; gap:10px;
}
.icon-btn{
  position:relative;
  width:40px; height:40px; border-radius:50%;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(20,33,44,.6);
  color:var(--text);
  font-size:16px;
  cursor:pointer;
}
.icon-btn::after{
  content:attr(data-tooltip);
  position:absolute; right:calc(100% + 10px); top:50%;
  transform:translateY(-50%) translateX(4px);
  white-space:nowrap;
  background:rgba(20,33,44,.92);
  border:1px solid rgba(255,255,255,.15);
  color:var(--text);
  font-size:12px;
  padding:6px 12px;
  border-radius:20px;
  opacity:0; pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.icon-btn:hover::after,
.icon-btn:focus-visible::after{
  opacity:1;
  transform:translateY(-50%) translateX(0);
}

.c-header__logo picture>img {
    object-fit: contain!important;
}
.c-header__body {
    height: 60px!important;
}
/* ---------- плашка з логотипами партнерів (сцени 5-6) ---------- */
.partners-bar{
  position:fixed; top:60px; left:0; right:0; z-index:9;
  background:#fff;
  padding:10px;
  box-sizing:border-box;
  text-align:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .4s ease;
}
.partners-bar.show{ opacity:1; }
.partners-bar img{ display:inline-block; max-width:100%; height:auto; }

/* стан "обробляється клік" на сцені 1 */
.scene1--pending .scene-content,
.scene1--pending .tap-hint{
  opacity:0;
}
.scene1--pending{ cursor:wait; }
.scene1--pending .spotlight-overlay{
  background:rgba(10,16,22,.85);
  transition:background 1.2s ease;
}
.scene1--pending .spotlight-overlay{
  opacity:0;
  transition:opacity .3s ease;
}

/* ---------- сцена 1: спотлайт ---------- */
.spotlight-overlay{
  position:absolute; inset:0; z-index:1;
  background:rgba(10,16,22,.25);
  -webkit-mask:radial-gradient(circle 160px at var(--mx,50%) var(--my,50%), transparent 45%, black 80%);
          mask:radial-gradient(circle 160px at var(--mx,50%) var(--my,50%), transparent 45%, black 80%);
  pointer-events:none;
}

/* ---------- сцена 3 ---------- */
.scene--interactive{ align-items:stretch; flex-direction:column; }
.scene3-bg{
  position:relative; flex:1;
  background-size:cover; background-position:center;
  overflow:hidden;
}
  #scene3 {
    background: #ccc;
    background: url(../assets/img/bg3.jpg) no-repeat center;
    background-size: cover;
}

.scene3-platform{
  position:absolute; left:0; right:0; bottom:0;
  width:100%; height:33%;
  background-image:url('../assets/img/receipt.jpg');
  background-size:cover;
  background-position:top center;
  background-repeat:no-repeat;
}

.scene3-intro{
  position:absolute; top:40px; left:0; right:0; z-index:6;
  margin:0; padding:5vh 6vw 0;
  text-align:center;
  font-size:clamp(18px,3.4vw,26px);
  font-weight:600;
  text-shadow:0 2px 12px rgba(0,0,0,.6);
  opacity:0; pointer-events:none;
  transition:opacity .6s ease;
  background: rgba(45, 70, 88, 0.84);
}
.items-layer{ position:absolute; inset:0; }
.scene-item{
  position:absolute;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:transform .2s ease, filter .2s ease, left .35s ease, top .35s ease, width .35s ease;
  touch-action:manipulation;
}
.scene-item img{ width:100%; display:block; pointer-events:none; user-select:none; }
.scene-item.product:hover{ transform:scale(1.06); }
.scene-item.product.collected{
  transform:scale(.2) translateY(-40px);
  opacity:0;
  pointer-events:none;
}
.scene3-dim{
  position:absolute; inset:0; z-index:15;
  background:#000; opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}
.scene3-dim.show{ opacity:.6; pointer-events:auto; }

.scene-item.phrase{ position:absolute; }
.scene-item.phrase img {
  transform: scale(1);
  transition:transform .2s ease, filter .2s ease, left .35s ease, top .35s ease, width .35s ease;
}
.scene-item.phrase:hover img {
  transform: scale(1.06);
}


.scene-item.phrase.highlight{
  left:50% !important; top:42% !important;
  width:360px !important; max-width:90vw;
  transform:translate(-50%,-50%);
  z-index:20;
  filter:drop-shadow(0 12px 34px rgba(0,0,0,.55));
}
.scene-item.phrase.removed{
  transform:scale(.3) rotate(12deg);
  opacity:0;
  pointer-events:none;
}

.bag-indicator{
  position:absolute; top:146px; right:16px; z-index:6;
  display:flex; align-items:center; gap:8px;
  font-size:14px;
}
.cart-toasts{
  position:absolute; right:100%; top:0; bottom:0;
  margin-right:12px;
  display:flex; flex-direction:column-reverse;
  justify-content:center;
  align-items:flex-end;
  gap:6px;
  pointer-events:none;
}
.cart-toast{
  background:var(--card-hover);
  border:1px solid var(--accent);
  border-radius:10px;
  padding:6px 12px;
  max-width:190px;
  font-size:13px; line-height:1.35;
  color:var(--text);
  white-space:nowrap;
  opacity:0;
  transform:translateX(10px) scale(.95);
  transition:opacity .3s ease, transform .3s ease;
}
.cart-toast.show{ opacity:1; transform:translateX(0) scale(1); }
.bag-visual{ position:relative; width:120px; height:154px; }
.bag-layer{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  pointer-events:none;
}
.bag-back{ z-index:1; }
.bag-items{ position:absolute; inset:0; z-index:2; }
.bag-front{ z-index:5; }
.bag-count{ display:none; }

.bag-item{
  position:absolute;
  width:46%;
  opacity:0;
  transform:scale(.4) translateY(14px) rotate(0deg);
  transition:opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
  pointer-events:none;
}
.bag-item.show{ opacity:1; transform:scale(1) translateY(0) rotate(var(--r,0deg)); }

.bag-item[data-bag-id="bread"]     { left:6%;  top:-6%;  width:52%; --r:-6deg;  z-index:3; }
.bag-item[data-bag-id="milk"]      { left:38%; top:-12%; width:34%; --r:4deg;   z-index:4; }
.bag-item[data-bag-id="cheese"]    { left:14%; top:-2%;  width:34%; --r:8deg;   z-index:2; }
.bag-item[data-bag-id="buckwheat"] { left:48%; top:2%;   width:30%; --r:-4deg;  z-index:2; }
.bag-item[data-bag-id="apple1"]    { left:60%; top:-8%;  width:28%; --r:10deg;  z-index:3; }
.bag-item[data-bag-id="pepper"]    { 
left: 3%;
    top: 1%;
    width: 33%;
    --r: -10deg;
    z-index: 1;
}

.flying-product{
  position:fixed; z-index:200;
  pointer-events:none;
  transition:left .5s cubic-bezier(.3,.6,.3,1), top .5s cubic-bezier(.3,.6,.3,1), width .5s ease, opacity .5s ease;
}

.scene3-panel{
  position:relative; z-index:6;
  background:var(--bg-deep);
  padding:18px 5vw 26px;
  text-align:center;
  border-top:1px solid rgba(255,255,255,.06);
}
.descriptor-box{
  /* спливаюча картка під збільшеною фразою (.scene-item.phrase.highlight), а не в потоці панелі */
  position:absolute;
  left:50%; top:54%;
  transform:translate(-50%,0) scale(.92);
  width:min(90vw,420px);
  background:var(--card-hover);
  border:1px solid var(--accent);
  border-radius:14px;
  padding:14px 18px;
  text-align:center;
  font-size:14px; line-height:1.5;
  z-index:21;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
}
.descriptor-box.show{
  opacity:1;
  transform:translate(-50%,0) scale(1);
  pointer-events:auto;
}
.progress{ margin-top:12px; font-size:13px; color:var(--muted); }



[data-id="milk"] {
    width: 10%;
    max-width: 100px;
    left: 37%;
    top: 51%;
}
[data-id="bread"] {
    width: 31%;
    max-width: 340px;
    top: 66%;
    left: 10%;
}
[data-id="buckwheat"] {
    left: 55%;
    top: 55%;
    width: 14%;
    max-width: 200px;
}
[data-id="apple1"] {
    width: 31%;
    max-width: 340px;
    top: auto;
    bottom: 10%;
}
[data-id="pepper"] {
  left: 50%;
  top: 73%;
  width: 12%;
  max-width: 175px;
      z-index: 3;
}
[data-id="cheese"] {
    left: 30%;
    top: 70%;
    width: 13%;
    max-width: 190px;
    z-index: 3;
}
[data-id="apple1"] {
  left: 63%;
    top: 74%;
    width: 11%;
    max-width: 135px; 
}
[data-id="phrase1"] {
    left: 8%;
    top: 69%;
    width: 21%;
    max-width: 300px;
    transform: rotate(10deg);
}
[data-id="phrase2"] {
  left: 28%;
    top: 58%;
    width: 22%;
    max-width: 300px;
    transform: rotate(-8deg); 
}
[data-id="phrase3"] {
  left: 41%;
    top: 71%;
    width: 22%;
    max-width: 300px;
    transform: rotate(-5deg);
}
[data-id="phrase4"] {
  left: 55%;
    top: 61%;
    width: 22%;
    max-width: 300px;
    transform: rotate(5deg);
}



/* ---------- сцена 5 (фінал) ---------- */
.scene5-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  background-size:cover;
  background-position:center;
}
.receipt-wrap{
  position:absolute; inset:0; z-index:2;
  display:flex; align-items:flex-end; justify-content:center;
  padding:16px 16px 0px;
  box-sizing:border-box;
  pointer-events:none;
}
.hand-card{
  position:relative;
  display:inline-block;
  transform:translateY(60px);
  opacity:0;
  transition:transform .8s cubic-bezier(.2,.9,.3,1), opacity .5s ease;
}
.hand-card.show{ transform:translateY(0); opacity:1; }

.hand-card a{
  display:block;
  pointer-events:none;
}
/* pointer-events вмикаємо лише коли сцена 5 реально активна — інакше невидима картка
   (лежить під усіма іншими сценами) перехоплює кліки по сценах 1-4 */
#scene5.active .hand-card a{ pointer-events: auto; }

.hand-image{
  display:block;
  max-height: calc(90vh - 100px);
  max-width: 90vw;
  width:auto;
  height:auto;
}

/* ---------- сцена 6 (інфо) ---------- */
.scene--info{ align-items:stretch; }

.info-content{
  position:relative; z-index:2;
  width:100%; height:100%;
  box-sizing:border-box;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-around;
  gap:24px;
  text-align:center;
  padding:calc(60px + var(--partners-h, 65px) + 24px) 6vw 40px;
}

.info-lead {
    margin: 0;
    max-width: 720px;
    font-size: clamp(18px, 3.2vw, 20px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
}
.info-hotline {
    text-transform: uppercase;
    font-size: 1.1em;
    font-weight: bold;
    font-size: clamp(18px, 3.2vw, 20px);
}

.info-hotline p{ margin:0 0 8px; }
.info-number {
    color: var(--accent);
    font-size: 2.5em;
    font-weight: 800;
    letter-spacing: .02em;
    display: block;
}

.info-extra{ margin:0; }
.info-extra a{
  color:var(--accent);
  border-bottom:2px dashed;
}

.info-disclaimer{
  max-width:640px;
  margin:0;
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
}

.btn--restart-info{
  background:var(--accent); color:#1c1006;
}

/* ---------- кнопки ---------- */
.btn{
  border:none; border-radius:30px;
  font-size:14px; font-weight:600;
  padding:10px 22px;
  cursor:pointer;
}
.btn--remove{
  margin-top:10px;
  background:var(--accent); color:#1c1006;
}
.global-restart{ font-size:18px; }

/* ---------- мобільна адаптація ---------- */
@media (max-width:600px){
      .scene3-panel {
        padding: 4px 4vw 60px;
    }
  .descriptor-box{ font-size:13px; }
  .cart-toast{ max-width:38vw; white-space:normal; font-size:12px; padding:5px 10px; }
  .scene-content {
    top: 40%;
    max-width: 90vw;
	}
}

@media (orientation: portrait) {
  .scene3-platform {
      height: 43%;
    }
    [data-id="apple1"] {
      width: 21%;
      left: 70%;
  }
  [data-id="pepper"] {

    width: 21%;

}
[data-id="phrase1"], 
[data-id="phrase2"], 
[data-id="phrase3"], 
[data-id="phrase4"] {

    width: 32%;
}
[data-id="buckwheat"] {
    left: 75%;
    width: 19%;
    top: 60%;
}
[data-id="cheese"] {
    left: 20%;
    top: 75%;
    width: 23%;
}
[data-id="bread"] {
    width: 41%;
    top: 61%;
    left: 4%;
}
[data-id="milk"] {
    width: 13%;
}
}
@media (min-width: 1280px) {
    .c-header__body {
        height: 60px!important;
    }
    .c-header__logo picture {
        width: 71px!important;
    }
}