/* The Impossible Shop v2 (bakery / salon / kirana), as the homepage hero (scoped copy of lab/shop/shop-v1.css stage + site rules). */
:root { --sign-x: .276; --sign-y: .210; --sign-w: .443; --sign-h: .148; --door-x: .321; --door-y: .407; --door-w: .352; --door-h: .407; }
/* ---------- the stage ---------- */
.ishop { --vw: 1; --vx: 0; --vy: 0; position: relative; margin: 18px auto 0; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 22px; background: #000; container-type: size; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ishop__world { position: absolute; width: calc(100% / var(--vw)); aspect-ratio: 16 / 9; left: calc(var(--vx) * -100% / var(--vw)); top: var(--vy); container-type: size; transform-origin: 50% 60%; }
.ishop__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ishop__inside, .ishop__door { position: absolute; left: calc(var(--door-x) * 100%); top: calc(var(--door-y) * 100%); width: calc(var(--door-w) * 100%); height: calc(var(--door-h) * 100%); overflow: hidden; }
.ishop__inside img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ishop__glow { position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 40%, rgba(255, 196, 120, .25), transparent 70%); mix-blend-mode: screen; }
/* the shutter is a crop of the closed photo, so it matches the shop exactly */
.ishop__shutter { position: absolute; inset: 0; cursor: grab; background-image: var(--closed, url("/assets/shop/bakery-closed.webp"));
  background-size: calc(100% / var(--door-w)) calc(100% / var(--door-h));
  background-position: calc(var(--door-x) / (1 - var(--door-w)) * 100%) calc(var(--door-y) / (1 - var(--door-h)) * 100%);
  transform: translateY(calc(var(--lift, 0) * -100%)); box-shadow: 0 10px 20px rgba(0, 0, 0, .55); will-change: transform; }
