/* ============================================================
   TINY WORLD — home: the cinematic 3D journey
   ============================================================ */

body.home { background: #2A1A5E; color: #fff; }
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: pan-y; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 55%, rgba(26,16,51,.45) 100%);
}
.scroller { position: relative; pointer-events: none; }

/* nav waits for the film to start */
.home .nav { opacity: 0; transform: translateY(-20px); transition: opacity .8s .9s, transform .8s .9s var(--spring); }
.home.entered .nav { opacity: 1; transform: none; }
.home .footer { display: none; }

/* ---------- letterbox ---------- */
.bars i {
  position: fixed; inset-inline: 0; z-index: 125; height: 11vh; background: #07040F;
  transition: height 2.2s cubic-bezier(.7, 0, .2, 1) .3s;
}
.bars i:first-child { top: 0; }
.bars i:last-child { bottom: 0; }
.bars.open i { height: 0; }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; text-align: center;
  padding: calc(11vh + 14px) 20px; /* content always sits between the letterbox bars */
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(26,16,51,.25), rgba(26,16,51,.75)),
    linear-gradient(180deg, rgba(26,16,51,.5), transparent 40%, rgba(26,16,51,.6));
  transition: opacity 1.4s ease, transform 2s var(--ease), filter 1.4s;
}
.intro.gone { opacity: 0; transform: scale(1.25); filter: blur(10px); pointer-events: none; }
.intro__in { display: grid; justify-items: center; gap: clamp(6px, 1.8vh, 18px); }
.intro__studio {
  font-size: 18px; letter-spacing: .08em; color: rgba(255,255,255,.75);
  opacity: 0; animation: fadein 1.2s .4s forwards;
}
.intro__studio b { font-weight: 800; color: var(--sun); direction: ltr; display: inline-block; }
.intro__title {
  margin: 0; font-weight: 800; line-height: 1.02;
  font-size: clamp(40px, min(9vw, 11.5vh), 132px); /* scales with height too, so short laptop screens fit */
  text-shadow: 0 8px 0 rgba(26,16,51,.35);
  opacity: 0; animation: titleIn 1.6s 1.1s var(--spring) forwards;
}
.intro__title span {
  background: linear-gradient(90deg, var(--sun), var(--pink), var(--lilac), var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 rgba(26,16,51,.35));
  text-shadow: none;
}
@keyframes titleIn { from { opacity: 0; transform: scale(.6) rotate(-4deg); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadein { to { opacity: 1; } }
.intro__load { width: 220px; height: 8px; border-radius: 9px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 10px; transition: opacity .5s; }
.intro__load i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--pink)); border-radius: 9px; transition: width .4s; }
.intro.ready .intro__load { opacity: 0; height: 0; margin: 0; }

