/* ──────────────────────────────────────────────────────────
   THE LIVING ROOM (/living-room). See design.md §12.
   A photographed room you shop by looking around it. Hover an
   object we sell and the room dims, the object lifts out with a
   white glow and a price tag. Click for a quick view (wall prints
   go to /prints; the leaning rack opens a flip-through). Touch: pulsing dots, tap = tag, tap
   again = open. Everything outside the photo stays monochrome
   (design.md §2): the room is the art, the UI keeps out of it.
   ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black: #000; --white: #fff; --grey-light: #eee; --grey-mid: #6f6f6f;
  --font: 'Courier New', Courier, monospace;
  --nav: 56px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
html, body { height: 100%; }
body { font-family: var(--font); background: var(--black); color: var(--black); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font-family: inherit; }

/* ─── NAV + DRAWER (as every other page) ─── */
nav.site {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav); z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--grey-light);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px;
}
.nav-left { display: flex; align-items: center; }
.hamburger { display: block; background: none; border: none; cursor: pointer; color: var(--black); padding: 4px 8px 4px 0; line-height: 1; font-size: 20px; }
.nav-brand { text-align: center; font-size: 13px; letter-spacing: .2em; color: var(--black); text-decoration: none; }
.nav-right { display: flex; justify-content: flex-end; }
.nav-contact { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--black); }
.nav-contact:hover { text-decoration: underline; }
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; top: 0; left: -280px; width: 260px; height: 100%; background: var(--white); border-right: 1px solid var(--grey-light); z-index: 201; transition: left 0.3s ease; display: flex; flex-direction: column; padding: 80px 32px 40px; }
.drawer.open { left: 0; }
.drawer a, .drawer button { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--black); background: none; border: none; cursor: pointer; padding: 14px 0; border-bottom: 1px solid var(--grey-light); text-align: left; width: 100%; }
.drawer a:last-child, .drawer button:last-child { border-bottom: none; }
.drawer-group { border-bottom: 1px solid var(--grey-light); }
.drawer-group-toggle { display: flex; align-items: center; justify-content: space-between; border-bottom: none; }
.drawer-caret { font-size: 9px; transition: transform 0.2s ease; }
.drawer-group.open .drawer-caret { transform: rotate(180deg); }
.drawer-submenu { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.drawer-group.open .drawer-submenu { max-height: 160px; }
.drawer-submenu a { display: block; border-bottom: none; padding: 10px 0 10px 16px; font-size: 11px; color: var(--grey-mid); }
.drawer-submenu a[aria-current] { color: var(--black); }
.drawer-submenu a:last-child { padding-bottom: 14px; }
.drawer-close { position: absolute; top: 18px; right: 18px; font-size: 20px; background: none; border: none; cursor: pointer; color: var(--black); line-height: 1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ─── STAGE + SCENE ─── */
.stage {
  position: fixed; top: var(--nav); left: 0; right: 0; bottom: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; background: #1a120b;
}
.stage::-webkit-scrollbar { display: none; }
.scene { position: relative; flex-shrink: 0; }      /* sized by JS to cover the stage */
.scene > .plate, .scene > video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.fixed-print { position: absolute; display: block; pointer-events: none; }
.dim {
  position: absolute; inset: 0; background: rgba(0,0,0,.52); opacity: 0; pointer-events: none; z-index: 3;
  transition: opacity .45s var(--ease);
}
body.looking .dim { opacity: 1; }

.spot {
  position: absolute; z-index: 4; display: block; background: none; border: 0; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; outline: none;
}
.spot::before { content: ''; position: absolute; inset: -14px; }   /* small objects get a finger-sized target */
.spot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .35s var(--ease), filter .35s var(--ease); pointer-events: none; }
.spot.on { z-index: 5; }
.spot.on img {
  opacity: 1;
  filter: drop-shadow(0 0 .6px #fff) drop-shadow(0 0 1.4px #fff) drop-shadow(0 0 16px rgba(255,255,255,.55));
}
.spot:focus-visible img { opacity: 1; }

/* live frames: prints mapped into the photo's frames, lit by a light map */
.patch { position: absolute; z-index: 1; pointer-events: none; display: block; }
.plane { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; transform-origin: 0 0; }
.plane.on { z-index: 6; }
.plane .win { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; background: #111; }
.plane .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--ease); }
.plane .art.show { opacity: 1; }
.plane .light { position: absolute; mix-blend-mode: multiply; }
.spot.group { z-index: 2; }
.spot.group.on { z-index: 5; }
.spot .hit { position: absolute; inset: 0; display: block; z-index: 1; background: none; border: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.swap {
  position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -17px;
  background: var(--white); color: var(--black); border: 1px solid var(--black); font-size: 20px; line-height: 1; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.swap.prev { left: -46px; }
.swap.next { right: -46px; }
.spot.on .swap { opacity: 1; pointer-events: auto; }
.swap:hover { background: var(--black); color: var(--white); }
.swap:focus-visible, .spot .hit:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* touch / first-visit hints */
.dot {
  position: absolute; z-index: 6; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity .5s;
}
.dot::before, .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.dot::before { inset: 7px; background: var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.dot::after { border: 1px solid var(--white); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.45); opacity: 1; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
body.hint .dot, body.touch .dot { opacity: 1; }
body.looking .dot { opacity: 0; }

/* ─── PRICE TAG ─── */
.tag {
  position: fixed; z-index: 40; pointer-events: none; min-width: 180px; max-width: 260px;
  background: var(--white); color: var(--black); border: 1px solid var(--black); padding: 10px 12px 11px;
  transform: translate(-50%, calc(-100% - 14px)); opacity: 0; transition: opacity .2s;
}
.tag.show { opacity: 1; }
.tag::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--white); border-right: 1px solid var(--black); border-bottom: 1px solid var(--black); transform: rotate(45deg); }
.tag.below { transform: translate(-50%, 14px); }
.tag.below::after { bottom: auto; top: -6px; transform: rotate(-135deg); }
.tag .k { font-size: 8px; letter-spacing: .3em; text-transform: uppercase; color: var(--grey-mid); }
.tag .t { font-size: 14px; letter-spacing: .02em; margin: 4px 0 6px; }
.tag .p { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; border-top: 1px solid var(--grey-light); padding-top: 6px; }
.tag .p b, .tag .p span { font-weight: normal; white-space: nowrap; }
.tag .p span { color: var(--grey-mid); }
.tag .s { font-size: 8px; letter-spacing: .22em; text-transform: uppercase; color: var(--grey-mid); margin-top: 7px; }

/* ─── CAPTION + SHOP THIS ROOM ─── */
.caption {
  position: fixed; left: 24px; bottom: 22px; z-index: 30; display: flex; align-items: stretch;
  background: var(--white); border: 1px solid var(--black);
}
.caption p { padding: 10px 14px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.caption p small { display: block; font-size: 8px; letter-spacing: .26em; color: var(--grey-mid); margin-bottom: 3px; }
.caption button { border: 0; border-left: 1px solid var(--black); background: var(--black); color: var(--white); padding: 0 16px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; }
.caption button:hover { opacity: .85; }

.list {
  position: fixed; left: 24px; bottom: 76px; z-index: 31; width: 320px; max-height: calc(100svh - var(--nav) - 110px); overflow-y: auto;
  background: var(--white); border: 1px solid var(--black); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
}
.list.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s var(--ease); }
.list h3 { font-weight: normal; font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--grey-mid); padding: 14px 14px 10px; border-bottom: 1px solid var(--grey-light); }
.list button, .list a {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--grey-light); background: none; cursor: pointer; text-decoration: none; color: var(--black);
}
.list img { width: 44px; height: 44px; object-fit: cover; background: #111; }
.list .n { font-size: 12px; letter-spacing: .02em; }
.list .n small { display: block; font-size: 8px; letter-spacing: .26em; text-transform: uppercase; color: var(--grey-mid); margin-bottom: 2px; }
.list .pr { font-size: 10px; letter-spacing: .1em; }
.list button:hover, .list a:hover { background: #f6f6f6; }

/* ─── QUICK VIEW (from the home wall, index.html) ─── */
.qv-scrim { position: fixed; inset: 0; z-index: 8500; background: rgba(0,0,0,0.45); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.qv-scrim.open { opacity: 1; visibility: visible; transition: opacity .35s; }
.qv {
  position: fixed; z-index: 8600; top: 0; right: 0; bottom: 0; width: min(860px, 92vw);
  background: var(--white); color: var(--black); display: grid; grid-template-columns: 1.1fr 1fr;
  transform: translateX(100%); visibility: hidden; transition: transform .7s var(--ease), visibility 0s .7s;
}
.qv.open { transform: none; visibility: visible; transition: transform .7s var(--ease); }
.qv-close { position: absolute; top: 16px; right: 18px; z-index: 2; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--black); }
.qv-img { background: var(--black); display: grid; grid-template-rows: 1fr auto; gap: 14px; padding: 40px 40px 24px; min-height: 0; }
.qv-img .main { min-height: 0; display: flex; align-items: center; justify-content: center; }
.qv-img .main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qv-img .thumbs { display: flex; gap: 8px; justify-content: center; }
.qv-img .thumbs button { width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.3); padding: 0; background: #111; cursor: pointer; opacity: .6; }
.qv-img .thumbs button[aria-current="true"] { opacity: 1; border-color: var(--white); }
.qv-img .thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-info { padding: 64px 36px 32px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.qv-kicker { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--grey-mid); display: flex; align-items: center; gap: 8px; }
.qv-kicker .flag { background: var(--black); color: var(--white); padding: 3px 6px; letter-spacing: .2em; }
.qv h2 { font-weight: normal; font-size: 26px; line-height: 1.15; letter-spacing: .01em; }
.qv-price { font-size: 13px; letter-spacing: .08em; }
.qv-price small { display: block; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--grey-mid); margin-top: 6px; }
.qv-desc { font-size: 12px; line-height: 1.75; letter-spacing: .02em; }
.qv-spec { font-size: 10px; letter-spacing: .08em; line-height: 1.9; color: var(--grey-mid); }
.qv-buy {
  display: block; width: 100%; text-align: center; background: var(--black); color: var(--white); border: 1px solid var(--black); padding: 15px;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: opacity .15s;
}
.qv-buy:hover { opacity: .8; }
.qv-room { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; align-self: flex-start; background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 2px; cursor: pointer; }
.qv-note { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--grey-light); font-size: 10px; letter-spacing: .08em; line-height: 1.7; color: var(--grey-mid); }

