/* ===========================================================
   THE GALLERY — shared stylesheet
   Palette:  wall #E4E1D6 · ink #211F1B · frame #171512
             brass #A6813F · rule #C9C4B4 · paper #EEEBE1
   Type:     Fraunces (display) · Work Sans (body) · Space Mono (labels)
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,400&family=Work+Sans:wght@300;400;500&family=Space+Mono:wght@400;700&display=swap');

:root{
  --wall:  #E4E1D6;
  --wall-rgb: 228, 225, 214;
  --wall2: #DEDACC;
  --ink:   #211F1B;
  --frame: #171512;
  --brass: #8C6A2F;
  --brass-light: #A6813F;
  --rule:  #C9C4B4;
  --paper: #EEEBE1;

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;
  --mono: 'Space Mono', monospace;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle plaster texture on the wall background */
body{
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.015) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,0,0,0.02) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Homepage only: two photos behind the bio, crossfading into each
   other on a loop, washed with the same wall tone so text stays
   fully readable over them. Drop your two files at:
     images/site/hero-background-1.jpg
     images/site/hero-background-2.jpg
   (edit the filenames below if you use different names or a
   .png/.webp). If you only ever add one file, that one just shows
   as a static background — no error, it simply won't crossfade. */
body.has-hero-image::before,
body.has-hero-image::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: hero-crossfade 24s ease-in-out infinite;
}
body.has-hero-image::before{
  background-image:
    linear-gradient(rgba(var(--wall-rgb), 0.88), rgba(var(--wall-rgb), 0.88)),
    url("images/site/hero-background-1.jpg");
}
body.has-hero-image::after{
  background-image:
    linear-gradient(rgba(var(--wall-rgb), 0.88), rgba(var(--wall-rgb), 0.88)),
    url("images/site/hero-background-2.jpg");
  /* half the cycle length, negative so it starts already offset
     instead of waiting — this is what makes the two crossfade
     rather than both fading at the same time */
  animation-delay: -12s;
}
@keyframes hero-crossfade{
  0%, 40%  { opacity: 1; }
  50%, 90% { opacity: 0; }
  100%     { opacity: 1; }
}
@media (prefers-reduced-motion: reduce){
  body.has-hero-image::before,
  body.has-hero-image::after{
    animation: none;
  }
  body.has-hero-image::after{
    opacity: 0; /* just show image 1, motion-safe fallback */
  }
}

a{ color: inherit; text-decoration: none; }

h1, h2, h3{
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  color: var(--frame);
}

.eyebrow, .mono{
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* -----------------------------------------------------------
   Skip link / focus states — accessibility floor
   ----------------------------------------------------------- */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--frame);
  color: var(--paper);
  padding: 0.75em 1.2em;
  z-index: 999;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
}

a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------------------------------------
   Site header — gallery entrance signage
   ----------------------------------------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--wall);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}

.site-brand{
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-brand span{
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 400;
  margin-top: 0.25rem;
}

.site-nav{
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a{
  position: relative;
  padding-bottom: 0.3rem;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.site-nav a:hover{ opacity: 1; color: var(--brass); }

.site-nav a::after{
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--brass);
  transition: right 0.25s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after{ right: 0; }

.site-nav a[aria-current="page"]{ opacity: 1; color: var(--frame); font-weight: 700; }

/* -----------------------------------------------------------
   Home — hero
   ----------------------------------------------------------- */
.hero{
  padding: clamp(3rem, 10vw, 7rem) clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4rem);
  max-width: 62rem;
}

.hero-eyebrow{
  color: var(--brass);
  font-size: 0.7rem;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: rise 0.7s ease forwards 0.05s;
}

.hero h1{
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.15s;
}

.hero h1 em{
  font-style: italic;
  font-weight: 300;
  color: var(--brass-light);
}

.hero-lede{
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: 1.05rem;
  color: #47443c;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.3s;
}

.hero-bio{
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1rem;
  color: #57544b;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.42s;
}

.hero-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #6b675c;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.54s;
}

.hero-meta a:hover{ color: var(--brass); }

@keyframes rise{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------
   Floor directory — the three rooms, listed like signage
   ----------------------------------------------------------- */
.directory{
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(4rem, 10vw, 7rem);
  max-width: 62rem;
}

.directory-heading{
  font-size: 0.72rem;
  color: var(--brass);
  margin-bottom: 1.6rem;
}

.room-list{
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--frame);
}

.room-list li{ border-bottom: 1px solid var(--rule); }

.room-link{
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.6rem 0.2rem;
  transition: padding-left 0.25s ease, color 0.25s ease;
}

.room-link:hover{ padding-left: 0.8rem; color: var(--brass); }

.room-number{
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--brass);
  flex-shrink: 0;
}

