/* =========================================================
   Alia Roberts — Gallery
   ========================================================= */

:root {
  --bg: #0f0c09;
  --wall: #1a1510;
  --gold: #5c4842;       /* faint rose gold: thin lines, dim borders */
  --gold-hi: #c9a093;    /* rose gold accent */
  --cream: #ede1cc;
  --muted: #7a6d57;

  --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* anything marked hidden in the HTML stays hidden, whatever its other styles */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--f-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

a { color: inherit; }
canvas, svg { display: block; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection { background: var(--gold-hi); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }

.eyebrow {
  margin: 0;
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 56px);
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}
.hero > * { position: relative; z-index: 1; }

/* Corridor photograph */
.hero > .hero__bg {
  position: absolute;
  inset: -12px;
  z-index: 0;
  background: url("images/hero-web.jpg") center 40% / cover no-repeat;
  filter: brightness(.7) blur(.6px);
  opacity: 0;
  transform: scale(1.06);
  animation: heroBg 2.4s var(--ease) .1s forwards;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 34% 42% at 50% 58%, rgba(10, 8, 6, .6), transparent 100%),
    linear-gradient(to bottom,
      rgba(10, 8, 6, .72) 0%,
      rgba(10, 8, 6, .2) 20%,
      rgba(10, 8, 6, .3) 62%,
      rgba(15, 12, 9, .86) 92%,
      var(--bg) 100%),
    linear-gradient(to right, rgba(10, 8, 6, .4), transparent 24%, transparent 76%, rgba(10, 8, 6, .4));
}
@keyframes heroBg { to { opacity: 1; transform: scale(1); } }

/* Top bar: stays at the top of the screen on every section */
.hero > .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.6vh, 36px) max(clamp(20px, 4vw, 56px), calc((100% - 1360px) / 2));
  transition: padding .4s var(--ease), background-color .4s ease, box-shadow .4s ease;
}
/* once past the hero: a dark, softly blurred bar so it reads over the gallery */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(15, 12, 9, .72);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
          backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid #5c4842;
  opacity: 0;
  transition: opacity .4s ease;
}
body.is-scrolled .topbar { padding-top: 14px; padding-bottom: 14px; }
body.is-scrolled .topbar::before { opacity: 1; }
body.modal-open .topbar { visibility: hidden; }
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--cream);
  text-decoration: none;
}
.brand__name {
  margin-right: -.16em;
  font: 400 clamp(1.15rem, 1.6vw, 1.5rem)/1 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand__role {
  margin-right: -.3em;
  font: 400 .56rem/1 var(--f-body);
  letter-spacing: .3em;
  white-space: nowrap;
  text-transform: uppercase;
  opacity: .75;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
}
.nav a {
  position: relative;
  padding: 8px 0;
  font: 400 .66rem/1 var(--f-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  transition: color .3s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold-hi);
  transform: scaleX(0);
  transition: transform .4s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--gold-hi); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.nav .nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: clamp(0px, 1vw, 12px);
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}
.nav .nav__cta::after { display: none; }
.nav .nav__cta:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--bg); }


/* Centre block */
.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(70px, 13vh, 140px) 0 clamp(80px, 10vh, 110px);
}
/* soft dark glow behind the text block; photo stays visible at the edges */
.hero__content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(12, 9, 7, .72), rgba(12, 9, 7, 0) 75%);
}

.hero__eyebrow, .hero__quote figcaption { text-shadow: 0 2px 18px rgba(0, 0, 0, .75); }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  font: 400 .66rem/1 var(--f-body);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(237, 225, 204, .85);
}
.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-hi);
}

