/* ===========================================================
   SPALMA — a small museum of peanut butter
   Exhibition-catalog aesthetic · paper, ink, brass
   =========================================================== */

:root{
  /* paper & ink */
  --paper:      #f3ecdf;   /* warm gallery wall            */
  --paper-2:    #ece2cf;   /* deeper panel                 */
  --paper-3:    #e4d8c0;   /* deepest, frame mat shadow    */
  --ink:        #1b1813;   /* warm near-black              */
  --ink-soft:   #4a4338;   /* muted body ink               */
  --ink-faint:  #8a7f6c;   /* captions / metadata          */

  /* accents */
  --brass:      #9c7c3f;   /* hairlines, accession no.     */
  --brass-lt:   #c2a25c;
  --wheat:      #d8a94c;
  --sky:        #7f9fbf;   /* whisper of the painting sky  */
  --ember:      #b4521f;

  /* type */
  --display: "Fraunces", Georgia, serif;
  --body:    "Newsreader", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --hair: rgba(27,24,19,.16);
}

/* ---------- reset ---------- */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar{width:0;height:0;display:none}
body{
  font-family:var(--body);
  background:var(--paper);
  color:var(--ink);
  font-size:clamp(1rem,.62rem + .7vw,1.18rem);
  line-height:1.65;
  font-weight:340;
  overflow-x:hidden;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
em{font-style:italic}

/* paper grain overlay */
.grain{
  position:fixed;inset:0;width:100%;height:100%;
  pointer-events:none;z-index:9999;
  opacity:.05;mix-blend-mode:multiply;
}

/* ---------- shared type ---------- */
.display{
  font-family:var(--display);
  font-weight:400;
  font-optical-sizing:auto;
  line-height:1.04;
  letter-spacing:-.015em;
  font-size:clamp(2rem,1.1rem + 3.6vw,3.9rem);
}
.eyebrow,.kicker,.acc,.med,.status,.nav-links a,.nav-cta,
.section-marquee,.art-note,.opening-meta .k,.panel-tab,.m-no,
.spec dt{
  font-family:var(--mono);
  text-transform:lowercase;
  letter-spacing:.14em;
  font-size:.72rem;
}
.sc{font-family:var(--mono);font-size:.82em;letter-spacing:.08em;color:var(--brass);}

.rule{height:1px;background:var(--hair);width:100%}

/* ---------- masthead ---------- */
.masthead{position:fixed;top:0;left:0;width:100%;z-index:200;background:var(--paper)}
.nav{
  /* full-width like the left-anchored hero below: past --maxw a centered nav
     drifted right of the headline and the links stopped short of the edge */
  display:flex;align-items:center;gap:2rem;
  padding:.85rem var(--gutter);
}
.wordmark{
  font-family:var(--display);
  font-weight:400;
  letter-spacing:-.02em;
  font-size:1.6rem;
  line-height:1;
}
.nav-links{display:flex;gap:1.8rem;list-style:none;margin-left:auto}
.nav-links a{color:var(--ink-soft);position:relative;padding-bottom:2px;transition:color .25s}
.nav-links a::after{content:"";position:absolute;left:0;bottom:-1px;width:0;height:1px;background:var(--brass);transition:width .3s ease}
.nav-links a:hover{color:var(--ink)}
.nav-links a:hover::after{width:100%}
.nav-cta{
  border:1px solid var(--ink);border-radius:2px;
  padding:.55rem .9rem;color:var(--ink);
  transition:background .3s,color .3s;
}
.nav-cta:hover{background:var(--ink);color:var(--paper)}

/* ---------- hero (the rising curtain) ---------- */
/* The hero is the top layer. The campfire (.reveal-pin) is pinned to the
   viewport behind it. As you scroll, the hero lifts up and away, its shadowed
   hem dragging upward to uncover the campfire — like a curtain raising. */
.hero{
  position:relative;z-index:5;min-height:100vh;
  display:flex;align-items:center;overflow:hidden;
  background:var(--paper);                 /* opaque base hides the pinned campfire */
  padding-top:clamp(4.5rem,8vh,6.5rem);    /* clear the fixed header + breathing room */
  border-bottom:1px solid rgba(20,16,10,.55);
  box-shadow:0 54px 80px -10px rgba(20,16,10,.78), 0 20px 34px -12px rgba(20,16,10,.5);
}
.reveal-pin{
  position:fixed;top:0;left:0;width:100%;min-height:100vh;z-index:1;
}
/* once the campfire has been read, the rest rises up over it in turn.
   just enough margin to reveal the brown section, then the paper stage
   rises over it — no long pinned hold */
.stage{
  position:relative;z-index:3;
  margin-top:150vh;
  background:var(--paper);
  border-top:1px solid rgba(20,16,10,.55);
  box-shadow:0 -54px 80px -10px rgba(20,16,10,.78), 0 -20px 34px -12px rgba(20,16,10,.5);
}
.footer{position:relative;z-index:3;background:var(--paper)}

/* ---------- the reveal · it's art ---------- */
.reveal-art{
  position:relative;min-height:98vh;
  display:flex;align-items:center;
  padding:clamp(3rem,9vh,7rem) var(--gutter);
}
.reveal-art .work{width:clamp(15rem,23vw,22rem);position:relative;z-index:2}
.art-statement{
  position:absolute;inset:0;margin:0;pointer-events:none;
  display:flex;align-items:center;justify-content:center;text-align:center;
  font-family:var(--display);font-weight:430;color:var(--ink);
  /* same face & size as the hero "peanut" word */
  font-size:clamp(3.6rem,1rem + 9vw,10.4rem);line-height:.84;letter-spacing:-.035em;
}
.art-statement em{font-style:italic;color:var(--brass);margin-left:.22em}
.hero-bg{
  position:absolute;inset:clamp(4.5rem,8vh,6.5rem) 0 0 0;  /* starts below the header */
  background:url("Firefly.png") no-repeat;
  background-size:cover;
  background-position:center;
  /* the photo's studio backdrop is a grayer white than --paper: dissolve its
     top edge into the page instead of cutting a seam under the masthead */
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 7%);
  mask-image:linear-gradient(to bottom,transparent,#000 7%);
}
.hero-veil{
  position:absolute;inset:0;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(243,236,223,.5) 13%, rgba(243,236,223,0) 33%, rgba(243,236,223,0) 67%, rgba(243,236,223,.5) 87%, var(--paper) 100%);
}
.hero-inner{
  position:relative;z-index:3;
  /* left-anchored, not maxw-centered: on wide screens centering pushed the
     headline into the (always viewport-centered) jar photo */
  width:100%;
  padding:0 var(--gutter);
  display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;
}
.hero-title.right{text-align:right}
.eyebrow{color:var(--brass);display:block;margin-bottom:1.4rem}
.hero-title{font-family:var(--display);font-weight:400;line-height:.84;letter-spacing:-.035em;font-size:clamp(3.6rem,1rem + 9vw,10.4rem);margin-bottom:0}
.hero-title .lead{
  display:block;font-size:.26em;line-height:1;font-style:italic;font-weight:400;
  letter-spacing:.01em;color:var(--ink);margin-bottom:.08em;
}
.hero-title .big{display:block;color:var(--ink);font-weight:430}
.hero-title .big + .big{margin-top:.22em}
/* right side mirrors the left: same scale, black lead, but "art" is one
   word sized to stand as tall as the two stacked words on the left */
