:root {
  --cream: #f3e9d6;
  --ink: #3b2a1f;
  --olive: #7d8a5a;
  --rose: #d98c7a;
  --butter: #f1d27a;
  --glow: 255, 214, 140;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--cream); color: var(--ink); font-family: "Fraunces", Georgia, serif; }

#stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  background: #2a1f18;
}

/* ---------- scenes and camera moves ---------- */
.scene {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transform: none;
  transition: transform 1.2s cubic-bezier(.65,.05,.25,1), opacity 1s ease;
}
.scene.active { opacity: 1; pointer-events: auto; transform: none; }
.scene.pos-left  { transform: translateX(-7%) scale(1.14); }
.scene.pos-right { transform: translateX(7%) scale(1.14); }
/* the fridge: a pretty still life first, the real fridge underneath */
#fridge .bg.real { opacity: 0; transition: opacity 1.1s ease; }
#fridge .bg.art  { transition: opacity 1.1s ease; }
#fridge .spots   { opacity: 0; pointer-events: none; transition: opacity 1.1s ease; }
#fridge.real .bg.real { opacity: 1; }
#fridge.real .bg.art  { opacity: 0; }
#fridge.real .spots   { opacity: 1; pointer-events: auto; }
#peek {
  position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 25;
  font: italic 500 clamp(13px, 1.4vw, 20px) "Fraunces", Georgia, serif; color: var(--ink);
  background: rgba(243,233,214,.9); border: 0; border-radius: 999px; padding: 10px 22px; cursor: pointer;
}
#peek:hover { background: rgba(255,238,200,.98); }

/* the world holds the picture AND everything on it. A fixed 4% overscan hides the edges when depth shifts the picture. */
.world { position: absolute; inset: 0; transform: scale(1.04); transform-origin: 50% 50%; }
.scene .bg, .scene canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .bg { object-fit: cover; }

/* ---------- colored light from the stained glass: a window-shaped beam that sweeps the floor, plus soft drifting glows ---------- */
.light { position: absolute; left: 10%; right: 24%; top: 58%; bottom: 0; pointer-events: none; overflow: visible; }
.light .blob { position: absolute; width: 26%; aspect-ratio: 1.5; border-radius: 50%; filter: blur(16px); opacity: .5; }
.b1 { left: 4%;  top: 10%; background: radial-gradient(closest-side, rgba(255,110,90,1), transparent 72%);  animation: sway1 10s ease-in-out infinite alternate; }
.b2 { left: 32%; top: 30%; background: radial-gradient(closest-side, rgba(255,180,50,1), transparent 72%);  animation: sway2 13s ease-in-out infinite alternate; }
.b3 { left: 56%; top: 8%;  background: radial-gradient(closest-side, rgba(110,185,100,1), transparent 72%); animation: sway3 15s ease-in-out infinite alternate; }
.b4 { left: 16%; top: 48%; background: radial-gradient(closest-side, rgba(100,150,235,1), transparent 72%); animation: sway1 17s ease-in-out infinite alternate-reverse; }
@keyframes sway1 { from { transform: translate(-60%, 20%) scale(.9); }  to { transform: translate(120%, -50%) scale(1.25); } }
@keyframes sway2 { from { transform: translate(80%, -20%) scale(1.1); } to { transform: translate(-130%, 50%) scale(.85); } }
@keyframes sway3 { from { transform: translate(-90%, 40%) scale(.9); }  to { transform: translate(70%, -40%) scale(1.2); } }

/* the beam: the stained glass window's grid of colored panes, thrown across the floor and sliding with the "sun" */
.beam {
  position: absolute; left: 6%; top: 60%; width: 44%; height: 40%;
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr); gap: 3px;
  transform: skewX(-22deg); transform-origin: 0 100%;
  opacity: .8; filter: blur(8px); mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 78%);
          mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 78%);
  animation: beamsweep 13s ease-in-out infinite alternate;
}
.beam i { display: block; border-radius: 2px; }
@keyframes beamsweep {
  from { transform: translate(-6%, 6%) skewX(-22deg) scale(.95); opacity: .45; }
  50%  { opacity: .7; }
  to   { transform: translate(30%, -4%) skewX(-22deg) scale(1.08); opacity: .5; }
}