.hero__quote { width: 100%; max-width: 100%; margin: 0; }
.hero__quote blockquote { margin: 0; }
.hero__quote p {
  margin: 0;
  overflow-wrap: break-word;
  font: 500 clamp(1.3rem, 2.9vw + .5rem, 2.6rem)/1.25 var(--f-display);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
  letter-spacing: .01em;
  color: var(--cream);
  text-wrap: balance;
}
.hero__quote em { font-style: italic; color: #d4ada0; }
.hero__quote figcaption {
  margin-top: 22px;
  font: 400 .66rem/1 var(--f-body);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(237, 225, 204, .85);
}
@media (max-width: 760px) {
  .br-wide { display: none; }
  .hero__quote p { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
}
@media (max-width: 400px) {
  .hero__eyebrow { gap: 10px; letter-spacing: .2em; font-size: .62rem; }
  .hero__eyebrow::before, .hero__eyebrow::after { width: 18px; }
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(40px, 6.5vh, 60px);
  padding: 15px 26px;
  border: 1px solid var(--gold-hi);
  border-radius: 6px;
  background: rgba(15, 12, 9, .3);
  color: var(--cream);
  font: 400 .72rem/1 var(--f-body);
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .4s ease, background-color .4s ease;
}
.hero__btn span { transition: transform .4s var(--ease); }
.hero__btn:hover, .hero__btn:focus-visible { background: var(--gold-hi); color: var(--bg); }
.hero__btn:hover span { transform: translateX(4px); }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  opacity: 0;
  animation: fadeIn 1.2s ease 1.6s forwards;
}
.scroll-cue__line {
  width: 1px;
  height: clamp(40px, 8vh, 74px);
  background: linear-gradient(to bottom, transparent, rgba(237, 225, 204, .75));
}
.scroll-cue svg {
  width: 16px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  animation: cueBob 2.2s ease-in-out infinite;
}
@keyframes cueBob { 50% { transform: translateY(4px); } }

/* Phone and tablet: menu behind a button */
@media (max-width: 980px) {
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    border: 1px solid #5c4842;
    border-radius: 50%;
    background: rgba(15, 12, 9, .45);
    cursor: pointer;
  }
  .menu-toggle span {
    width: 16px;
    height: 1px;
    background: var(--cream);
    transition: transform .3s ease;
  }
  .topbar.is-open .menu-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .topbar.is-open .menu-toggle span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

  .nav {
    position: absolute;
    top: calc(100% - 8px);
    right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 18px 22px;
    border: 1px solid #5c4842;
    background: rgba(15, 12, 9, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
  }
  .topbar.is-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease, transform .3s ease;
  }
  .nav a { padding: 10px 0; font-size: .72rem; }
  .nav .nav__cta { margin: 10px 0 0; }
}

.hero__rule {
  display: block;
  width: 1px;
  height: clamp(48px, 8vh, 80px);
  margin: 30px auto;
  background: linear-gradient(to bottom, transparent, var(--gold-hi), transparent);
}

.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1.4s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- The Artist / Process ---------- */

.story {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(100px, 16vh, 160px) 24px 0;
  text-align: center;
}
.story__title {
  margin: 18px 0 0;
  font: 300 clamp(2.2rem, 4.6vw, 3.6rem)/1.05 var(--f-display);
}
.story__title em { font-style: italic; color: var(--gold-hi); }
.story__text {
  max-width: 34em;
  margin: 24px auto 0;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
}

/* Candle flames */
.flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 2.6s ease-in-out infinite alternate;
}
.flame:nth-child(2n) { animation-duration: 3.3s; animation-delay: -1.2s; }
@keyframes flicker {
  0%   { transform: scale(1, 1);      opacity: .95; }
  40%  { transform: scale(.9, 1.1);   opacity: 1; }
  70%  { transform: scale(1.06, .93); opacity: .82; }
  100% { transform: scale(.97, 1.04); opacity: 1; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 40px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--cream);
  font: 400 .7rem/1 var(--f-body);
  letter-spacing: .32em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold-hi);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--bg); border-color: var(--gold-hi); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }

.btn--solid {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
  color: var(--bg);
  font-weight: 500;
}
.btn--solid::before { background: var(--cream); }

/* ---------- Gallery ---------- */

.gallery {
  /* one wall bay = the wall photo at full screen height */
  --bayw: calc(100vh * 1.6536);
  position: relative;
  background: var(--bg);
}

/* Pinned stage: while you scroll through the section, the wall slides sideways */
.gallery__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #140f0b;
}
.gallery__track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
}
.gallery__track.is-gliding { transition: transform 1.1s cubic-bezier(.65, 0, .25, 1); }