.ticket {
  position: relative; display: flex; align-items: stretch;
  height: 84px; border-radius: 18px;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.35)) drop-shadow(0 20px 30px rgba(0,0,0,.35));
  opacity: 0; transform: translateY(30px) scale(.8);
  transition: opacity .8s, transform .9s var(--spring);
  pointer-events: none;
}
.intro.ready .ticket { opacity: 1; transform: none; pointer-events: auto; animation: wiggle 3.5s 1.2s ease-in-out infinite; }
.ticket__main {
  display: grid; place-items: center; padding: 0 34px;
  background: var(--sun); color: var(--ink);
  font-size: 28px; font-weight: 800;
  border-radius: 18px 0 0 18px;
  -webkit-mask: radial-gradient(circle 12px at 100% 50%, transparent 98%, #000);
  mask: radial-gradient(circle 12px at 100% 50%, transparent 98%, #000);
}
.ticket__stub {
  display: grid; place-items: center; padding: 0 18px;
  background: var(--tomato); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; direction: ltr;
  border-radius: 0 18px 18px 0;
  border-inline-end: 3px dashed rgba(255,255,255,.6);
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000);
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000);
}
html[dir="rtl"] .ticket__main { border-radius: 0 18px 18px 0; -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000); mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000); }
html[dir="rtl"] .ticket__stub { border-radius: 18px 0 0 18px; border-inline-end: 0; border-inline-start: 3px dashed rgba(255,255,255,.6); -webkit-mask: radial-gradient(circle 12px at 100% 50%, transparent 98%, #000); mask: radial-gradient(circle 12px at 100% 50%, transparent 98%, #000); }
.ticket:hover { animation-play-state: paused; transform: scale(1.06) rotate(-2deg); }
.ticket:active { transform: scale(.96); }
@keyframes wiggle { 0%, 86%, 100% { transform: none; } 89% { transform: rotate(-4deg) scale(1.04); } 92% { transform: rotate(4deg) scale(1.04); } 95% { transform: rotate(-2deg); } }
.intro__quiet { color: rgba(255,255,255,.7); font-size: 15px; text-decoration: underline; opacity: 0; transition: opacity .6s .4s; }
.intro.ready .intro__quiet { opacity: 1; }
.intro__hint { margin: 0; font-size: 14px; color: rgba(255,255,255,.55); opacity: 0; transition: opacity .6s .6s; }
.intro.ready .intro__hint { opacity: 1; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.chap { position: absolute; visibility: hidden; opacity: 0; will-change: opacity, transform; }
.chap.live { pointer-events: auto; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--ink);
  padding: 4px 14px; border-radius: 99px;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 0 rgba(26,16,51,.18);
}

/* hero */
.chap--hero { inset: 11vh 20px 4vh; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.chap--hero .top, .chap--hero .bottom { display: grid; justify-items: center; gap: 4px; }
.hero-word {
  margin: 6px 0 0; direction: ltr; white-space: nowrap;
  font-size: clamp(64px, 13vw, 190px); font-weight: 800; line-height: 1;
  letter-spacing: -.02em;
}
.hero-word span {
  display: inline-block; color: var(--c);
  -webkit-text-stroke: 4px #fff; paint-order: stroke fill;
  text-shadow: 0 10px 0 rgba(26,16,51,.28);
  animation: hop 2.4s var(--d) ease-in-out infinite;
}
.hero-word .sp { display: inline-block; width: .28em; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-.12em) rotate(-4deg); } }
.chap--hero p { font-size: clamp(18px, 2vw, 24px); font-weight: 600; margin: 8px 0 0; text-shadow: 0 2px 12px rgba(26,16,51,.6); max-width: 560px; }
.cue { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-shadow: 0 2px 10px rgba(26,16,51,.6); }
.mouse { width: 24px; height: 38px; border: 3px solid #fff; border-radius: 14px; position: relative; }
.mouse::after { content: ''; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(12px); } }

/* world chapters */
.chap--world {
  bottom: 4vh; inset-inline-start: var(--gutter);
  width: min(430px, calc(100vw - 2 * var(--gutter)));
  background: var(--cream); color: var(--ink);
  border-radius: 30px; padding: 22px 24px 18px;
  box-shadow: 0 10px 0 rgba(26,16,51,.25), 0 30px 60px -20px rgba(26,16,51,.6);
  border: 4px solid #fff;
}
.chap--world .tag { background: var(--tone); color: #fff; box-shadow: none; }
.chap--world h2 { font-size: clamp(32px, 3.4vw, 46px); font-weight: 800; line-height: 1.1; margin: 10px 0 4px; }
.chap--world p { margin: 0 0 14px; color: var(--ink-2); font-weight: 500; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  background: var(--soft); border-radius: 99px; padding: 5px 6px 5px 14px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .3s var(--spring), background .2s;
}
html[dir="rtl"] .chip { padding: 5px 5px 5px 14px; }
.chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; }
.chip b { background: #fff; border-radius: 99px; padding: 1px 10px; font-size: 13px; }
.chip:hover { transform: translateY(-3px) rotate(-1.5deg); background: #fff; }
.chap--world .hint { display: block; margin-top: 8px; color: var(--ink-3); font-size: 13px; font-weight: 600; }

/* promise */
.chap--promise { inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 0 20px; }
.chap--promise h2, .chap--end h2 { margin: 0; font-size: clamp(44px, 6vw, 88px); font-weight: 800; line-height: 1.05; text-shadow: 0 8px 0 rgba(26,16,51,.3); }
.bubbles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.bubble {
  width: clamp(150px, 15vw, 200px); aspect-ratio: 1; border-radius: 50%;
  background: var(--c); color: var(--ink);
  display: grid; place-content: center; justify-items: center; padding: 18px; gap: 2px;
  font-weight: 800; font-size: 19px; line-height: 1.2;
  box-shadow: inset 0 -12px 0 rgba(0,0,0,.12), inset 0 10px 20px rgba(255,255,255,.45), 0 12px 0 rgba(26,16,51,.25);
  animation: floaty 4s ease-in-out infinite;
}
.bubble:nth-child(2) { animation-delay: -1s; } .bubble:nth-child(3) { animation-delay: -2s; } .bubble:nth-child(4) { animation-delay: -3s; }
.bubble b { font-size: 38px; }
.bubble small { font-size: 13px; font-weight: 600; opacity: .8; }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(3deg); } }

/* end */
.chap--end { inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: 0 20px; }
.chap--end h2 span { background: linear-gradient(90deg, var(--sun), var(--tomato)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 8px 0 rgba(26,16,51,.3)); }
.end__ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.end__small { font-size: 13px; opacity: .7; margin-top: 20px; }

/* rail */
.rail { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; pointer-events: auto; opacity: 0; transition: opacity .8s 1.5s; }
.entered .rail { opacity: 1; }
.rail button { width: 14px; height: 14px; border-radius: 9px; background: rgba(255,255,255,.45); position: relative; transition: height .5s var(--spring), background .3s; }
.rail button.on { height: 38px; background: var(--sun); box-shadow: 0 3px 0 rgba(26,16,51,.25); }
.rail span {
  position: absolute; left: 26px; top: 50%; transform: translate(-6px, -50%);
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  padding: 2px 10px; border-radius: 99px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--spring);
}
.rail button:hover span { opacity: 1; transform: translate(0, -50%); }