.hero-title .artword{
  display:block;font-style:italic;font-weight:400;color:var(--brass);
  font-size:2.34em;line-height:.74;letter-spacing:-.035em;margin-top:-.02em;
}
.hero-lede{font-size:1.15rem;color:var(--ink-soft);margin-bottom:1.6rem;max-width:30rem}
.hero-lede em{color:var(--ink)}
.hero-stmt{
  font-family:var(--display);font-style:italic;font-weight:380;
  font-size:1.18rem;line-height:1.45;color:var(--ink);
  padding-left:1.1rem;border-left:2px solid var(--brass);
  margin-bottom:2.2rem;max-width:28rem;
}
.hero-actions{display:flex;gap:1rem;flex-wrap:wrap}

.btn{font-family:var(--mono);font-size:.74rem;letter-spacing:.12em;text-transform:lowercase;padding:.9rem 1.5rem;border-radius:2px;transition:all .3s;display:inline-block}
.btn-solid{background:var(--ink);color:var(--paper);border:1px solid var(--ink)}
.btn-solid:hover{background:transparent;color:var(--ink);transform:translateY(-2px)}
.btn-ghost{border:1px solid var(--hair);color:var(--ink-soft)}
.btn-ghost:hover{border-color:var(--ink);color:var(--ink)}

.hero-placard{
  position:absolute;z-index:3;right:var(--gutter);bottom:2.4rem;
  display:flex;flex-direction:column;gap:.25rem;text-align:right;
  padding:.9rem 1.1rem;background:rgba(243,236,223,.7);
  border:1px solid var(--hair);
}
.hero-placard .acc{color:var(--brass)}
.hero-placard .ttl{font-family:var(--display);font-style:italic;font-size:1.05rem;letter-spacing:0;text-transform:none}
.hero-placard .med{color:var(--ink-faint)}

/* ---------- generic panel ---------- */
.panel{position:relative;max-width:var(--maxw);margin:0 auto;padding:clamp(4rem,8vw,7.5rem) var(--gutter)}
.panel-tab{
  position:absolute;top:0;left:var(--gutter);transform:translateY(-50%);
  background:var(--ink);color:var(--paper);padding:.4rem .8rem;color:var(--brass-lt);
}
.kicker{color:var(--brass);display:block;margin-bottom:1rem}
.kicker.light{color:var(--brass-lt)}

/* concept — the doors that open into the collection */
.concept{border-top:1px solid var(--hair)}

/* tall scroll track gives the doors room to swing as you scroll */
.door-track{position:relative;height:230vh}
/* jump target for the nav's "the gallery" link — 110vh in ≈ doors fully open */
.gallery-anchor{position:absolute;top:110vh;height:1px;width:1px}
/* sticky stage pins to the viewport while the leaves open */
.door-stage{
  position:sticky;top:0;height:100vh;overflow:hidden;
  perspective:1250px;perspective-origin:50% 50%;
  background:var(--paper);
}

/* the collection waiting behind the doors: a gallery hall you walk through */
.door-void{
  position:absolute;inset:0;z-index:0;
  background:var(--paper);
}

/* the room itself — a warm-lit hall with depth. No `perspective` here: the
   floor carries its own perspective() transform, because a perspective
   context nested inside the door stage's made desktop Firefox misproject
   the floor while the leaves were mid-swing. */
.gallery{
  position:absolute;inset:0;overflow:hidden;
  background:#f5f0e4;   /* the wall; the floor is its own receding plane */
}

.hall-ceiling{display:none}   /* no dark lintel */