/* One bay of espresso wall: crown moulding and ceiling light above,
   pillars either side, skirting and marble floor below.
   Bays are cut through the middle of each pillar so they join seamlessly. */
.bay {
  position: relative;
  flex: 0 0 auto;
  width: var(--bayw);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("images/wall-bay.jpg") center / 100% 100% no-repeat;
  contain: layout paint;
  transform: translateZ(0);
}

.gallery__head {
  position: relative;
  max-width: 640px;
  padding: 0 24px;
  text-align: center;
}
.gallery__title {
  margin: 16px 0 0;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
}
.gallery__title em { font-style: italic; color: var(--gold-hi); }
.gallery__intro {
  max-width: 34em;
  margin: 18px auto 0;
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(237, 225, 204, .7);
}
.gallery__hint {
  margin: 34px 0 0;
  font-size: .66rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.gallery__hint span { display: inline-block; margin-left: 8px; animation: hintNudge 2s ease-in-out infinite; }
@keyframes hintNudge { 50% { transform: translateX(6px); } }

/* ---------- A single work ---------- */

.work {
  --fc: clamp(44px, 6.4vh, 78px);
  position: relative;
  margin-top: -6vh;            /* centre on the wall: between crown moulding and skirting */
  display: flex;
  align-items: center;
  gap: clamp(48px, 5.5vw, 96px);   /* breathing room between work and label */
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.3s var(--ease), transform 1.3s var(--ease);
}
.work .frame { --fc: inherit; }
.work.is-visible { opacity: 1; transform: none; }


/* warm pool of light on the wall behind the painting */
.work__art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14%;
  width: 180%;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 48%, rgba(201, 160, 147, .15), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease 1.2s;
}
.work.is-visible .work__art::before { opacity: 1; }

.work__art {
  position: relative;
  flex: 0 0 auto;
  /* fit between the crown moulding and the skirting, leaving room for the label */
  width: calc(min(44vh * var(--ar, 1.25), var(--bayw) * .44, 80vw) + var(--fc) * 1.106);
}

/* spotlight */
.spot {
  position: absolute;
  left: 50%;
  top: -48px;
  width: 100%;
  height: calc(48px + 80%);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
/* brass picture light: appears first */
.spot__lamp {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: 58%;
  height: auto;
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity .9s ease .2s, transform .9s var(--ease) .2s;
}
/* glow right under the lamp as it switches on */
.spot::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 70%;
  height: 70px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 226, 180, .3), transparent 75%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.2s ease .9s;
}
/* beam of light spreading slowly down the painting and wall */
.spot__beam {
  position: absolute;
  top: 10px;
  left: -15%;
  width: 130%;
  height: calc(100% - 10px);
  mix-blend-mode: screen;
  opacity: 0;
  transform-origin: 50% 0;
  transform: scaleY(.6);
  transition: opacity 2.2s ease 1.1s, transform 2.4s var(--ease) 1.1s;
}
.work.is-visible .spot__lamp { opacity: 1; transform: translate(-50%, 0); }
.work.is-visible .spot::before { opacity: 1; }
.work.is-visible .spot__beam { opacity: 1; transform: none; }
/* picture lights on paintings: a gentle warm wash that fades out
   in the upper part of the canvas instead of bleaching it */
.spot .spot__beam {
  height: 70%;
  -webkit-mask: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 100%);
          mask: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 40%, transparent 100%);
}
.work.is-visible .spot .spot__beam { opacity: .5; }

/* Carved walnut frame with gilt acanthus corners.
   The frame photo is split into nine pieces (border-image): the carved corners
   stay intact and the straight mouldings repeat to fit any painting shape.
   --fc is the size of one corner piece; the moulding depth follows from it. */