/* ---------- product scene card ---------- */
.modal {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center; padding: 20px;
  background: rgba(26,16,51,.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.modal.on { opacity: 1; pointer-events: auto; }
.modal__card {
  position: relative;
  width: min(1040px, 100%); max-height: calc(100svh - 40px); overflow-y: auto;
  background: var(--cream); color: var(--ink);
  border-radius: 36px; border: 5px solid #fff;
  box-shadow: 0 14px 0 rgba(26,16,51,.35), 0 50px 100px -30px rgba(0,0,0,.6);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px; padding: 26px;
  transform: scale(.7) rotate(-5deg) translateY(60px);
  transition: transform .7s var(--spring);
}
.modal.on .modal__card { transform: none; }
.modal__x { position: absolute; top: 16px; left: 16px; z-index: 3; box-shadow: 0 4px 0 rgba(26,16,51,.15); }
.modal__stage { position: relative; aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: var(--soft); }
.modal__stage img { width: 100%; height: 100%; object-fit: cover; }
.burst {
  position: absolute; z-index: 2; top: 14px; right: 14px;
  width: 84px; height: 84px; display: grid; place-items: center;
  background: var(--sun); color: var(--ink); font-weight: 800; font-size: 22px;
  clip-path: polygon(50% 0%, 61% 13%, 79% 9%, 82% 27%, 98% 35%, 89% 50%, 98% 65%, 82% 73%, 79% 91%, 61% 87%, 50% 100%, 39% 87%, 21% 91%, 18% 73%, 2% 65%, 11% 50%, 2% 35%, 18% 27%, 21% 9%, 39% 13%);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.modal__thumbs button { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; opacity: .55; border: 3px solid transparent; transition: opacity .2s, border-color .2s, transform .3s var(--spring); }
.modal__thumbs button.on { opacity: 1; border-color: var(--tone); transform: translateY(-3px); }
.modal__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal__info { padding: 10px 4px 4px; display: flex; flex-direction: column; align-items: flex-start; }
.modal__info .tag { background: var(--tone); color: #fff; box-shadow: none; }
.modal__info h3 { font-size: clamp(36px, 4vw, 54px); font-weight: 800; line-height: 1.05; margin: 12px 0 4px; }
.modal__tagline { font-size: 20px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; }
.modal__info > .price { font-size: 38px; display: flex; align-items: baseline; gap: 10px; }
.modal__info > .price s { display: inline; font-size: 18px; }
.stickers { list-style: none; margin: 16px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stickers li {
  background: #fff; border-radius: 14px; padding: 6px 12px; font-size: 15px; font-weight: 600;
  box-shadow: 0 3px 0 rgba(26,16,51,.1); transform: rotate(var(--r));
}
.modal__buy { display: flex; gap: 10px; width: 100%; }
.modal__buy .btn { flex: 1; }
.qty--lg { height: 58px; border-radius: 18px; }
.qty--lg button { width: 46px; height: 58px; font-size: 22px; }
.qty--lg span { min-width: 26px; font-size: 20px; }
.modal__links { display: flex; align-items: center; gap: 16px; margin-top: 14px; width: 100%; }
.modal__links .btn { flex: 1; }
.more { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.modal__note { margin-top: 14px; color: var(--ink-3); font-weight: 600; }

/* ---------- map ---------- */
.map {
  position: fixed; inset: 0; z-index: 141;
  background: var(--cream); color: var(--ink);
  transform: translateY(105%); transition: transform .8s var(--spring);
  overflow-y: auto; border-radius: 40px 40px 0 0;
}
.map.on { transform: translateY(0); border-radius: 0; }
.map__head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); background: var(--sun); }
.map__head h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.map__body { padding: 20px var(--gutter) 80px; display: grid; gap: 40px; }
.map__world h3 { display: inline-block; font-size: 30px; font-weight: 800; margin: 10px 0 16px; background: var(--tone); color: #fff; padding: 2px 20px; border-radius: 99px; box-shadow: 0 5px 0 rgba(26,16,51,.18); }
.map__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.mcard { background: #fff; border-radius: 26px; padding: 12px; box-shadow: 0 6px 0 rgba(26,16,51,.08); transition: transform .4s var(--spring); }
.mcard:hover { transform: translateY(-6px) rotate(-1deg); }
.mcard__img { display: block; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--soft); }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.mcard:hover .mcard__img img { transform: scale(1.06); }
.mcard__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 4px 10px; }
.mcard__row h4 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.mcard__row .price { font-size: 19px; text-align: end; }
.mcard__add { width: 100%; height: 48px; font-size: 16px; --c2: #E6DDF2; box-shadow: 0 5px 0 var(--c2), inset 0 0 0 2px var(--line); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .bars i { height: 8vh; }
  .chap--hero { top: 12vh; bottom: 4vh; }
  .chap--world { bottom: 12px; inset-inline: 12px; width: auto; padding: 16px 18px 14px; border-radius: 24px; }
  .chap--world h2 { font-size: 28px; margin-top: 6px; }
  .chap--world p { font-size: 14px; margin-bottom: 10px; }
  .chap--world .hint { display: none; }
  .bubbles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bubble { width: 40vw; font-size: 16px; }
  .bubble b { font-size: 30px; }
  .rail { left: 8px; gap: 8px; }
  .rail button { width: 10px; height: 10px; }
  .rail button.on { height: 28px; }
  .modal { padding: 0; place-items: end center; }
  .modal__card { grid-template-columns: minmax(0, 1fr); border-radius: 30px 30px 0 0; max-height: 92svh; padding: 16px; gap: 14px; border-width: 4px 0 0; }
  .modal__buy { position: sticky; bottom: 0; background: var(--cream); padding: 10px 0; }
  .ticket__main { font-size: 22px; padding: 0 22px; }
  .ticket { height: 72px; }
}
.home .drawer { color: var(--ink); }

.home .brand { color: var(--ink); }

/* brand logo */
.intro__studio { display: flex; align-items: center; gap: 12px; }
.intro__studio img { height: clamp(48px, 10vh, 120px); width: auto; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.hero-word img {
  width: clamp(260px, 44vw, 640px); height: auto; margin: 0 auto;
  filter: drop-shadow(0 12px 0 rgba(26,16,51,.25)) drop-shadow(0 24px 40px rgba(26,16,51,.25));
  animation: logoHop 3.2s ease-in-out infinite;
}
@keyframes logoHop { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-14px) rotate(-2deg); } 60% { transform: translateY(0) rotate(1deg); } }

/* short screens (laptops): tighten the intro so the hint line stays above the bottom bar */
@media (max-height: 760px) {
  .ticket { height: 66px; }
  .ticket__main { font-size: 22px; padding: 0 24px; }
  .intro__hint, .intro__quiet { font-size: 13px; }
}