/* the gallery floor — light stone tiles in perspective, scrolling with the walk */
.hall-floor{
  position:absolute;left:-45%;right:-45%;bottom:0;height:42%;z-index:0;
  /* self-contained projection, identical to the old .gallery perspective:
     vanishing point 56vh down the stage = 2vh above this box; pivot at the
     bottom edge, 44vh below it. Far edge still lands on the baseboard. */
  transform-origin:50% -2vh;
  transform:perspective(119vh) translateY(44vh) rotateX(83.5deg) translateY(-44vh);
  background-color:#e4ddce;
  background-image:
    linear-gradient(90deg, rgba(58,50,36,.16) 0 1.5px, transparent 1.5px),   /* vertical grout (moves) */
    linear-gradient(0deg,  rgba(58,50,36,.16) 0 1.5px, transparent 1.5px),   /* tile rows (static)     */
    linear-gradient(180deg,#ece6da,#dbd4c6);                                  /* light falls toward you */
  background-size:104px 100%, 100% 132px, 100% 100%;
  background-repeat:repeat,repeat,no-repeat;
  background-position:0 0,0 0,0 0;
  animation:floorpan 3.65s linear infinite;   /* measured to match the wall at the junction */
}
@keyframes floorpan{ to{ background-position:-104px 0, 0 0, 0 0; } }
/* a faint polished sheen — kept low so it never washes out the tiles near the wall */
.hall-floor::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(95% 80% at 50% 42%, rgba(255,250,238,.13), transparent 84%);
}

/* the one thing kept: a clean barrier between wall and floor */
.hall-baseboard{
  position:absolute;left:0;right:0;bottom:15%;height:14px;z-index:1;
  background:linear-gradient(180deg,rgba(20,13,7,0),rgba(20,13,7,.16));
  border-bottom:1px solid rgba(42,28,14,.42);
}

/* the picture rail — an endless wall of works that walks past */
.hall-rail{position:absolute;left:0;right:0;top:21%;height:50%;z-index:2;overflow:visible}
.hall-pace{
  position:absolute;left:0;top:0;height:100%;display:flex;align-items:center;
  will-change:transform;animation:walk 120s linear infinite;
}
@keyframes walk{ from{transform:translate3d(0,0,0)} to{transform:translate3d(-50%,0,0)} }

.bay{
  position:relative;flex:0 0 auto;
  display:flex;flex-direction:column;align-items:center;
  margin-right:clamp(5rem,9.5vw,11rem);
}
.hung{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:.72rem}
.bay .frame{
  /* vh cap keeps frame + label above the floor line on short windows;
     the rem ceiling is loose so 20vw keeps scaling on wide screens */
  width:min(clamp(11rem,20vw,24rem),36vh);
  padding:.5rem;                               /* a near-black molding        */
  background:linear-gradient(135deg,#2b2825 0%,#15120f 55%,#0b0907 100%);  /* near-black molding */
  box-shadow:
    inset 1.5px 1.5px 1px rgba(128,122,112,.5),  /* edge catches light, top-left */
    inset -2px -2px 3px rgba(0,0,0,.85),          /* and falls dark, bottom-right */
    0 22px 36px -12px rgba(10,7,4,.62),           /* soft cast shadow on the wall */
    0 8px 16px -6px rgba(10,7,4,.5);
}
.bay .frame::after{inset:.5rem;border-color:rgba(255,250,240,.06);opacity:1}  /* faint inner line */
.bay .mat{padding:.2rem;box-shadow:none}       /* slim white mat between painting and frame */
.bay .art{aspect-ratio:4/5}
.bay .art-note{display:none}

.downlight{display:none}   /* no spotlight cones */
/* the pool of light it leaves on the floor */
.floorpool{display:none}   /* no floor, no light pool */

/* the little wall label beneath each work */
/* the label floats out of flow, so revealing it never shifts the painting */
.vinyl{
  position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:.6rem;
  display:flex;flex-direction:column;align-items:center;gap:.12rem;text-align:center;
  border:0;padding:0;width:max-content;max-width:clamp(10rem,15vw,14rem)}
.vinyl .acc{font-family:var(--mono);font-size:.56rem;letter-spacing:.16em;color:var(--brass)}
.vinyl .ttl{font-family:var(--display);font-style:italic;font-size:.95rem;line-height:1.1;color:var(--ink-soft)}
.vinyl .med{color:var(--ink-faint)}

/* hover (or touch-lift) the painting itself: the whole walk (wall + floor)
   pauses, only over a work. The :hover halves are gated to real-hover
   devices: touch browsers keep :hover stuck on the last tapped element,
   which held the lift (and the paused walk) forever after a tap. */
.gallery:has(.frame.lifted) .hall-pace,
.gallery:has(.frame.lifted) .hall-floor{animation-play-state:paused}
.bay .frame{
  transition:transform .45s cubic-bezier(.2,.7,.2,1),box-shadow .45s ease;transform-origin:center bottom;
  /* touch: script lifts on tap/hold, so no long-press callout / selection */
  touch-action:manipulation;-webkit-touch-callout:none;user-select:none;
}
.bay:has(.frame.lifted){z-index:10}
.bay .frame.lifted{
  transform:scale(1.22) translateY(-4px);
  box-shadow:
    inset 1.5px 1.5px 1px rgba(128,122,112,.55),
    inset -2px -2px 3px rgba(0,0,0,.85),
    0 30px 46px -14px rgba(10,7,4,.6),
    0 10px 20px -6px rgba(10,7,4,.48);
}
@media (hover:hover){
  .gallery:has(.frame:hover) .hall-pace,
  .gallery:has(.frame:hover) .hall-floor{animation-play-state:paused}
  .bay:has(.frame:hover){z-index:10}
  .bay .frame:hover{
    transform:scale(1.22) translateY(-4px);
    box-shadow:
      inset 1.5px 1.5px 1px rgba(128,122,112,.55),
      inset -2px -2px 3px rgba(0,0,0,.85),
      0 30px 46px -14px rgba(10,7,4,.6),
      0 10px 20px -6px rgba(10,7,4,.48);
  }
  .bay .frame:hover ~ .vinyl .med{opacity:1;max-height:3rem;transform:none;margin-top:.2rem}
}
/* the flavor tags stay hidden until you hover (or touch-lift) the painting */
.vinyl .med{
  opacity:0;max-height:0;overflow:hidden;margin-block:0;
  transform:translateY(4px);
  transition:opacity .4s ease,max-height .4s ease,transform .4s ease;
}
.bay .frame.lifted ~ .vinyl .med{opacity:1;max-height:3rem;transform:none;margin-top:.2rem}

/* while the 3D doors are swinging, the hall stands still — the floor pan and
   the painting walk only start once the leaves are fully open (script toggles
   .doors-open at --p = 1). Scoped to viewports where the 3D doors are active;
   the flat fallback (short windows / reduced motion) never gets the class.
   `animation:none` (not `paused`) so the floor/rail hold no compositor layer
   mid-swing: a paused animation still promotes its element, and in Firefox a
   promoted layer inside the sticky stage shears upward during async wheel
   scrolling — the floor visibly rode up the wall while the doors opened. */
@media (min-height:561px) and (prefers-reduced-motion:no-preference){
  .door-stage:not(.doors-open) .hall-floor,
  .door-stage:not(.doors-open) .hall-pace{animation:none}
  .door-stage:not(.doors-open) .hall-pace{will-change:auto}
  /* the leaves fade out over the last ~15% of the swing: at 118° a wedge of
     door face (and its brass edge, front-facing again past 90°) can still
     poke in from the sides — how much depends on viewport size */
  .leaf{opacity:clamp(0, calc(6.67 - 6.67 * var(--p, 0)), 1)}
}
/* the sticky stage rides scroll as one compositor unit, so its 3D innards
   can't lag the scroll offset */
.door-stage{will-change:transform}
/* nothing in the hall animates while the gallery is off-screen (script
   toggles .offstage from an IntersectionObserver) — the endless walk, floor
   pan and dust motes otherwise burn paint time for the whole page life */
.door-stage.offstage .hall-pace,
.door-stage.offstage .hall-floor,
.door-stage.offstage .hall-motes i{animation-play-state:paused}

/* dust caught in the light */
.hall-motes{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.hall-motes i{
  position:absolute;width:3px;height:3px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,242,212,.9),rgba(255,242,212,0) 70%);
  animation:mote linear infinite;
}
.hall-motes i:nth-child(1){left:12%;top:40%;animation-duration:13s;animation-delay:-2s}
.hall-motes i:nth-child(2){left:28%;top:62%;animation-duration:17s;animation-delay:-6s}
.hall-motes i:nth-child(3){left:44%;top:33%;animation-duration:15s;animation-delay:-9s;transform:scale(1.3)}
.hall-motes i:nth-child(4){left:59%;top:55%;animation-duration:19s;animation-delay:-3s}
.hall-motes i:nth-child(5){left:72%;top:38%;animation-duration:14s;animation-delay:-11s}
.hall-motes i:nth-child(6){left:84%;top:60%;animation-duration:18s;animation-delay:-7s;transform:scale(.8)}
.hall-motes i:nth-child(7){left:50%;top:70%;animation-duration:16s;animation-delay:-13s}
@keyframes mote{
  0%{transform:translateY(0) translateX(0);opacity:0}
  15%{opacity:.8}
  85%{opacity:.7}
  100%{transform:translateY(-46px) translateX(14px);opacity:0}
}