.frame {
  --fc: clamp(54px, 6.4vw, 88px);
  position: relative;
  z-index: 1;
  padding: calc(var(--fc) * .537) calc(var(--fc) * .553) calc(var(--fc) * .51);
  box-shadow: 0 26px 40px -12px rgba(0, 0, 0, .75), 0 8px 12px -4px rgba(0, 0, 0, .5);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: var(--fc) solid transparent;
  border-image: url("images/frame.png") 150 round;
}
.frame--lg { --fc: clamp(66px, 7.4vw, 108px); }

.frame__liner {
  position: relative;
  z-index: 1;
  background: #120d08;
}
/* soft shadow where the canvas meets the moulding */
.frame__liner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .55), inset 0 3px 6px rgba(0, 0, 0, .45);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #120d08;
}

.work:hover .frame {
  transform: translateY(-6px);
  box-shadow: 0 40px 56px -14px rgba(0, 0, 0, .8), 0 12px 16px -4px rgba(0, 0, 0, .55);
}

/* Museum wall label beside the painting */
.work__label {
  flex: 0 0 auto;
  width: 224px;
  align-self: center;
  padding: 22px 22px 18px;
  background: linear-gradient(170deg, #f2eadb, #e5d9c5);
  color: #2a211b;
  text-align: left;
  box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .75), 0 2px 4px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease .8s, transform 1s var(--ease) .8s;
}
.work.is-visible .work__label { opacity: 1; transform: none; }

.work__no {
  font: 500 .62rem/1 var(--f-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #8a5e52;
}
.work__title {
  margin: 10px 0 4px;
  font: italic 500 1.45rem/1.15 var(--f-display);
  color: #1e1713;
}
.work__artist {
  margin: 0 0 12px;
  font-size: .72rem;
  letter-spacing: .04em;
  color: #5a4a40;
}
.work__meta {
  margin: 0;
  font-size: .7rem;
  line-height: 1.6;
  color: #4a3d35;
}
.work__meta span { display: block; }
.work__desc {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 33, 27, .18);
  font-size: .72rem;
  line-height: 1.6;
  color: #3a2f28;
}
.work__price {
  margin: 12px 0 0;
  font: 500 1rem/1.2 var(--f-display);
  color: #1e1713;
}
.work__cta {
  margin-top: 12px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(138, 94, 82, .4);
  background: none;
  color: #8a5e52;
  font: 500 .6rem/1.4 var(--f-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}
.work:hover .work__cta, .work__cta:focus-visible { color: #1e1713; border-color: #1e1713; }

/* ---------- Objects on a pedestal (the violin) ---------- */

.work--object {
  align-self: flex-end;
  align-items: flex-end;
  margin: 0 0 6vh;              /* the pedestal stands on the marble floor */
}
.work--object .work__art {
  --objh: 40vh;                 /* height of the violin on its stand */
  --pedh: 40vh;                 /* height of the pedestal */
  width: calc(var(--pedh) * .648);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* violin + the soft shadow its stand casts on the marble top */
.object__stage {
  position: relative;
  z-index: 2;
  height: var(--objh);
  /* the stand sits a little way back on the top surface, not on the front edge */
  margin-bottom: calc(var(--pedh) * -.045);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 1.2s ease .5s, transform 1.4s var(--ease) .5s;
}
.object__piece {
  position: relative;
  z-index: 2;
  display: block;
  height: 100%;
  width: auto;
  /* bring the bright studio photo into the warm, low light of the room */
  filter:
    brightness(.86) contrast(1.04) saturate(.92) sepia(.1)
    drop-shadow(-4px 3px 3px rgba(20, 10, 4, .35))
    drop-shadow(-14px 10px 14px rgba(20, 10, 4, .3));
}
.object__contact {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -1.2%;
  width: 62%;
  height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(12, 6, 2, .75), rgba(12, 6, 2, .35) 45%, transparent 72%);
  filter: blur(3px);
}

/* pedestal, its shadow on the floor and a faint reflection in the marble */
.object__base {
  position: relative;
  z-index: 1;
  height: var(--pedh);
}
.object__pedestal {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  filter: brightness(.92);
}
/* darker toward the floor, lit from above */
.object__base::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 220, 170, .06), rgba(0, 0, 0, 0) 30%, rgba(10, 5, 2, .35) 100%);
  -webkit-mask: url("images/pedestal.webp") center / 100% 100% no-repeat;
          mask: url("images/pedestal.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
.object__floor {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -3.5%;
  width: 150%;
  height: 12%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 40%, rgba(8, 4, 2, .8), rgba(8, 4, 2, .3) 50%, transparent 72%);
  filter: blur(4px);
}
.object__reflection {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 100%;
  height: 100%;
  width: auto;
  max-width: none;
  transform: scaleY(-1);
  transform-origin: top;
  opacity: .16;
  filter: blur(2px) brightness(.8);
  -webkit-mask: linear-gradient(to bottom, #000, transparent 22%);
          mask: linear-gradient(to bottom, #000, transparent 22%);
  pointer-events: none;
}

.work--object .work__label { align-self: center; margin: 0 0 6vh; }
.work--object.is-visible .object__stage { opacity: 1; transform: none; }
.work--object:hover .object__stage { transform: translateY(-3px); }

/* ceiling downlight pooling on the violin */
.downlight {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(var(--pedh) - 2vh);
  width: 230%;
  height: 74vh;
  transform: translateX(-50%);
  pointer-events: none;
}
.downlight .spot__beam { top: 0; left: 0; width: 100%; height: 100%; transform-origin: 50% 0; }
.work--object.is-visible .downlight .spot__beam { opacity: .8; transform: none; }

/* in the detail view the violin stands free, without a frame */
.frame.is-object { padding: 0; box-shadow: none; }
.frame.is-object::after,
.frame.is-object .frame__liner::after { display: none; }
.frame.is-object .frame__liner,
.frame.is-object img { background: transparent; }
.frame.is-object img { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .6)); }