#steam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- hotspots and hover glow ---------- */
.spot.silent, .spot.silent:hover { cursor: default; background: none; box-shadow: none; }
.spots { position: absolute; inset: 0; }
.spot {
  position: absolute; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 40%;
  transition: box-shadow .35s ease, background .35s ease;
}
.spot:hover, .spot:focus-visible {
  background: radial-gradient(closest-side, rgba(var(--glow), .30), rgba(var(--glow), 0) 75%);
  box-shadow: 0 0 36px 10px rgba(var(--glow), .45);
  outline: none;
}
.spot .tag {
  position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%);
  font-style: italic; font-size: clamp(11px, 1.1vw, 16px); white-space: nowrap;
  background: rgba(243,233,214,.94); color: var(--ink); padding: 3px 12px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.spot:hover .tag, .spot:focus-visible .tag { opacity: 1; }

.product {
  position: absolute; border: 0; padding: 0; background: none; cursor: pointer;
  transition: transform .3s ease, filter .3s ease;
  filter: saturate(.94) sepia(.10) drop-shadow(0 3px 2px rgba(60,30,20,.35));
}
.product img { display: block; height: 100%; width: auto; }
.product:hover, .product:focus-visible {
  transform: translateY(-3px) scale(1.06);
  filter: saturate(1) sepia(.04) drop-shadow(0 0 10px rgba(var(--glow), .95)) drop-shadow(0 0 22px rgba(var(--glow), .6));
  outline: none; z-index: 5;
}
.product .tag {
  position: absolute; left: 50%; top: -4px; transform: translate(-50%, -100%);
  font-style: italic; font-size: clamp(10px, 1vw, 15px); white-space: nowrap;
  background: rgba(243,233,214,.95); color: var(--ink); padding: 2px 10px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.product:hover .tag, .product:focus-visible .tag { opacity: 1; }

/* ---------- navigation ---------- */
.nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  font: italic 500 clamp(13px, 1.5vw, 22px) "Fraunces", Georgia, serif;
  color: var(--ink); background: rgba(243,233,214,.82); border: 0; border-radius: 999px;
  padding: 10px 20px; cursor: pointer; backdrop-filter: blur(4px);
  transition: background .25s ease, transform .25s ease;
}
.nav.left { left: 14px; } .nav.right { right: 14px; }
.nav:hover:not(:disabled) { background: rgba(255, 238, 200, .98); transform: translateY(-50%) scale(1.05); }
.nav:disabled { opacity: .55; cursor: default; }
.nav em { font-size: .75em; opacity: .7; margin-left: 4px; }
.hidden { display: none !important; }

#sound {
  position: absolute; right: 14px; top: 14px; z-index: 30;
  font: italic 14px "Fraunces", Georgia, serif; color: var(--ink);
  background: rgba(243,233,214,.85); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
#hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20;
  font-style: italic; font-size: 14px; color: #fff7e6; text-shadow: 0 1px 6px rgba(0,0,0,.6);
  opacity: .9; animation: hintfade 1s ease 7s forwards; pointer-events: none;
}
@keyframes hintfade { to { opacity: 0; } }

/* ---------- card ---------- */
#card {
  position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 40;
  width: min(620px, 82%); display: flex; gap: 20px; align-items: center;
  background: rgba(243,233,214,.97); border-radius: 22px; padding: 18px 22px;
  box-shadow: 0 18px 50px rgba(40,20,10,.45);
}
#card img { width: 130px; height: 150px; object-fit: contain; flex: none; }
#card .kind { margin: 0; font-style: italic; font-size: 13px; color: var(--olive); }
#card h2 { margin: 2px 0 2px; font-weight: 500; font-size: clamp(18px, 2vw, 28px); line-height: 1.15; }
#card .brand { margin: 0 0 8px; font-size: 14px; opacity: .8; }
#card .placeholder { margin: 0; font-style: italic; font-size: 13px; opacity: .6; }
#card-close { position: absolute; right: 12px; top: 6px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .blob, .beam { animation: none !important; }
  .scene { transition-duration: .01s; }
}