.room-name{
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  flex-shrink: 0;
}

.room-rule{
  flex: 1;
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-0.4rem);
}

.room-count{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #78745f;
  flex-shrink: 0;
  white-space: nowrap;
}

/* -----------------------------------------------------------
   Gallery room header (small/medium/large pages)
   ----------------------------------------------------------- */
.room-header{
  padding: clamp(2.4rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(1.6rem, 4vw, 2.4rem);
  max-width: 62rem;
}

.room-header .back{
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.6rem;
}
.room-header .back:hover{ text-decoration: underline; }

.room-header .eyebrow{ color: var(--brass); font-size: 0.72rem; margin-bottom: 0.8rem; }

.room-header h1{ font-size: clamp(2.1rem, 5.4vw, 3.4rem); }

.room-header p{
  max-width: 36rem;
  margin-top: 1.1rem;
  color: #57544b;
}

.room-switch{
  display: flex;
  gap: 1.6rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.room-switch a{ color: #8a8676; }
.room-switch a:hover{ color: var(--brass); }
.room-switch a[aria-current="page"]{ color: var(--frame); font-weight: 700; }

/* -----------------------------------------------------------
   Frame + label — the signature unit, reused everywhere
   ----------------------------------------------------------- */
.frame{
  position: relative;
  background: var(--paper);
  border: 1px solid var(--frame);
  padding: 0.55rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.frame:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -14px rgba(23,21,18,0.35);
}

.frame-inner{
  aspect-ratio: var(--ar, 4/5);
  background:
    repeating-linear-gradient(135deg, rgba(23,21,18,0.05) 0px, rgba(23,21,18,0.05) 1px, transparent 1px, transparent 14px),
    var(--wall2);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frame-inner img{
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.frame-placeholder{
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a9683;
  text-align: center;
  padding: 1rem;
}

.label{
  padding: 0.85rem 0.3rem 0.2rem;
}

.label-title{
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--frame);
}

.label-meta{
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7d7967;
}

/* "Reserve this piece" — opens the reserve modal (see below) */
.reserve-link{
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(140, 106, 47, 0.4);
  padding: 0 0 0.1rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.reserve-link:hover{
  color: var(--frame);
  border-color: var(--frame);
}
.lightbox-caption .reserve-link{
  color: var(--brass-light);
  border-color: rgba(166, 129, 63, 0.5);
}
.lightbox-caption .reserve-link:hover{
  color: var(--paper);
  border-color: var(--paper);
}

/* -----------------------------------------------------------
   Reserve modal — shows the ready-to-send message with a copy
   button, plus a mailto link as an optional shortcut.
   ----------------------------------------------------------- */
.reserve-overlay{
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 18, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.2rem, 5vw, 3rem);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.reserve-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

.reserve-card{
  position: relative;
  background: var(--paper);
  border: 1px solid var(--frame);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}

.reserve-close{
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--frame);
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.reserve-close:hover{ background: var(--frame); color: var(--paper); }

.reserve-heading{
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--frame);
  padding-right: 2rem;
  margin: 0 0 0.6rem;
}

.reserve-intro{
  font-size: 0.9rem;
  color: #57544b;
  margin: 0 0 1.3rem;
}

.reserve-row{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.1rem;
}

.reserve-row-label{
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8676;
  flex-shrink: 0;
}

.reserve-row-value{
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--frame);
  flex: 1;
  overflow-wrap: anywhere;
}

p.reserve-row-label{
  margin: 0 0 0.4rem;
  border: none;
  padding: 0;
}

.reserve-message{
  width: 100%;
  resize: vertical;
  background: var(--wall);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 0.8rem;
  margin-bottom: 0.7rem;
}

.reserve-copy-btn{
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--brass);
  color: var(--brass);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.reserve-copy-btn:hover{ background: var(--brass); color: var(--paper); }
.reserve-copy-btn.is-copied{ background: var(--frame); border-color: var(--frame); color: var(--paper); }

.reserve-copy-message{ margin-bottom: 1.3rem; }

.reserve-mailto-btn{
  display: block;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--frame);
  color: var(--paper);
  padding: 0.75rem 1rem;
  transition: background 0.2s ease;
}
.reserve-mailto-btn:hover{ background: var(--brass); }

.reserve-fallback-note{
  margin: 0.9rem 0 0;
  font-size: 0.72rem;
  color: #8a8676;
  line-height: 1.6;
}

/* empty room state */
.empty-room{
  max-width: 34rem;
  padding: 3rem 0;
  color: #6b675c;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
}
.empty-room code{
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.4rem;
  font-size: 0.78rem;
}

/* -----------------------------------------------------------
   Room galleries — column count per room, set two ways:
     1. Here, via .cols-1 / .cols-2 (add more if you ever want
        .cols-3, following the same pattern).
     2. On the page itself — each room's <ul id="gallery-root">
        carries the class that picks which rule applies, e.g.
        class="gallery-list cols-2". Change the number there to
        move a room between layouts without touching this file.
   Each frame is shaped to its own photo's real proportions
   (set inline by gallery.js), so nothing is ever cropped.
   ----------------------------------------------------------- */
.gallery-wrap{
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(5rem, 10vw, 8rem);
  max-width: 78rem;
}

.gallery-list{
  display: grid;
  align-items: start;
  gap: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem);
}

.gallery-list.cols-1{
  grid-template-columns: 1fr;
  max-width: 46rem;
  margin: 0 auto;
}

.gallery-list.cols-2{
  grid-template-columns: repeat(2, 1fr);
}

.gallery-list .frame{
  width: 100%;
  cursor: zoom-in;
}
.gallery-list .frame-inner{ --ar: 4/5; }
.gallery-list .label-title{ font-size: 1.2rem; }
.gallery-list.cols-2 .label-title{ font-size: 1.05rem; }

li{ list-style: none; }

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.site-footer{
  border-top: 1px solid var(--rule);
  padding: 2.2rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #837f6d;
}
.site-footer a:hover{ color: var(--brass); }

/* -----------------------------------------------------------
   Lightbox — click a frame to view it full-size, with a
   diagonal tiled watermark of the artist's name over the photo.
   ----------------------------------------------------------- */
.lightbox-overlay{
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 18, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.2rem, 5vw, 3rem);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close{
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.8rem);
  right: clamp(0.8rem, 3vw, 1.8rem);
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(238,235,225,0.4);
  background: transparent;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox-close:hover{ background: var(--paper); color: var(--frame); }

.lightbox-figure{
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-image-wrap{
  position: relative;
  max-width: 94vw;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  background: var(--frame);
  cursor: zoom-in;
}
.lightbox-image-wrap.is-zoomed{
  overflow: auto;
  cursor: zoom-out;
}

.lightbox-image-wrap img{
  display: block;
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* zoomed: show the photo at its real pixel size — bigger than the
   screen for most phone photos, so the wrapper above scrolls to let
   you pan around and see full detail */
.lightbox-image-wrap.is-zoomed img{
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
}

.zoom-hint{
  position: absolute;
  bottom: 0.7rem;
  right: 0.9rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238,235,225,0.7);
  background: rgba(23,21,18,0.55);
  padding: 0.3rem 0.6rem;
  pointer-events: none;
}

/* the watermark: the artist's name, tiled diagonally across the photo */
.lightbox-watermark{
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.lightbox-watermark-grid{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  transform: translate(-50%, -50%) rotate(-30deg);
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  gap: clamp(1.6rem, 5vw, 3.2rem) clamp(2rem, 6vw, 4rem);
}
.lightbox-watermark-grid span{
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.6vw, 1.15rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(228, 225, 214, 0.32);
  text-shadow: 0 0 6px rgba(0,0,0,0.45);
}

.lightbox-caption{
  margin-top: 1.4rem;
  text-align: center;
  color: var(--paper);
}
.lightbox-caption .label-title{ color: var(--paper); }
.lightbox-caption .label-meta{ color: rgba(238,235,225,0.6); }

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */
@media (max-width: 640px){
  .site-header{ flex-direction: column; align-items: flex-start; gap: 1rem; }
  .room-link{ flex-wrap: wrap; }
  .room-rule{ display: none; }
  .gallery-list.cols-2{ grid-template-columns: 1fr; }
  .gallery-list.cols-1{ max-width: 100%; }
  .lightbox-watermark-grid span{ font-size: 0.72rem; }
}