/* Portrait phones: one screen-wide bay per work, painting and label
   stacked and centred on the wall, nothing running off the edges */
@media (max-aspect-ratio: 4/5) {
  .gallery { --bayw: 100vw; }
  .bay { background-size: cover; background-position: center; }

  /* opening bay */
  .gallery__head { max-width: 100%; padding: 0 28px; }
  .gallery__title { font-size: 2.4rem; }
  .gallery__intro { font-size: .9rem; }
  .gallery__hint { margin-top: 26px; }

  /* each work: art above, label below, centred between moulding and floor */
  .work {
    --fc: clamp(34px, 9vw, 48px);
    flex-direction: column;
    gap: 22px;
    margin-top: -2vh;
  }
  .work__art { width: calc(min(30vh * var(--ar, 1.25), 72vw - var(--fc) * 1.106) + var(--fc) * 1.106); }
  .spot { top: -34px; height: calc(34px + 75%); }

  /* small museum card: title, one line of details, a short description */
  .work__label {
    width: min(74vw, 290px);
    padding: 11px 14px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 10px;
    align-items: baseline;
  }
  .work__no { grid-column: 1 / -1; font-size: .54rem; }
  .work__title { grid-column: 1 / -1; font-size: 1.1rem; margin: 4px 0 1px; }
  .work__artist { grid-column: 1 / -1; font-size: .62rem; margin-bottom: 5px; }
  .work__meta { grid-column: 1 / -1; font-size: .6rem; line-height: 1.5; }
  .work__meta span { display: inline; }
  .work__meta span + span::before { content: " · "; }
  .work__desc {
    grid-column: 1 / -1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 7px 0 0;
    padding-top: 7px;
    font-size: .64rem;
    line-height: 1.5;
  }
  .work__price { grid-column: 1; margin-top: 7px; font-size: .82rem; }
  .work__cta { grid-column: 2; margin-top: 7px; align-self: end; font-size: .5rem; letter-spacing: .18em; }

  /* violin: smaller pedestal so the label fits above the floor */
  /* violin: card on top, pedestal standing on the floor below it */
  .work--object { align-self: flex-end; align-items: center; gap: 4vh; margin: 0 0 7vh; }
  .work--object .work__art { --objh: 24vh; --pedh: 19vh; }
  .work--object .work__label { order: -1; margin: 0; align-self: center; position: relative; z-index: 4; }
  .downlight { height: 46vh; }
  .object__reflection { display: none; }
}

}