.hall-vignette{display:none}   /* no edge/corner shadows */

/* "The Collection" engraved on the lintel above the hall */
.hall-sign{
  /* engraved on the wall, so it sits behind the rail (z2): a hovered/lifted
     painting must rise OVER the lettering, not slide under it */
  position:absolute;z-index:1;right:var(--gutter);top:clamp(7rem,16vh,10.5rem);
  text-align:right;pointer-events:none;
}
.hall-sign .sign-k{
  display:block;font-family:var(--mono);font-size:.6rem;letter-spacing:.36em;
  text-transform:uppercase;color:var(--brass);margin-bottom:.34rem;
}
.hall-sign .display{
  margin:0;font-family:var(--mono);font-weight:500;
  text-transform:lowercase;letter-spacing:.22em;
  font-size:clamp(1rem,2.3vw,1.6rem);line-height:1;color:var(--ink);
}

/* fallback title — hidden while the 3D hall is shown */
.door-reveal{display:none}
.door-reveal .display{margin:0}

/* phone door mode bits — off until the split-headline media query turns them on */
.door-head{display:none}
.concept-body-stacked{display:none}

@media (prefers-reduced-motion:reduce){
  .hall-pace,.hall-floor{animation:none}
  .hall-motes{display:none}
}

/* the two door leaves — solid slabs with thickness, panels and a brass pull */
.leaf{
  position:absolute;top:-30%;height:160%;width:50.4%;z-index:2;
  background:var(--paper);
  display:flex;align-items:center;
  transform-style:preserve-3d;backface-visibility:hidden;will-change:transform;
}
.leaf-left{
  left:0;justify-content:flex-end;
  transform-origin:left center;
  transform:translateZ(calc(var(--p) * 40px)) rotateY(calc(var(--p) * 118deg));
}
.leaf-right{
  right:0;justify-content:flex-start;
  transform-origin:right center;
  transform:translateZ(calc(var(--p) * 40px)) rotateY(calc(var(--p) * -118deg));
}
.leaf-inner{position:relative;z-index:1;width:100%;padding:0 clamp(1.5rem,4vw,4rem);box-sizing:border-box}
.leaf-left .leaf-inner{max-width:46rem}
.leaf-right .leaf-inner{max-width:42rem}

