/* =====================================================================================
   SHOP-INTERIOR HEROES (a preview, 26 Nov 2026). See street/shop-heroes.js, which holds the one switch.
   Every rule here starts with html.shop-hero-on or html.shop-walkin, which shop-heroes.js sets only when the
   switch is on and the page is in its list. With the switch off, nothing in this file applies.
   Wide screens: the inside of the shop fills the hero, and the words sit on a calm panel over it.
   Narrow screens (760 px and below): the inside of the shop is a band across the top, and the words sit
   below it on the hero's usual background, exactly as before.
   ===================================================================================== */

/* the picture, while it loads, shows the warm brown of the shop */
html.shop-hero-on .shop-hero-pic {
  display: block;
  max-width: none;
  background: #3a2519;
  object-fit: cover;
}

/* the small drawing at the side of some heroes (the Websites page's monitor) would float on the picture */
html.shop-hero-on .page-hero .svc-hero-icon { display: none; }

/* ---------- wide screens ---------- */
@media (min-width: 761px) {
  html.shop-hero-on .page-hero {
    --shop-left: max(40px, calc((100% - var(--max-w)) / 2 + 40px));
    min-height: 470px;
    padding: 64px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
  html.shop-hero-on .shop-hero-pic {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-position: 50% 72%;
    z-index: 0;
  }
  /* the words' panel: the hero's own blush colour, nearly solid, so the busy picture never shows through the words */
  html.shop-hero-on .page-hero .inner:not(.breadcrumbs) {
    position: relative; z-index: 1;
    width: fit-content;
    max-width: min(600px, calc(100% - 80px));
    margin-left: var(--shop-left);
    margin-right: auto;
    padding: 40px 44px 44px;
    background: rgba(251, 243, 241, 0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(233, 220, 216, 0.9);
    box-shadow: 0 18px 44px rgba(40, 22, 14, 0.28);
  }
  /* the small "Home > Services > Websites" line: a little strip of the same panel colour, just above the panel */
  html.shop-hero-on .page-hero .breadcrumbs {
    position: relative; z-index: 1;
    width: fit-content;
    margin: 0 0 10px var(--shop-left);
    padding: 7px 14px;
    background: rgba(251, 243, 241, 0.97);
    border: 1px solid rgba(233, 220, 216, 0.9);
  }
  html.shop-hero-on .page-hero .hero-sub { margin-bottom: 16px; }
  html.shop-hero-on .page-hero h1 { margin-bottom: 20px; }
  html.shop-hero-on[data-theme='dark'] .page-hero .inner:not(.breadcrumbs),
  html.shop-hero-on[data-theme='dark'] .page-hero .breadcrumbs {
    background: rgba(33, 27, 26, 0.93);
    border-color: rgba(74, 59, 57, 0.9);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  }
  /* the faint word behind the old hero would sit on the picture, where it cannot be seen */
  html.shop-hero-on .page-hero::after { display: none; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  html.shop-hero-on .page-hero { padding-top: 0; padding-bottom: 44px; }
  html.shop-hero-on .shop-hero-pic {
    width: 100%;
    height: clamp(150px, 40vw, 260px);
    object-position: 50% 80%;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
  }
  html.shop-hero-on .page-hero .breadcrumbs { margin: -12px auto 18px; }
}

/* ---------- a hero built by shop-heroes.js on a page that had none (the Games page, 26 Nov 2026) ----------
   That page keeps the site's styles away from its own content (mara/games/games-frame.css), so this section sets
   everything it needs itself, and her heading and sentence keep their own styles from the page. */
html.shop-hero-on .page-hero.shop-hero-built {
  display: block; position: relative; overflow: hidden; box-sizing: border-box;
  background: none; border: 0; color: var(--uo-gp-ink); font-family: var(--uo-gp-sans); font-size: 16px; line-height: normal;
}
html.shop-hero-on .shop-hero-built .inner { display: block; box-sizing: border-box; max-width: 1132px; margin: 0 auto; padding: 0 16px; }
@media (max-width: 760px) {
  html.shop-hero-on .page-hero.shop-hero-built { padding: 0; }
  html.shop-hero-on .shop-hero-built .shop-hero-pic { margin-bottom: 22px; }
  html.shop-hero-on .shop-hero-built + main.uo-gp { padding-top: 0; }
}
@media (min-width: 761px) {
  html.shop-hero-on .page-hero.shop-hero-built { --shop-left: max(16px, calc((100% - 1100px) / 2)); display: flex; padding: 64px 0; }
  html.shop-hero-on .shop-hero-built .inner:not(.breadcrumbs) { padding: 40px 44px 44px; margin-right: auto; margin-left: var(--shop-left); }
  html.shop-hero-on .shop-hero-built .uo-gp-intro { margin-bottom: 0; }
}

/* ---------- the walk-in ---------- */
/* Before the page is drawn: the full-screen picture, as the street showed it, under the menu bar (z-index 100). */
html.shop-walkin::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 99;
  background: #3a2519 var(--shop-walkin-img) center / cover no-repeat;
  pointer-events: none;
}
/* Then the same picture as a layer that settles into the hero's picture and fades away. */
.shop-walkin-layer {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 99;
  overflow: hidden;
  pointer-events: none;
  background: #3a2519;
}
.shop-walkin-layer img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
}
.shop-walkin-layer.is-settling {
  transition: top .78s cubic-bezier(.22, 1, .36, 1), left .78s cubic-bezier(.22, 1, .36, 1),
              width .78s cubic-bezier(.22, 1, .36, 1), height .78s cubic-bezier(.22, 1, .36, 1);
}
.shop-walkin-layer.is-settling img { transition: object-position .78s cubic-bezier(.22, 1, .36, 1); }
.shop-walkin-layer.is-gone { opacity: 0; transition: opacity .35s ease; }
@media (prefers-reduced-motion: reduce) {
  html.shop-walkin::after, .shop-walkin-layer { display: none; }
}

/* ---------- gentle movement over the picture (26 Nov 2026; street/shop-heroes-move.js builds it) ---------- */
/* The layer lies exactly over the picture and under the words' panel (which is z-index 1), so nothing here can
   cover or dim the words. */
html.shop-hero-on .shop-fx {
  position: absolute; z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
html.shop-hero-on .shop-fx-scene { position: absolute; }
html.shop-hero-on .shop-fx-canvas { position: absolute; display: block; }
html.shop-hero-on .shop-fx-under,
html.shop-hero-on .shop-fx-tail { position: absolute; display: block; max-width: none; }
html.shop-hero-on .shop-fx-glow {
  position: absolute;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  animation: var(--d, 5s) ease-in-out var(--delay, 0s) infinite both;
}
/* a tree light: at least a few screen pixels across, so it still shows in the narrow band on a phone */
html.shop-hero-on .shop-fx-bulb {
  width: max(7px, 1.25%);
  background: radial-gradient(circle, rgba(255, 249, 222, .95) 0, rgba(255, 220, 140, .6) 28%, rgba(255, 196, 96, 0) 68%);
  animation-name: shop-twinkle;
}
html.shop-hero-on .shop-fx-flame {
  background: radial-gradient(circle, rgba(255, 214, 140, .55) 0, rgba(255, 176, 80, .25) 38%, rgba(255, 160, 60, 0) 70%);
  animation-name: shop-flicker;
}
html.shop-hero-on .shop-fx-flame-core {
  background: radial-gradient(circle, rgba(255, 240, 200, .7) 0, rgba(255, 200, 110, .3) 40%, rgba(255, 180, 80, 0) 70%);
  animation-name: shop-flicker-core;
}
html.shop-hero-on .shop-fx-lamp {
  background: radial-gradient(circle, rgba(255, 222, 160, .4) 0, rgba(255, 196, 110, .16) 40%, rgba(255, 180, 90, 0) 70%);
  animation-name: shop-waver;
}
/* a light with its own colour (string lights, arcade lights): the colour is given as --g: r, g, b */
html.shop-hero-on .shop-fx-bulb.has-g {
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0, rgba(var(--g), .7) 30%, rgba(var(--g), 0) 68%);
}
html.shop-hero-on .shop-fx-blink {
  background: radial-gradient(circle, rgba(255, 255, 255, .7) 0, rgba(var(--g, 255, 214, 140), .55) 30%, rgba(var(--g, 255, 214, 140), 0) 70%);
  animation-name: shop-blink;
}
html.shop-hero-on .shop-fx-fire {
  background: radial-gradient(circle, rgba(255, 200, 110, .5) 0, rgba(255, 140, 50, .25) 40%, rgba(255, 120, 40, 0) 70%);
  animation-name: shop-flicker;
}
/* a screen that flickers a little, as an old television or an arcade game does */
html.shop-hero-on .shop-fx-rect {
  aspect-ratio: auto; transform: none; border-radius: 8%;
  background: radial-gradient(ellipse at 50% 45%, rgba(var(--g, 200, 220, 255), .34) 0, rgba(var(--g, 200, 220, 255), .12) 60%, rgba(var(--g, 200, 220, 255), 0) 100%);
  animation-name: shop-screen;
}
/* steam rising from a cup: three soft puffs, one after another */
html.shop-hero-on .shop-fx-steam {
  position: absolute; aspect-ratio: 1; border-radius: 50%; opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 252, 246, .55) 0, rgba(255, 252, 246, .22) 40%, rgba(255, 252, 246, 0) 70%);
  animation: shop-steam var(--d, 5s) ease-out var(--delay, 0s) infinite both;
}
html.shop-hero-on .shop-fx.is-paused .shop-fx-glow,
html.shop-hero-on .shop-fx.is-paused .shop-fx-steam { animation-play-state: paused; }
/* uneven steps, so no light or flame pulses like a metronome */
@keyframes shop-twinkle {
  0% { opacity: 0; } 9% { opacity: .8; } 17% { opacity: .2; } 31% { opacity: .55; } 44% { opacity: .05; } 100% { opacity: 0; }
}
@keyframes shop-flicker {
  0% { opacity: .6; transform: translate(-50%, -50%) scale(1); } 11% { opacity: .78; transform: translate(-50%, -52%) scale(1.04); }
  19% { opacity: .52; transform: translate(-50%, -49%) scale(.97); } 34% { opacity: .7; transform: translate(-50%, -51%) scale(1.02); }
  47% { opacity: .5; transform: translate(-50%, -50%) scale(.98); } 61% { opacity: .8; transform: translate(-50%, -52%) scale(1.05); }
  74% { opacity: .58; transform: translate(-50%, -50%) scale(.99); } 88% { opacity: .7; transform: translate(-50%, -51%) scale(1.03); }
  100% { opacity: .6; transform: translate(-50%, -50%) scale(1); }
}
@keyframes shop-flicker-core {
  0% { opacity: .5; } 14% { opacity: .85; } 23% { opacity: .4; } 41% { opacity: .75; } 52% { opacity: .55; } 69% { opacity: .9; } 83% { opacity: .45; } 100% { opacity: .5; }
}
@keyframes shop-blink {
  0% { opacity: .1; } 5% { opacity: .9; } 29% { opacity: .85; } 33% { opacity: .1; } 51% { opacity: .1; } 54% { opacity: .75; }
  60% { opacity: .15; } 77% { opacity: .1; } 80% { opacity: .8; } 92% { opacity: .7; } 95% { opacity: .1; } 100% { opacity: .1; }
}
@keyframes shop-screen {
  0% { opacity: .5; } 7% { opacity: .62; } 13% { opacity: .45; } 38% { opacity: .55; } 41% { opacity: .35; } 44% { opacity: .58; }
  70% { opacity: .5; } 86% { opacity: .64; } 100% { opacity: .5; }
}
@keyframes shop-steam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
  22% { opacity: .75; }
  60% { opacity: .45; transform: translate(-38%, -170%) scale(1); }
  100% { opacity: 0; transform: translate(-58%, -300%) scale(1.35); }
}
@keyframes shop-waver {
  0% { opacity: .55; } 23% { opacity: .75; } 41% { opacity: .5; } 67% { opacity: .7; } 100% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  html.shop-hero-on .shop-fx { display: none; }
}