/* ---------- Fixed ambient layer ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
body.in-gallery:not(.at-close) .ambient { opacity: 1; }

.ambient__side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 14vw, 220px);
}
.ambient__side--l { left: 0;  background: linear-gradient(to right, rgba(8, 6, 4, .5), transparent); }
.ambient__side--r { right: 0; background: linear-gradient(to left,  rgba(8, 6, 4, .5), transparent); }
.ambient__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16vh;
  background: linear-gradient(to top, rgba(8, 6, 4, .7), transparent);
}
.ambient__chandelier {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  width: 84px;
  height: auto;
  aspect-ratio: 200 / 150;
  transform: translate(-50%, -12px);
  filter: drop-shadow(0 0 14px rgba(201, 160, 147, .45));
}

/* ---------- Closing ---------- */

.closing {
  position: relative;
  text-align: center;
  padding: clamp(120px, 20vh, 200px) 24px clamp(60px, 10vh, 100px);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 160, 147, .08), transparent 70%),
    var(--bg);
}
.closing__title {
  margin: 18px 0 0;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
}
.closing__title em { font-style: italic; color: var(--gold-hi); }
.closing__text {
  max-width: 36em;
  margin: 24px auto 0;
  font-size: .98rem;
  line-height: 1.8;
  color: var(--muted);
}
.closing__email {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 1px solid #5c4842;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  color: var(--cream);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .4s ease, border-color .4s ease;
}
.closing__email:hover { color: var(--gold-hi); border-color: var(--gold-hi); }

.footer {
  margin-top: clamp(80px, 14vh, 140px);
  font-size: .64rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  overflow-y: auto;
  background: rgba(8, 6, 4, .8);
  -webkit-backdrop-filter: blur(16px) saturate(.8);
  backdrop-filter: blur(16px) saturate(.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease;
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  transform: translateY(24px) scale(.98);
  transition: transform .6s var(--ease);
}
.modal.is-open .modal__dialog { transform: none; }

.modal__art {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.modal__art .frame { display: inline-block; }
.modal__art .frame img { width: auto; }

.modal__info { max-width: 460px; }
.modal__no {
  margin: 0;
  font-family: var(--f-display);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.modal__title {
  margin: 12px 0 28px;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1;
}
.modal__desc {
  margin: -8px 0 28px;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--cream);
  opacity: .85;
}
.modal__desc p { margin: 0 0 1em; }
.modal__desc p:last-child { margin-bottom: 0; }
.modal__desc[hidden] { display: none; }
.modal__meta[hidden], .modal__meta div[hidden] { display: none; }
.modal__meta {
  margin: 0 0 30px;
  border-top: 1px solid #5c4842;
}
.modal__meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #5c4842;
  font-size: .85rem;
}
.modal__meta dt { color: var(--muted); letter-spacing: .08em; }
.modal__meta dd { margin: 0; color: var(--cream); text-align: right; }
.modal__price {
  margin: 0 0 8px;
  font-family: var(--f-display);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--gold-hi);
}
.modal__note {
  margin: 0 0 32px;
  font-size: .76rem;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--muted);
}

.modal__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #5c4842;
  border-radius: 50%;
  background: rgba(15, 12, 9, .6);
  color: var(--cream);
  cursor: pointer;
  transition: border-color .3s ease, transform .4s var(--ease);
}
.modal__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}
.modal__close:hover { border-color: var(--gold-hi); transform: rotate(90deg); }