/* ---------- the dining room ---------- */
/* the picture is square: it sits in the middle of the wide stage on plain cream, like a photograph, with no blur */
#dining .world { background: #2f3a2a; }   /* the green of the door frames */
#dining .bg, #dining .bg-video { object-fit: contain; }
#dining .bg-video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.dining-light { left: 30%; right: 30%; top: 52%; bottom: 0; }
#dining-msg {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 25; margin: 0; opacity: 0; transition: opacity 1.6s ease;
  font: italic 500 clamp(16px, 2.2vw, 32px) "Fraunces", Georgia, serif; color: #fff7e6;
  text-shadow: 0 2px 14px rgba(40,15,5,.75); letter-spacing: .01em; text-align: center; max-width: 80%;
}
.nav#to-dining { white-space: nowrap; }
#dining-msg.on { opacity: 1; }

/* ---------- the pantry's stained glass light ---------- */
.pantry-light { left: 12%; right: 12%; top: 60%; bottom: 0; }
.beam.pantry-beam { left: 18%; top: 66%; width: 56%; height: 34%; animation-duration: 15s; }

/* ---------- the table in the dining room: a card with a real supper photo ---------- */
#dining-spots { z-index: 6; }
#dining-spots .spot { opacity: 0; pointer-events: none; transition: opacity 1.4s ease, box-shadow .35s ease, background .35s ease; }
#dining-spots .spot.ready { opacity: 1; pointer-events: auto; }
#card.supper { flex-direction: column; width: fit-content; max-width: min(560px, 88%); bottom: 3%; gap: 10px; padding: 14px 14px 12px; }
#card.supper #card-img { width: auto; max-width: 100%; height: auto; max-height: 74vh; object-fit: contain; border-radius: 14px; }
#card.supper .brand, #card.supper .kind { display: none; }
#card .menu { margin: 4px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
#card .when { margin: 0; font-style: italic; font-size: 13px; opacity: .7; }

/* ---------- the music: a small pill that opens Spotify's own player ---------- */
#music { position: absolute; left: 14px; bottom: 62px; z-index: 35; }

/* ---------- the credit, bottom left: a little travertine shop sign, after Antica Salumeria: just the name, like a shop ---------- */
#credit {
  position: absolute; left: 14px; bottom: 12px; z-index: 34;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 15px 7px; border-radius: 2px; text-decoration: none;
  font-family: "Josefin Sans", "Futura", sans-serif; font-weight: 600; color: #2e4a3b;
  /* stone: warm base, faint horizontal travertine bands, a few pits */
  background:
    radial-gradient(circle at 22% 38%, rgba(150,120,85,.22) 0 1px, transparent 1.6px),
    radial-gradient(circle at 71% 64%, rgba(150,120,85,.2) 0 1px, transparent 1.6px),
    radial-gradient(circle at 48% 18%, rgba(150,120,85,.16) 0 .8px, transparent 1.4px),
    repeating-linear-gradient(178deg, rgba(160,135,100,.08) 0 2px, transparent 2px 6px, rgba(255,255,255,.12) 6px 7px, transparent 7px 11px),
    linear-gradient(180deg, #efe6d4, #e1d4bc);
  /* the moulding: a lit inner edge, a carved groove, a shadow on the wall */
  box-shadow:
    inset 0 0 0 1px rgba(255,252,244,.5),
    inset 0 0 0 3px #d9cbb0,
    inset 0 0 0 4px rgba(95,72,45,.28),
    0 1px 0 rgba(255,240,215,.25),
    0 3px 8px rgba(30,15,5,.4);
  /* raised letters: light catches the top edge, shadow under the bottom */
  text-shadow: 0 -1px 0 rgba(255,253,246,.7), 0 1px 0 rgba(20,40,30,.35);
  transition: transform 160ms cubic-bezier(.23,1,.32,1), box-shadow 160ms cubic-bezier(.23,1,.32,1);
}
#credit .lg { font-size: 17px; line-height: 1; letter-spacing: .4em; margin-right: -.4em; }
@media (hover: hover) and (pointer: fine) {
  #credit:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255,252,244,.5), inset 0 0 0 3px #d9cbb0, inset 0 0 0 4px rgba(95,72,45,.28), 0 1px 0 rgba(255,240,215,.25), 0 6px 14px rgba(30,15,5,.45); }
}
#credit:active { transform: scale(.97); }
#credit:focus-visible { outline: 2px solid rgba(255,214,140,.9); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { #credit, #credit:hover, #credit:active { transition: none; transform: none; } }
#music-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font: italic 500 14px "Fraunces", Georgia, serif; color: var(--ink);
  background: rgba(243,233,214,.9); border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
}
#music-pill:hover { background: rgba(255,238,200,.98); }
#music-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #b9a98a; transition: background .3s ease; }
#music-pill .dot.on { background: #6f8f4e; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }
#spotify-wrap {
  position: absolute; left: 0; bottom: 44px; width: min(340px, 40vw); border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(40,20,10,.35); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease;
}
#music.open #spotify-wrap { opacity: 1; pointer-events: auto; transform: none; }
#spotify-wrap iframe { display: block; width: 100%; border: 0; }