/* the door's thickness — a side face perpendicular to the panel, seen as it swings */
.leaf-edge{
  position:absolute;top:0;height:100%;width:30px;
  background:linear-gradient(90deg,#8a7b5a,#564b38);
  backface-visibility:hidden;
}
.leaf-left .leaf-edge{right:0;transform-origin:right center;transform:rotateY(-90deg)}
.leaf-right .leaf-edge{left:0;transform-origin:left center;transform:rotateY(90deg)}

.concept-head{text-align:center}
.concept-head .hero-title{font-size:clamp(3.6rem,1rem + 8.8vw,10.6rem)}
.concept-head .big + .big{margin-top:.02em}
.concept-head .display{margin-top:.3rem}
.lead-cap{font-size:1.22rem;color:var(--ink);margin-bottom:1.3rem}
.lede-open{
  display:block;font-family:var(--display);font-weight:400;
  font-size:1.7rem;line-height:1.12;color:var(--ink-soft);
  letter-spacing:-.01em;margin-bottom:.6rem;
}
.concept-body p{color:var(--ink-soft);margin-bottom:1.1rem}
.concept-body em{font-style:italic;color:var(--brass)}
.concept-body p:last-child{margin-bottom:0}

/* phones tall enough to pin keep the 3D swinging doors. The paragraphs can't
   fit on a 50%-wide leaf, so the headline is painted across BOTH closed doors
   (each leaf clips its half of one full-width copy) and splits down the middle
   as they swing open; the wall text follows as a normal block after the track. */
@media (max-width:760px) and (min-height:561px){
  .leaf{overflow:hidden}
  .leaf-inner{display:none}   /* headline + paragraphs leave the door faces */
  .door-head{
    display:block;position:absolute;top:50%;left:0;width:100vw;
    transform:translateY(-50%);padding:0 var(--gutter);box-sizing:border-box;
  }
  /* align the right leaf's copy to the same spot on screen as the left one */
  .leaf-right .door-head{left:calc(100% - 100vw)}
  /* the headline owns the whole door face on a phone — let it shout */
  .door-head .hero-title{font-size:clamp(4.5rem,1rem + 14vw,10.6rem)}
  /* larger works on the phone hall wall */
  .bay .frame{width:min(64vw,17rem)}
  .concept-body-stacked{display:block;background:var(--paper);padding:clamp(2.5rem,8vw,5rem) var(--gutter)}
  .concept-body-stacked .concept-body{max-width:42rem;margin:0 auto}
  /* no hover on touch: flavor tags stay visible under the frames */
  .vinyl .med{opacity:1;max-height:none;transform:none;margin-top:.2rem}
}

/* fallback: no 3D doors on short screens or reduced motion */
@media (max-height:560px), (prefers-reduced-motion:reduce){
  .door-head{display:none}
  .concept-body-stacked{display:none}
  .door-track{height:auto}
  .gallery-anchor{top:0}
  .door-stage{position:static;height:auto;overflow:visible;perspective:none;background:transparent;display:flex;flex-direction:column}
  .leaf{position:static;width:auto;transform:none!important;transform-style:flat;background:transparent;box-shadow:none;display:block}
  .leaf-edge{display:none}
  .leaf-inner{display:block;max-width:none;padding:clamp(2.5rem,8vw,5rem) var(--gutter) 0}
  /* stack in reading order: headline, wall text, then the collection */
  .leaf-left{order:1} .leaf-right{order:2} .door-void{order:3}
  .door-void{position:static;background:transparent;box-shadow:none;display:flex;flex-direction:column}
  .hall-sign{display:none}
  .door-reveal{display:block;opacity:1;transform:none;padding:clamp(2.5rem,8vw,5rem) var(--gutter) 0;order:-1}

  /* the hall flattens to a single wall, but the endless walk keeps walking */
  .gallery{
    position:relative;inset:auto;perspective:none;background:transparent;
    overflow:hidden;
    padding:1.8rem 0 2.6rem;
  }
  /* the doors survive as two paper panels that slide apart as you arrive
     (script writes --pm 0→1 on .door-void from scroll position) */
  .gallery::before,.gallery::after{
    content:"";position:absolute;top:0;bottom:0;width:51.5%;z-index:5;
    background:var(--paper);
  }
  .gallery::before{left:0;transform:translateX(calc(var(--pm,0) * -103%));box-shadow:inset -1px 0 0 var(--hair)}
  .gallery::after{right:0;transform:translateX(calc(var(--pm,0) * 103%));box-shadow:inset 1px 0 0 var(--hair)}
  .hall-floor,.hall-baseboard,.hall-motes,.hall-ceiling{display:none}
  .hall-rail{position:static;height:auto;overflow:visible}
  .hall-pace{position:static;height:auto;display:flex;align-items:flex-start;width:max-content;animation-duration:90s}
  .bay{margin-right:2.2rem}
  .bay .frame{width:min(58vw,15rem)}
  .vinyl{position:static;left:auto;top:auto;transform:none;margin-top:.15rem;max-width:100%}
  .vinyl .med{opacity:1;max-height:none;transform:none;margin-top:.15rem}   /* no hover on touch */
}
/* reduced motion freezes the walk, so the rail scrolls by hand instead */
@media (prefers-reduced-motion:reduce){
  .gallery{overflow-x:auto;overflow-y:hidden;padding-inline:var(--gutter);scrollbar-width:none}
  .gallery::-webkit-scrollbar{display:none}
  .hall-pace .bay:nth-child(n+7){display:none}   /* no loop, no duplicate set */
}

/* ---------- collection ---------- */
.collection{border-top:1px solid var(--hair);padding-top:0}
.section-marquee{
  display:flex;gap:1.5rem;white-space:nowrap;overflow:hidden;
  color:var(--ink-faint);padding:.9rem 0;border-bottom:1px solid var(--hair);
  background:var(--paper-2);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
}
.section-marquee span{animation:slide 26s linear infinite}
@keyframes slide{to{transform:translateX(calc(-100% - 1.5rem))}}

.gallery-head{max-width:var(--maxw);margin:0 auto;padding:clamp(3rem,6vw,5rem) var(--gutter) 1.5rem;display:grid;grid-template-columns:auto 1fr;gap:2.5rem;align-items:end}
.gallery-sub{color:var(--ink-soft);max-width:34rem;justify-self:end}

.wall{
  max-width:var(--maxw);margin:0 auto;padding:2rem var(--gutter) clamp(4rem,8vw,7rem);
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(2rem,4vw,4rem) clamp(1.5rem,3vw,3rem);
}

/* a hung work */
.work{display:flex;flex-direction:column}
.work.feature{transform:translateY(-1.4rem)}
.frame{
  background:linear-gradient(150deg,#2a241b,#0f0c08 60%);
  padding:.5rem;border-radius:1px;
  position:relative;
  transition:transform .5s cubic-bezier(.2,.7,.2,1);
}
.frame::after{ /* brass inner fillet */
  content:"";position:absolute;inset:.5rem;border:1px solid var(--brass);opacity:.45;pointer-events:none;
}
.mat{background:var(--paper);padding:clamp(.7rem,1.4vw,1.2rem);border-radius:1px}
.art{
  aspect-ratio:4/5;border-radius:1px;position:relative;overflow:hidden;
  /* --art-img indirection so the phone block can swap in the small webp
     (--img-m) without restating the gradients */
  --art-img:var(--img, transparent);
  background:
    var(--art-img) center/cover no-repeat,
    radial-gradient(120% 90% at 30% 18%, color-mix(in srgb,var(--art-b),#fff 14%), transparent 55%),
    linear-gradient(160deg,var(--art-a),var(--art-c));
  display:flex;align-items:flex-end;justify-content:center;
}
.art::before{ /* painterly brushed texture */
  content:"";position:absolute;inset:0;opacity:.5;mix-blend-mode:soft-light;
  background:
    repeating-linear-gradient(115deg,rgba(255,255,255,.10) 0 2px,transparent 2px 7px),
    repeating-linear-gradient(15deg,rgba(0,0,0,.10) 0 1px,transparent 1px 6px);
}
.art-note{
  position:relative;z-index:2;font-family:var(--mono);font-size:.6rem;letter-spacing:.14em;
  color:rgba(255,255,255,.62);text-transform:lowercase;padding:.5rem;text-align:center;
}
.work:hover .frame{transform:translateY(-7px) rotate(-.3deg)}

/* placard under a work */
.placard{margin-top:1.1rem;padding-top:.9rem;border-top:1px solid var(--hair);display:flex;flex-direction:column;gap:.28rem;position:relative}
.placard .status{position:absolute;right:0;top:.9rem}
.status{padding:.18rem .5rem;border:1px solid currentColor;border-radius:2px}
.status.on{color:var(--ember)}
.status.signature{color:var(--brass)}
.status.soon{color:var(--ink-faint)}
.placard .acc{color:var(--brass)}
.placard .ttl{font-family:var(--display);font-size:1.32rem;line-height:1.1;letter-spacing:0;text-transform:none}
.placard .med{color:var(--ink-faint)}
.blurb{font-size:.92rem;color:var(--ink-soft);margin-top:.35rem;line-height:1.5}

/* ---------- spotlight ---------- */
.spotlight{
  background:linear-gradient(165deg,#231910,#130c07);color:var(--paper);
  display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,5vw,5rem);align-items:center;
  padding:clamp(3rem,6vh,5.5rem) var(--gutter);
}
.reveal-pin.spotlight{min-height:100vh;align-content:center}
.spotlight-art{display:flex;justify-content:center}
/* museum wall label on the dark column: title across the top, artist / year beneath */
.art-label{
  display:grid;grid-template-columns:1fr auto;
  grid-template-areas:"title title" "artist year";
  column-gap:1.5rem;row-gap:.75rem;
  max-width:30rem;margin:1.7rem 0;padding-top:1.4rem;
  border-top:1px solid rgba(243,236,223,.18);
}
.art-label .pl-title{grid-area:title}
.art-label .pl-artist{grid-area:artist}
.art-label .pl-year{grid-area:year;text-align:right}
.art-label > div{display:flex;flex-direction:column;gap:.18rem}
.art-label dt{
  font-family:var(--mono);text-transform:lowercase;letter-spacing:.14em;
  font-size:.6rem;color:var(--brass-lt);
}
.art-label dd{font-family:var(--display);font-size:1.05rem;line-height:1.18;color:var(--paper)}
.art-label dd em{font-style:italic}
.plinth{perspective:1400px}
.spot-frame{
  background:linear-gradient(150deg,#3a3225,#15110a);padding:.7rem;border-radius:1px;
  box-shadow:0 40px 70px -30px rgba(0,0,0,.8);
  transform:rotateY(0deg) rotateX(0deg);transition:transform .6s cubic-bezier(.2,.7,.2,1);
  position:relative;
  /* tap/hold turn on touch: no double-tap zoom, no long-press image callout */
  touch-action:manipulation;-webkit-touch-callout:none;user-select:none;
}
.spot-frame::after{content:"";position:absolute;inset:.7rem;border:1px solid var(--brass);opacity:.5}
.spot-frame.turned{transform:rotateY(-11deg) rotateX(3deg)}
/* real-hover devices only: on touch, a stuck :hover kept the painting turned forever after a tap */
@media (hover:hover){.spot-frame:hover{transform:rotateY(-11deg) rotateX(3deg)}}
.art.big{aspect-ratio:4/5;width:min(360px,70vw);border-radius:1px}
.spot-img{display:block;width:min(max(380px,40vh),72vw);aspect-ratio:4/5;object-fit:cover;border-radius:1px}  /* grows with tall windows, never below the tuned 380px */
.spotlight-text .display.invert,
.spotlight-text .display{color:var(--paper)}
.spotlight-text .display em{font-style:italic;color:var(--paper)}
/* "it's art" matches the hero "peanut butter" face & size */
.art-headline{
  font-size:clamp(3.6rem,1rem + 9vw,10.4rem);
  line-height:.84;letter-spacing:-.035em;font-weight:430;
}
.spotlight-text{position:relative}
.spotlight-text .display{margin-bottom:1.2rem}
.spot-lede{color:rgba(243,236,223,.78);margin-bottom:1.8rem;max-width:30rem}
.spec{border-top:1px solid rgba(243,236,223,.18);margin-bottom:1.6rem}
.spec > div{display:grid;grid-template-columns:9rem 1fr;gap:1rem;padding:.7rem 0;border-bottom:1px solid rgba(243,236,223,.13)}
.spec dt{color:var(--brass-lt)}
.spec dd{color:var(--paper);font-size:.98rem}
.wall-quote{margin-top:1.9rem}
.wall-quote blockquote{
  font-family:var(--display);font-style:italic;font-weight:400;
  font-size:clamp(1.25rem,1rem + .8vw,1.6rem);line-height:1.32;
  letter-spacing:-.01em;color:var(--paper);
}
.wall-quote figcaption{
  font-family:var(--mono);text-transform:lowercase;letter-spacing:.12em;
  font-size:.66rem;color:rgba(243,236,223,.5);margin-top:.75rem;
}

/* ---------- conservation ---------- */
.conserve{border-top:1px solid var(--hair)}
.conserve-grid{display:grid;grid-template-columns:.85fr 1.15fr;gap:clamp(2rem,5vw,5rem);align-items:start}
.conserve-intro p{color:var(--ink-soft);margin-top:1.2rem;max-width:24rem}
.materials{list-style:none;display:grid;gap:.2rem}
.materials li{display:grid;grid-template-columns:2.4rem 1fr;gap:1rem;padding:1.4rem 0;border-top:1px solid var(--hair)}
.materials li:last-child{border-bottom:1px solid var(--hair)}
.m-no{color:var(--brass);padding-top:.35rem}
.materials h3{font-family:var(--display);font-weight:430;font-size:1.3rem;letter-spacing:-.01em;margin-bottom:.3rem}
.materials p{color:var(--ink-soft);font-size:.98rem}

/* ---------- opening / waitlist — a catalog order page ---------- */
.opening{
  border-top:1px solid var(--hair);
  padding:clamp(5rem,10vw,8.5rem) var(--gutter);
}
.opening-inner{max-width:56rem;margin:0 auto}
.opening-title{
  font-family:var(--display);font-weight:400;
  font-size:clamp(2.6rem,1.4rem + 4.6vw,4.6rem);line-height:1.02;letter-spacing:-.02em;
  color:var(--ink);margin-bottom:1.1rem;
}
.opening-title em{font-style:italic;color:var(--brass)}
.opening-lede{color:var(--ink-soft);max-width:34rem;margin-bottom:clamp(2.6rem,6vw,4rem)}

/* the email field is a ledger line: bare italic type over a single rule */
.ledger-label{
  display:block;font-family:var(--mono);font-size:.62rem;letter-spacing:.22em;
  text-transform:lowercase;color:var(--brass);margin-bottom:.4rem;
}
.ledger-row{
  display:flex;align-items:flex-end;gap:1.6rem;
  border-bottom:1px solid rgba(27,24,19,.38);padding-bottom:.55rem;
  transition:border-color .3s ease;
}
.ledger-row:focus-within{border-color:var(--brass)}
.ledger-row input{
  flex:1;min-width:0;background:transparent;border:0;outline:none;
  color:var(--ink);caret-color:var(--brass);
  font-family:var(--display);font-style:italic;font-weight:340;
  font-size:clamp(1.5rem,1rem + 2.4vw,2.6rem);line-height:1.15;
}
.ledger-row input::placeholder{color:rgba(27,24,19,.26)}
.ledger-row input:-webkit-autofill{
  -webkit-text-fill-color:var(--ink);
  transition:background-color 999999s;   /* keeps autofill's white wash off the paper */
}
.ledger-row button{
  flex:0 0 auto;background:transparent;color:var(--ink);
  border:1px solid var(--ink);border-radius:2px;
  font-family:var(--mono);font-size:.7rem;letter-spacing:.18em;text-transform:lowercase;
  padding:.75rem 1.3rem;margin-bottom:.35rem;cursor:pointer;
  transition:background .3s,color .3s;
}
.ledger-row button:hover{background:var(--ink);color:var(--paper)}
.ledger-row button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.ledger-row button:disabled{opacity:.55;cursor:default}
.ledger-row button:disabled:hover{background:transparent;color:var(--ink)}
.signup-msg{min-height:1.2rem;margin-top:1.3rem;color:var(--ink-soft)}
.signup-msg.err{color:var(--ember)}
.signup-msg.ok{
  font-family:var(--display);font-style:italic;
  font-size:clamp(1.3rem,1rem + 1.4vw,1.9rem);line-height:1.2;color:var(--ink);
}
@media (max-width:560px){
  .ledger-row{flex-wrap:wrap;gap:.9rem}
  .ledger-row input{flex:1 1 100%}   /* own line; the button wraps beneath */
  .ledger-row button{margin-bottom:.1rem}
}

/* ---------- footer ---------- */
/* full-bleed paper: the fixed campfire must never peek past the content box */
.footer{padding:0}
/* full-width like the masthead: columns hug the same --gutter at any width */
.footer-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:2.5rem;padding:3rem var(--gutter) 5rem;align-items:start}
.foot-col.note{justify-self:center}
.foot-col.note p{max-width:26rem}
.foot-col.social{justify-self:end}
.wordmark.small{font-size:1.7rem;display:block;margin-bottom:.6rem}
.foot-tag{color:var(--ink-soft);max-width:18rem;font-size:.95rem}
.foot-col p{color:var(--ink-soft);font-size:.95rem}
.foot-col.social{text-align:right}
.foot-col ul{list-style:none;display:grid;gap:.15rem}
.foot-col a{color:var(--ink-soft);font-size:.95rem;transition:color .25s}
.foot-col a:hover{color:var(--ink)}

/* ---------- reveal animation ---------- */
.reveal{opacity:0;transform:translateY(26px);transition:opacity 1s cubic-bezier(.2,.7,.2,1),transform 1s cubic-bezier(.2,.7,.2,1)}
.reveal.in{opacity:1;transform:none}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- responsive ---------- */
/* the pinned 'curtain' scene needs a viewport that fits its content; only
   where it can't (short LANDSCAPE viewports, or anything very short) does the
   campfire flow normally instead. Portrait stays pinned: real phones report a
   ~600-700px layout viewport with the browser chrome on screen (a 390×844
   phone loads at ~390×660), so an orientation-blind max-height:700px was
   silently unpinning the curtain on every actual phone. */
@media (max-width:980px) and (max-height:700px) and (orientation:landscape),(max-height:560px){
  .reveal-pin{position:relative}
  .reveal-pin.spotlight{min-height:auto}
  .stage{margin-top:0}
}
@media (max-width:980px){
  .concept-grid,.conserve-grid,.spotlight{grid-template-columns:1fr}
  .wall{grid-template-columns:repeat(2,1fr)}
  .work.feature{transform:none}
  .gallery-head{grid-template-columns:1fr;gap:1.2rem}
  .gallery-sub{justify-self:start}
  .spotlight-art{order:-1}
  .footer-grid{grid-template-columns:1fr;gap:2rem}
  .foot-col.note,.foot-col.social{justify-self:start}
  .foot-col.social{text-align:left}
}
@media (max-width:680px){
  .nav-links{display:none}
  .nav{gap:1rem}
  .nav-cta{margin-left:auto}
  /* no hairlines around the waitlist on phones: the section reads as one
     sheet of paper with the footer */
  .opening{border-top:0}
  .footer .rule{display:none}
  /* ---- phone performance pass (visuals should be indistinguishable) ---- */
  /* small webp variants instead of the ~3MB PNGs */
  .art{--art-img:var(--img-m, var(--img, transparent))}
  .hero-bg{background-image:url("Firefly-m.webp")}
  /* the live feTurbulence grain (3 stacked filtered rects + multiply over the
     whole viewport) is a compositing tax on phones: swap it for a pre-baked
     noise tile with plain alpha instead of a blend mode */
  .grain{display:none}
  body::after{
    content:"";position:fixed;inset:0;z-index:9999;pointer-events:none;
    background:url("grain-tile.png") repeat;
    opacity:.25;   /* tile speckle avg ~9% black; ×.25 ≈ the old 5% multiply */
  }
  /* the wide photo can't sit behind the headline on a narrow crop:
     headline first on paper, then the jar as its own catalog plate */
  .hero{min-height:100vh;min-height:100svh;display:flex;flex-direction:column;gap:1.5rem;padding:6.5rem var(--gutter) 2.5rem}
  .hero-veil{display:none}
  .hero-bg{
    position:static;inset:auto;order:2;flex:1;min-height:14rem;
    /* full-bleed: pull out of the hero gutter so the photo runs wall to wall */
    width:calc(100% + var(--gutter) * 2);margin:0 calc(var(--gutter) * -1);
    background-size:cover;background-position:center;
    /* the photo's studio backdrop is a different cream than --paper: sides run
       off-screen, so only the top/bottom edges need to dissolve into the page */
    -webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);
    mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);
  }
  .hero-inner{order:1;justify-content:flex-start;padding:0}
  .hero-title.right{display:none}
  .hero-placard{display:none}
  /* compact campfire so the pinned scene fits a phone viewport — tuned to fit
     ~640px tall (a real 390×844 phone loads at ~390×660 with browser chrome).
     The 5rem top padding clears the fixed masthead (~68px): viewport-centering
     alone pushed the painting underneath it on shorter phones. */
  .reveal-pin.spotlight{padding:5rem var(--gutter) 1rem;gap:1rem}
  .spot-img{width:min(220px,52vw)}
  .spot-lede{margin-bottom:.6rem}
  .art-label{margin:.6rem 0 0;padding-top:.5rem}
  .wall{grid-template-columns:1fr;max-width:24rem}
  .footer-grid{grid-template-columns:1fr}
  .foot-col.social{text-align:left}
  .spec > div{grid-template-columns:1fr;gap:.1rem}
}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important}
  .reveal{opacity:1;transform:none;transition:none}
  html{scroll-behavior:auto}
}