.ishop[data-state=dragging] .ishop__shutter { cursor: grabbing; }
.ishop__roll { position: absolute; left: 0; right: 0; bottom: -3%; height: 4%; background: linear-gradient(#6b6258, #2b2622); border-radius: 0 0 4px 4px; }
.ishop__sign { position: absolute; left: calc(var(--sign-x) * 100%); top: calc(var(--sign-y) * 100%); width: calc(var(--sign-w) * 100%); height: calc(var(--sign-h) * 100%); display: grid; place-items: center; padding: 0 3%; text-align: center;
  font: 600 6.4cqh/1 var(--display); letter-spacing: -.01em; color: #f6e7c8; text-shadow: 0 .3cqh 0 rgba(60, 10, 10, .7), 0 0 2cqh rgba(255, 200, 140, .35); white-space: nowrap; overflow: hidden; }
.ishop__hint { position: absolute; left: 50%; top: calc((var(--door-y) + var(--door-h)) * 100% - 13%); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 1cqh; padding: 1.2cqh 2.4cqh; border-radius: 999px; background: rgba(5, 4, 5, .78); color: #fff; font: 700 2.5cqh/1 var(--body); pointer-events: none; white-space: nowrap; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); transition: opacity .3s; }
.ishop__arrow { width: 1.6cqh; height: 1.6cqh; border-left: .35cqh solid var(--red); border-top: .35cqh solid var(--red); transform: rotate(45deg) translate(.3cqh, .3cqh); animation: nudge 1.4s var(--ease) infinite; }
@keyframes nudge { 50% { translate: 0 -.8cqh; } }
.ishop:not([data-state=shut]) .ishop__hint { opacity: 0; }
.ishop__open { position: absolute; right: 2%; bottom: 3%; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font: 600 13px var(--body); cursor: pointer; backdrop-filter: blur(6px); }
.ishop:not([data-state=shut]) .ishop__open { opacity: 0; pointer-events: none; }

/* ---------- the website it becomes ---------- */
.site { position: absolute; z-index: 1; inset: 4.5cqh 4cqw; display: grid; grid-template-columns: 1.05fr 1fr .62fr; grid-template-rows: auto auto 1fr auto; gap: 1.6cqh 1.4cqw; padding: 0 1.4cqw 1.6cqh; pointer-events: none; color: #2a2420; font-size: 2.1cqh; }
.site::before { content: ""; position: absolute; inset: 0; border-radius: 1.8cqh; background: #fbf6ef; box-shadow: 0 4cqh 10cqh rgba(0, 0, 0, .6); opacity: 0; transition: opacity .7s .5s; z-index: -1; }
.ishop[data-state=site] .site::before { opacity: 1; }
.site__chrome { grid-column: 1 / -1; display: flex; align-items: center; gap: .9cqh; height: 4.6cqh; margin: 0 -1.4cqw; padding: 0 1.6cqw; border-bottom: 1px solid rgba(42, 36, 32, .1); opacity: 0; transition: opacity .6s .6s; }
.ishop[data-state=site] .site__chrome { opacity: 1; }
.site__chrome i { width: 1.3cqh; height: 1.3cqh; border-radius: 50%; background: #ddd2c6; }
.site__url { margin-left: 1.4cqh; padding: .4cqh 1.8cqh; border-radius: 999px; background: #efe6da; color: #7a6d62; font-size: 1.7cqh; }
.piece { position: relative; border-radius: 1.4cqh; transform-origin: 0 0; opacity: 0; }
.ishop[data-state=site] .piece, .ishop[data-state=flying] .piece { opacity: 1; }
.piece__skin { position: absolute; inset: 0; border-radius: inherit; background-repeat: no-repeat; opacity: 0; z-index: 2; }
.piece__body { position: relative; height: 100%; }
.site__head { grid-column: 1 / -1; background: var(--brand, #b3242f); color: #fff6ea; }
.site__headin { display: flex; align-items: center; gap: 1.4cqh; padding: 1.3cqh 1.8cqh; font-size: 2.2cqh; }
.site__logo { display: grid; place-items: center; width: 4cqh; height: 4cqh; border-radius: 50%; background: #fff6ea; color: var(--brand, #b3242f); font-family: var(--display); }
.site__headin > b:nth-child(2) { font: 600 2.6cqh var(--display); }
.site__headin nav { display: flex; gap: 2.4cqh; margin-left: auto; font-size: 1.9cqh; opacity: .9; }
.site__btn { display: inline-flex; align-items: center; min-height: 4.4cqh; padding: 0 2cqh; border-radius: 999px; background: #2a2420; color: #fff; font-weight: 700; font-size: 1.8cqh; white-space: nowrap; }
.site__headin .site__btn { background: #fff6ea; color: var(--brand, #b3242f); }
.site__btn--wa { background: #1f9d55; }
.site__hero { grid-row: 3 / 5; padding: 3cqh 2.4cqh; background: #f1e6d6; display: flex; }
.site__hero .piece__body { display: flex; flex-direction: column; justify-content: center; gap: 1.8cqh; }
.site__hero h2 { font-size: 4.6cqh; line-height: 1.08; color: #2a2420; }
.site__hero .site__btn { align-self: flex-start; }
.site__kicker { font-size: 1.6cqh; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand, #b3242f); }
.site__gallery { grid-column: 2 / 4; grid-row: 3; }
.site__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1cqw; height: 100%; }
.site__grid figure { margin: 0; position: relative; border-radius: 1.2cqh; overflow: hidden; min-height: 0; }
.site__grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site__grid figcaption { position: absolute; left: 1cqh; bottom: 1cqh; padding: .4cqh 1.2cqh; border-radius: 999px; background: rgba(251, 246, 239, .92); font-size: 1.6cqh; font-weight: 700; }
.site__book { grid-column: 2; grid-row: 4; padding: 2cqh; background: #fff; box-shadow: inset 0 0 0 1px rgba(42, 36, 32, .1); }
.site__book .piece__body { display: grid; gap: 1.2cqh; align-content: center; }
.site__chips { display: flex; flex-wrap: wrap; gap: .8cqh; }
.site__chips span { padding: .5cqh 1.4cqh; border-radius: 999px; background: #f1e6d6; font-size: 1.8cqh; font-weight: 500; }
.site__book .site__btn { justify-self: start; }
.site__visit { grid-column: 3; grid-row: 4; padding: 2cqh; background: #2a2420; color: #fbf6ef; }
.site__visit .piece__body { display: grid; gap: .8cqh; align-content: center; font-size: 2cqh; line-height: 1.35; }
.site__visit .site__kicker { color: #f4a3a9; }

@media (max-width: 767px) {
  .ishop { --vw: .84; --vx: .08; aspect-ratio: 4 / 5; border-radius: 18px; }
  .ishop__world { top: 23%; }
  .ishop__sign { font-size: 6cqh; }
  .site { inset: 3cqh 3cqw; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto 1fr auto; gap: 1.2cqh 2cqw; padding: 0 2.4cqw 1.6cqh; font-size: 1.7cqh; }
  .site__chrome { height: 3.6cqh; }
  .site__headin { padding: 1cqh 1.4cqh; gap: 1cqh; }
  .site__headin nav { display: none; }
  .site__headin .site__btn { margin-left: auto; }
  .site__headin > b:nth-child(2) { font-size: 2.1cqh; }
  .site__hero { grid-column: 1 / -1; grid-row: 3; padding: 2cqh; }
  .site__hero h2 { font-size: 3.3cqh; }
  .site__gallery { grid-column: 1 / -1; grid-row: 4; }
  .site__book { grid-column: 1; grid-row: 5; padding: 1.4cqh; }
  .site__visit { grid-column: 2; grid-row: 5; padding: 1.4cqh; }
  .site__btn { min-height: 3.6cqh; padding: 0 1.4cqh; font-size: 1.5cqh; }
  .site__kicker { font-size: 1.3cqh; }
  .site__chips span { font-size: 1.4cqh; padding: .3cqh 1cqh; }
  .site__visit .piece__body { font-size: 1.6cqh; }
  .site__grid figcaption { font-size: 1.3cqh; }
}
.ishop__open { color: #fff; }
/* hero layout: copy on the left, the shop on the right; stacked on a phone */
.hero--shop { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(24px, 4vw, 64px); min-height: 100dvh; padding: 96px var(--pad) clamp(32px, 6vh, 64px); }
.hero--shop .hero__title { font-size: clamp(36px, 3.7vw, 62px); }
.hero--shop .hero__copy { max-width: 560px; }
.hero__stagewrap { min-width: 0; }
.hero--shop .ishop { margin: 0; width: min(100%, calc((100svh - 220px) * 16 / 9)); margin-left: auto; }
.hero__shopbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.hero__shopbar input { min-height: 42px; width: min(230px, 60vw); padding: 0 14px; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--ink); font: 500 15px var(--body); box-shadow: inset 0 0 0 1px var(--line); }
.hero__shopbar .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
@media (max-width: 1023px) {
  .hero--shop { grid-template-columns: 1fr; align-content: start; padding-top: 88px; gap: 22px; }
  .hero--shop .ishop { margin: 0 auto; width: 100%; }
  .hero__shopbar { justify-content: flex-start; }
}
@media (max-width: 767px) {
  .hero--shop .ishop { aspect-ratio: 4 / 5; }
  .hero--shop .ishop__world { top: 23%; }
  .hero__shopbar label { flex: 1 1 100%; }
  .hero__shopbar input { width: 100%; }
}

/* ---------- v2: the street comes alive, three shop types ---------- */
.ishop__alive { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc((var(--door-x) - .03) * 100%), transparent calc((var(--door-x) - .004) * 100%), transparent calc((var(--door-x) + var(--door-w) + .004) * 100%), #000 calc((var(--door-x) + var(--door-w) + .03) * 100%));
          mask-image: linear-gradient(90deg, #000 calc((var(--door-x) - .03) * 100%), transparent calc((var(--door-x) - .004) * 100%), transparent calc((var(--door-x) + var(--door-w) + .004) * 100%), #000 calc((var(--door-x) + var(--door-w) + .03) * 100%)); }
.ishop[data-state=opening] .ishop__alive, .ishop[data-state=flying] .ishop__alive, .ishop[data-state=site] .ishop__alive { opacity: 1; }
.ishop[data-type=salon] .ishop__sign { color: #6b2a43; text-shadow: 0 .2cqh 0 rgba(255, 255, 255, .45); font-weight: 600; }
.ishop[data-type=kirana] .ishop__sign { color: #1b4a2b; text-shadow: 0 .2cqh 0 rgba(255, 240, 160, .6); font-weight: 700; letter-spacing: .01em; }
.shoptypes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2, #161213); box-shadow: inset 0 0 0 1px var(--line, rgba(242, 236, 233, .14)); }
.shoptypes button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted, #a39693); font: 600 14px var(--body, system-ui); cursor: pointer; transition: background .2s, color .2s; }
.shoptypes button[aria-pressed=true] { background: var(--red-strong, #c72c3b); color: #fff; }
.shoptypes button:hover:not([aria-pressed=true]) { color: var(--ink, #f2ece9); }
.hero__shoptop { display: flex; justify-content: flex-end; margin-bottom: 12px; }
@media (max-width: 1023px) { .hero__shoptop { justify-content: flex-start; } }
@media (max-width: 420px) { .shoptypes { width: 100%; } .shoptypes button { flex: 1; padding: 0 8px; } }
/* phone: the frame is taller than the street photo, so fill the bands with a dark blurred copy of it */
@media (max-width: 767px) {
  .ishop::before { content: ""; position: absolute; inset: -12%; background: var(--closed, url("/assets/shop/bakery-closed.webp")) center / cover no-repeat; filter: blur(22px) brightness(.4) saturate(1.2); }
  .ishop[data-state=site]::before, .ishop[data-state=flying]::before { opacity: .35; transition: opacity .8s; }
}
@media (max-width: 767px) { .ishop__world { -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); } }

/* v3 (18 Oct): no black frame around the finished website. The stage turns light, the shop fades out,
   and the website fills the frame with a slim margin. */
.ishop { transition: background-color .7s ease, box-shadow .7s ease; }
.ishop[data-state=flying], .ishop[data-state=site] { background-color: #efe8df; box-shadow: inset 0 0 0 1px rgba(26, 22, 21, .1); }
.site { inset: 1.6cqh 1.4cqw; }
.ishop[data-state=flying]::before, .ishop[data-state=site]::before { opacity: 0; }
@media (max-width: 767px) { .site { inset: 1.4cqh 2cqw; } }