/* ---------- phones held upright: fill the screen, let the picture be wider than the screen, drag to look around ---------- */
@media (orientation: portrait) and (max-width: 900px) {
  #stage { --z: .6; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; top: 0; transform: none; touch-action: none; }
  .world { left: 50%; right: auto; top: 50%; bottom: auto; width: calc(100vh * 16 / 9 * var(--z)); height: calc(100vh * var(--z)); width: calc(100dvh * 16 / 9 * var(--z)); height: calc(100dvh * var(--z)); translate: calc(-50% + var(--pan, 0px)) -50%; }
  #zoom-btn { display: block; }
  .nav { top: auto; bottom: 74px; transform: none; font-size: 14px; padding: 9px 15px; max-width: 62vw; text-align: center; line-height: 1.2; }
  .nav:hover:not(:disabled) { transform: none; }
  .nav.left { left: 10px; } .nav.right { right: 10px; }
  #sound { top: 10px; right: 10px; font-size: 13px; }
  #hint { bottom: 64px; font-size: 13px; width: 80%; text-align: center; }
  #card { bottom: 3%; width: 92%; padding: 12px 14px; gap: 12px; }
  #card img { width: 90px; height: 110px; }
  #card.supper { width: fit-content; max-width: 92%; }
  #dining-msg { bottom: 18%; font-size: 17px; max-width: 86%; }
  #spotify-wrap { width: min(330px, 86vw); }
}
/* touch screens have no hover: give the tappable things a soft glow so people know where to tap */
@media (hover: none) {
  .spot:not(.silent) { box-shadow: 0 0 0 2px rgba(255,214,140,.45), 0 0 22px rgba(255,214,140,.35); animation: tapring 3.2s ease-in-out infinite; }
  .product { filter: saturate(.94) sepia(.10) drop-shadow(0 3px 2px rgba(60,30,20,.35)) drop-shadow(0 0 5px rgba(255,214,140,.7)); }
}
@keyframes tapring { 50% { box-shadow: 0 0 0 4px rgba(255,214,140,.2), 0 0 30px rgba(255,214,140,.15); } }

/* bigger tap targets on touch screens: the products are small, so each gets an invisible 14px border to tap */
@media (hover: none) { .product::after { content: ""; position: absolute; inset: -14px; } }

#zoom-btn { display: none; position: absolute; right: 10px; bottom: 128px; z-index: 22; font: italic 500 13px "Fraunces", Georgia, serif; color: var(--ink); background: rgba(243,233,214,.88); border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }

@media (orientation: portrait) and (max-width: 900px) { #zoom-btn { display: block; } }


/* ---------- kitchen only (2026-10-14) ---------- */
.kitchen-only .nav, .kitchen-only #pantry, .kitchen-only #dining, .kitchen-only #dining-msg { display: none !important; }
#now {
  position: absolute; left: 24px; top: 20px; margin: 0; z-index: 6;
  font-family: 'Fraunces', serif; font-style: italic; font-size: 17px; color: #fff8ea;
  text-shadow: 0 1px 8px rgba(40, 20, 10, .55); pointer-events: none;
}
.tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; }
#stage[data-period="evening"] .tint { opacity: 1; background: linear-gradient(180deg, rgba(120, 40, 70, .10), rgba(255, 150, 60, .10)); mix-blend-mode: multiply; }
#stage[data-period="afternoon"] .tint { opacity: 1; background: rgba(255, 215, 140, .08); mix-blend-mode: soft-light; }

/* a styled food photo from the kitchen: big picture, words underneath */
#card.photo { flex-direction: column; width: fit-content; max-width: min(520px, 88%); bottom: 3%; gap: 10px; padding: 14px 14px 12px; }
#card.photo #card-img { width: auto; max-width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 14px; }