.qv-sizes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--black); }
.qv-sizes button {
  background: var(--white); color: var(--black); border: none; padding: 12px 6px; cursor: pointer;
  font-size: 11px; letter-spacing: .2em; display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.qv-sizes button + button { border-left: 1px solid var(--black); }
.qv-sizes small { font-size: 10px; letter-spacing: .08em; color: var(--grey-mid); }
.qv-sizes button[aria-checked="true"] { background: var(--black); color: var(--white); }
.qv-sizes button[aria-checked="true"] small { color: rgba(255,255,255,.75); }
.qv-wall { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; align-self: flex-start; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* the rack: one print at a time, a strip of the rest underneath */
.qv-img.rack-view { grid-template-rows: 1fr auto auto; }
.qv-img.rack-view .main img { border: 10px solid var(--white); }
.flip { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--white); font-size: 10px; letter-spacing: .24em; }
.flip button { width: 38px; height: 38px; background: none; color: var(--white); border: 1px solid rgba(255,255,255,.45); font-size: 15px; cursor: pointer; }
.flip button:hover { background: var(--white); color: var(--black); }
.flip .count { min-width: 6ch; text-align: center; font-variant-numeric: tabular-nums; }
.thumbs.strip { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumbs.strip::-webkit-scrollbar { display: none; }
.thumbs.strip button { flex-shrink: 0; }

/* ─── ATMOSPHERE: sunlight sweeping the wall, dust in the window light ─── */
.sun {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: soft-light;
  background:
    linear-gradient(104deg, transparent 0 18%, rgba(255,214,150,.55) 24%, transparent 31%, transparent 36%, rgba(255,214,150,.4) 41%, transparent 47%),
    radial-gradient(70% 90% at 4% 40%, rgba(255,200,120,.55), transparent 60%);
  background-size: 160% 100%, 100% 100%;
  animation: sweep 18s ease-in-out infinite alternate;
}
@keyframes sweep { from { background-position: 0% 0, 0 0; opacity: .75; } to { background-position: 60% 0, 0 0; opacity: 1; } }
.dust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
body.looking .sun { opacity: .3; }
.pan-hint {
  position: fixed; right: 24px; bottom: 22px; z-index: 30; background: var(--white); border: 1px solid var(--black);
  padding: 10px 14px; font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--grey-mid);
}
.list .all { display: block; padding: 12px 14px; font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--black); text-decoration: none; border-bottom: 0; }
.list .all:hover { text-decoration: underline; background: none; }

/* ─── MOBILE ─── */
@media (max-width: 760px) {
  .pan-hint { display: none; }
  nav.site { padding: 0 16px; }
  .caption { left: 16px; right: 16px; bottom: 16px; }
  .caption p { flex: 1; }
  .list { left: 16px; right: 16px; width: auto; bottom: 70px; }
  .swap.prev { left: 6px; }
  .swap.next { right: 6px; }
  .qv { top: auto; left: 0; width: 100%; height: 88svh; grid-template-columns: 1fr; grid-template-rows: 44% 1fr; transform: translateY(100%); }
  .qv-img { padding: 20px 20px 14px; }
  .qv-info { padding: 22px 18px 24px; gap: 14px; }
  .qv h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .sun { animation: none; }
  .dust { display: none; }
  .dot::after { animation: none; }
  .qv, .qv.open, .list, .dim, .spot img { transition: none; }
}