@media (max-width: 820px) {
  .modal { align-items: flex-start; }
  .modal__dialog { grid-template-columns: 1fr; padding-top: 84px; }
  .modal__info { max-width: none; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 15px 24px;
  border: 1px solid var(--gold);
  background: var(--wall);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .8);
  color: var(--cream);
  font-size: .85rem;
  letter-spacing: .03em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Gallery arrows ---------- */

.walk-nav {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
body.in-walk .walk-nav { opacity: 1; visibility: visible; transition: opacity .5s ease; }
body.modal-open .walk-nav { opacity: 0; visibility: hidden; }

.walk-nav__btn {
  position: absolute;
  top: 50%;
  width: 72px;
  height: 120px;
  margin-top: -60px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  cursor: pointer;
  pointer-events: auto;
  opacity: .82;
  /* soft shadow so the arrow reads on light paintings and on the wall */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .75)) drop-shadow(0 0 14px rgba(0, 0, 0, .45));
  transition: opacity .3s ease, color .3s ease, transform .35s var(--ease);
}
.walk-nav__btn svg {
  width: 46px;
  height: 92px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.walk-nav__btn--prev { left: clamp(6px, 1.6vw, 28px); }
.walk-nav__btn--next { right: clamp(6px, 1.6vw, 28px); }
.walk-nav__btn[hidden] { display: none; }
.walk-nav__btn:hover, .walk-nav__btn:focus-visible { opacity: 1; color: var(--gold-hi); }
.walk-nav__btn--prev:hover { transform: translateX(-5px); }
.walk-nav__btn--next:hover { transform: translateX(5px); }
.walk-nav__btn:focus-visible { outline: none; }

.walk-nav__count {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.5vh, 30px);
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(15, 12, 9, .6);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: var(--cream);
}
.walk-nav__count b { font: italic 400 1.05rem/1 var(--f-display); }
.walk-nav__count span { font-size: .66rem; letter-spacing: .2em; color: var(--gold-hi); }

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 36px);
  bottom: clamp(18px, 3.5vh, 30px);
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--gold-hi);
  border-radius: 999px;
  background: rgba(15, 12, 9, .7);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: var(--cream);
  font: 500 .66rem/1 var(--f-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .4s var(--ease), visibility 0s linear .4s, background-color .3s ease, color .3s ease;
}
.to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .4s var(--ease), background-color .3s ease, color .3s ease; }
.to-top:hover, .to-top:focus-visible { background: var(--gold-hi); color: var(--bg); }
body.modal-open .to-top { opacity: 0; visibility: hidden; }
.hero:focus { outline: none; }

/* in the gallery on wide screens, keep Top clear of the right arrow */
body.in-walk .to-top { bottom: clamp(18px, 3.5vh, 30px); }

@media (max-width: 700px) {
  /* phones: plain arrows at the middle of each side, counter along the bottom */
  .walk-nav__btn { width: 44px; height: 96px; margin-top: -48px; }
  .walk-nav__btn svg { width: 30px; height: 64px; stroke-width: 1.5; }
  .walk-nav__btn--prev { left: 0; }
  .walk-nav__btn--next { right: 0; }
  .walk-nav__count { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 5px); padding: 9px 14px; gap: 10px; max-width: calc(100vw - 100px); }
  .walk-nav__count b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .to-top span { display: none; }
  .to-top { padding: 12px; }
  /* round Top button at the bottom right */
  .to-top { width: 44px; height: 44px; padding: 0; justify-content: center; right: 14px; }
}

/* ---------- Contact button + box ---------- */

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid var(--gold-hi);
  border-radius: 999px;
  background: rgba(15, 12, 9, .35);
  color: var(--cream);
  font: 500 .68rem/1 var(--f-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.contact-btn span { transition: transform .3s var(--ease); }
.contact-btn:hover, .contact-btn:focus-visible { background: var(--gold-hi); color: var(--bg); }
.contact-btn:hover span { transform: translateX(3px); }

.contact-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 6, 4, .72);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.contact-sheet.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }

.contact-sheet__card {
  position: relative;
  width: min(420px, 100%);
  padding: 34px 30px 26px;
  border: 1px solid #5c4842;
  border-radius: 6px;
  background: linear-gradient(170deg, #1d1712, #120e0b);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9);
  text-align: center;
  transform: translateY(14px) scale(.98);
  transition: transform .45s var(--ease);
}
.contact-sheet.is-open .contact-sheet__card { transform: none; }

.contact-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s ease, background-color .2s ease;
}
.contact-sheet__close:hover, .contact-sheet__close:focus-visible { opacity: 1; background: rgba(237, 225, 204, .08); }
.contact-sheet__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.contact-sheet__eyebrow {
  margin: 0;
  font-size: .6rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.contact-sheet__title {
  margin: 10px 0 6px;
  font: 300 2.2rem/1.1 var(--f-display);
  color: var(--cream);
}
.contact-sheet__title em { font-style: italic; color: #d4ada0; }
.contact-sheet__lead {
  margin: 0 0 22px;
  font-size: .85rem;
  line-height: 1.6;
  color: rgba(237, 225, 204, .7);
}

.contact-sheet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #5c4842;
  border-radius: 6px;
  background: rgba(237, 225, 204, .03);
  color: var(--cream);
  text-align: left;
  text-decoration: none;
  transition: border-color .25s ease, background-color .25s ease;
}
.contact-option:hover, .contact-option:focus-visible { border-color: var(--gold-hi); background: rgba(201, 160, 147, .08); }
.contact-option__icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #5c4842;
  color: var(--gold-hi);
}
.contact-option__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.contact-option__text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.contact-option__text b { font: 400 1.15rem/1 var(--f-display); }
.contact-option__text span { font-size: .74rem; color: rgba(237, 225, 204, .65); overflow-wrap: anywhere; }
.contact-option__arrow { color: var(--gold-hi); transition: transform .25s var(--ease); }
.contact-option:hover .contact-option__arrow { transform: translateX(4px); }

/* small phones: name and Contact share the bar without crowding */
@media (max-width: 520px) {
  .topbar { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .brand { align-items: flex-start; gap: 5px; min-width: 0; }
  .brand__name { font-size: 1.05rem; letter-spacing: .12em; }
  .brand__role { font-size: .46rem; letter-spacing: .16em; margin-right: 0; }
  .contact-btn { flex: none; padding: 9px 15px; font-size: .6rem; letter-spacing: .16em; }
  .contact-btn span { display: none; }
  .contact-sheet__card { padding: 30px 20px 20px; }
}

/* ---------- Tablets ---------- */

/* Portrait tablets (iPad mini, iPad, iPad Pro): same stacked layout as phones,
   but sized up so the art and the card fill the wall properly */
@media (max-aspect-ratio: 4/5) and (min-width: 700px) {
  .work { --fc: clamp(50px, 6.4vw, 76px); gap: clamp(40px, 4.6vh, 64px); margin-top: -1vh; }
  .work__art { width: calc(min(36vh * var(--ar, 1.25), 78vw - var(--fc) * 1.106) + var(--fc) * 1.106); }
  .spot { top: -46px; height: calc(46px + 75%); }

  .work__label { width: min(64vw, 500px); padding: 24px 28px 20px; column-gap: 16px; }
  .work__no { font-size: .72rem; }
  .work__title { font-size: clamp(1.7rem, 3.2vw, 2.1rem); margin: 8px 0 4px; }
  .work__artist { font-size: .86rem; margin-bottom: 10px; }
  .work__meta { font-size: .84rem; }
  .work__desc { font-size: .9rem; line-height: 1.6; margin-top: 12px; padding-top: 12px; -webkit-line-clamp: 3; }
  .work__price { font-size: 1.2rem; margin-top: 12px; }
  .work__cta { font-size: .66rem; margin-top: 12px; }

  /* violin: card above, pedestal on the floor, both larger */
  .work--object { gap: 5vh; margin-bottom: 7vh; }
  .work--object .work__art { --objh: 30vh; --pedh: 22vh; }

  /* hero and opening bay */
  .hero__eyebrow { font-size: .78rem; }
  .hero__quote p { font-size: clamp(2rem, 4.6vw, 2.9rem); }
  .hero__quote figcaption { font-size: .76rem; }
  .gallery__title { font-size: clamp(3rem, 6.4vw, 4rem); }
  .gallery__intro { font-size: 1.05rem; }

  /* detail view: picture on top, text underneath */
  .modal { align-items: flex-start; }
  .modal__dialog { grid-template-columns: 1fr; max-width: 760px; padding-top: 84px; }
  .modal__info { max-width: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .work { transform: none; }
}