#card-extra .credit { margin: 6px 0 0; font-size: 12px; opacity: .65; font-style: italic; }
#card-extra .links { margin: 8px 0 0; display: flex; gap: 14px; flex-wrap: wrap; }
#card-extra a { color: var(--olive); font-size: 14px; text-decoration: none; border-bottom: 1px solid currentColor; }
#card.photo .placeholder { font-size: 14px; opacity: .85; line-height: 1.45; font-style: normal; max-height: 22vh; overflow: auto; }

/* things placed on the stove or counter (cutouts of Ally's own objects) */
#kitchen .prop { position: absolute; height: auto; pointer-events: none; filter: drop-shadow(0 4px 5px rgba(50, 25, 12, .42)); }

#kitchen .prop.on-hover { opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .35s, transform .35s; }
#kitchen .prop.on-hover.show { opacity: 1; transform: none; }
#stage .tint { display: none; }   /* the room pictures now carry their own light, so the old colour wash is off */
/* objects placed on the picture pick up the warm evening light */
#stage[data-period="evening"] #kitchen .prop { filter: drop-shadow(0 4px 5px rgba(50, 25, 12, .42)) sepia(.10) saturate(1.1) brightness(.9); }
#stage[data-period="afternoon"] #kitchen .prop { filter: drop-shadow(0 4px 5px rgba(50, 25, 12, .38)) brightness(1.04); }

#card-extra .tasting { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
#card-extra .tasting span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; margin-bottom: 2px; }
#card:not(.photo) img { width: 150px; height: 190px; }

#card.tall:not(.photo) img { width: 90px; height: 250px; }
#card.tall:not(.photo) { align-items: center; }
/* the breeze layer sits exactly on the glass of the black-framed window */
#kitchen canvas.breeze { position: absolute; pointer-events: none; }
/* a card with a photo and a paragraph must fit the screen: shorter picture */
#card.photo #card-img { max-height: 42vh; }
#card.photo .placeholder { max-height: 26vh; }

/* a painted overhead of the table floats above the island while you hover it */
#kitchen .prop.frame { filter: none; border: 6px solid #fbf6ea; border-radius: 4px; box-shadow: 0 10px 28px rgba(40, 20, 10, .38); }
#stage[data-period] #kitchen .prop.frame { filter: none; }

/* the week's list: a handwritten note on the island, and the list inside the card */
#kitchen .list-note {
  position: absolute; z-index: 3; padding: 14px 16px 12px; pointer-events: none;
  font-family: 'Caveat', 'Bradley Hand', cursive; font-size: clamp(14px, 1.9vw, 24px); line-height: 1.15; color: #3b2f26;
  background: #fbf6e8 repeating-linear-gradient(#fbf6e8 0 1.05em, rgba(120, 140, 170, .22) 1.05em calc(1.05em + 1px));
  transform: rotate(-2deg) translateY(6px); opacity: 0; transition: opacity .3s, transform .3s;
  box-shadow: 0 10px 22px rgba(40, 20, 10, .35); border-radius: 2px;
}
#kitchen .list-note.show { opacity: 1; transform: rotate(-2deg); }
#kitchen .list-note::before { content: ''; position: absolute; left: 50%; top: -9px; width: 52px; height: 17px; margin-left: -26px; background: rgba(255, 224, 140, .72); transform: rotate(3deg); }
#kitchen .list-note b { display: block; font-size: 1.25em; font-weight: 700; margin-bottom: 2px; }
#kitchen .list-note ul { margin: 0; padding: 0 0 0 1.1em; }
#kitchen .list-note i { display: block; margin-top: 4px; font-size: .8em; opacity: .6; }
#card.listing { flex-direction: column; width: min(560px, 90%); max-height: 78vh; overflow: auto; }
#card.listing #card-img { display: none; }
#card .shoplist section { margin: 0 0 10px; }
#card .shoplist h3 { margin: 0 0 2px; font-size: 15px; font-weight: 500; }
#card .shoplist h3 a { font-size: 13px; margin-left: 8px; color: var(--olive); text-decoration: none; border-bottom: 1px solid currentColor; }
#card .shoplist p { margin: 0; font-size: 14px; line-height: 1.4; }
#card .shoplist .todo p { opacity: .6; font-style: italic; }

.spot.has-note .tag { display: none !important; }
#kitchen .list-note { font-size: clamp(13px, 1.7vw, 22px); }
#kitchen .list-note li { white-space: nowrap; }
