/* Jennifer Keeler-Milne — prototype site */
:root {
  --wall: #f4f2ed;
  --wall-deep: #ecebe4;
  --ink: #2a2823;
  --soft: #6f6c62;
  --accent: #6b6a52;
  --floor: #d8d2c4;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--wall); color: var(--ink); font-family: var(--sans); font-weight: 300; }

/* ---------- navigation ---------- */
nav.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 1.4rem 2.2rem;
  background: linear-gradient(to bottom, rgba(244,242,237,.92), rgba(244,242,237,0));
}
nav.site .brand {
  font-family: var(--serif); font-size: 1.45rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink); text-decoration: none; font-weight: 500;
}
nav.site ul { display: flex; gap: 1.8rem; list-style: none; }
nav.site a { color: var(--soft); text-decoration: none; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
nav.site a:hover, nav.site a.here { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
nav.site.on-dark .brand, nav.site.on-dark a { color: #f2efe8; }
nav.site.on-dark { background: linear-gradient(to bottom, rgba(20,20,18,.55), transparent); }

/* ---------- front page ---------- */
.hero { position: fixed; inset: 0; overflow: hidden; background: #191813; }
.hero .slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 2.8s ease;
}
.hero .slide.show { opacity: 1; animation: drift 14s ease-out forwards; }
@keyframes drift { from { transform: scale(1.09) } to { transform: scale(1.0) } }
.hero-veil { position: fixed; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(10,10,8,.45)); pointer-events: none; }
.hero-title {
  position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  text-align: center; color: #f5f2ea; z-index: 5; pointer-events: none;
}
.hero-title h1 {
  font-family: "Italiana", var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  letter-spacing: .16em; padding-left: .16em; /* padding balances the trailing letter-space */
  text-transform: uppercase; text-shadow: 0 1px 30px rgba(0,0,0,.4);
}
.hero-title h1 .surname { white-space: nowrap; } /* wraps as JENNIFER / KEELER-MILNE, never mid-surname */
@media (max-width: 700px) {
  .hero-title h1 { font-size: clamp(1.7rem, 8.4vw, 2.6rem); line-height: 1.35; }
}
.hero-title p { margin-top: .8rem; letter-spacing: .3em; font-size: .75rem; text-transform: uppercase; color: rgba(245,242,234,.75); }
.hero-title a.enter {
  display: inline-block; margin-top: 2.2rem; color: #f5f2ea; text-decoration: none;
  border: 1px solid rgba(245,242,234,.5); padding: .7rem 2.4rem; letter-spacing: .25em;
  font-size: .72rem; text-transform: uppercase; transition: background .3s, color .3s;
}
.hero-title a.enter:hover { background: #f5f2ea; color: #191813; }
.hero-caption { position: fixed; right: 1.6rem; bottom: 1.4rem; z-index: 5; color: rgba(245,242,234,.55); font-size: .68rem; letter-spacing: .08em; }

/* ---------- gallery wall ---------- */
body.gallery-page { overflow-y: hidden; background: var(--wall); }
.wall-scroller {
  height: 100vh; height: 100dvh; overflow-x: auto; overflow-y: hidden;
  display: flex; align-items: stretch;
  scroll-behavior: smooth;
}
.wall {
  position: relative; height: 100vh; height: 100dvh; display: flex; align-items: flex-start; flex: 0 0 auto;
  background:
    linear-gradient(to bottom, #f7f5f0 0%, var(--wall) 55%, var(--wall-deep) 86%, var(--wall-deep) 86.5%,
      #cfc8b8 86.5%, var(--floor) 88%, #cbc3b1 100%);
  padding: 0 6vw;
}
.wall::after { /* skirting shadow */
  content: ""; position: absolute; left: 0; right: 0; top: 86.5%; height: 1px; background: rgba(0,0,0,.14);
}
.hang { position: relative; flex: 0 0 auto; align-self: flex-start; margin-right: 9vw; }
.wall-intro {
  flex: 0 0 auto; align-self: center; margin-right: 9vw; margin-bottom: 14vh;
  max-width: 20rem;
}
/* doorway between rooms on a continuous wall */
.room-divider {
  flex: 0 0 auto; width: 11vw; height: 100%; margin-right: 8vw;
  background: linear-gradient(to right,
    rgba(0,0,0,0) 0%, rgba(60,55,45,.10) 16%, rgba(38,35,28,.5) 36%,
    #211f19 50%, rgba(38,35,28,.5) 64%, rgba(60,55,45,.10) 84%, rgba(0,0,0,0) 100%);
}
.wall-intro h1 { font-family: "Italiana", var(--serif); font-weight: 400; font-size: 2.6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.wall-intro .g { margin-top: 1rem; font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--ink); }
.wall-intro .w { margin-top: .5rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); line-height: 1.7; }
.hang .frame {
  position: relative; cursor: zoom-in; background: #fff;
  box-shadow: 0 2px 4px rgba(30,28,20,.18), 0 14px 34px -12px rgba(30,28,20,.35);
  transition: transform .4s ease, box-shadow .4s ease;
}
.hang .frame:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(30,28,20,.2), 0 22px 44px -12px rgba(30,28,20,.4); }
.hang img.art { display: block; width: 100%; height: 100%; object-fit: cover; }
/* deep box canvases (~15cm stretchers): the shadow drops lower and softer,
   reading as a thick canvas standing off the wall */
body.deep-canvas .hang .frame {
  box-shadow:
    0 .55vh 1vh rgba(30,28,20,.30),
    1vh 2.6vh 2.4vh -0.5vh rgba(30,28,20,.32),
    1.8vh 5vh 6.5vh -2vh rgba(30,28,20,.22);
}
body.deep-canvas .hang .frame:hover {
  box-shadow:
    0 .7vh 1.2vh rgba(30,28,20,.32),
    1.2vh 3vh 2.8vh -0.5vh rgba(30,28,20,.35),
    2vh 5.6vh 7vh -2vh rgba(30,28,20,.25);
}
/* multi-panel works hang flat: no sheet shadow, white ground melts into the wall */
.hang .frame.flat, .hang .frame.flat:hover { background: transparent; box-shadow: none; transform: none; }
.hang .frame.flat img.art { mix-blend-mode: multiply; }
/* transparent composites: canvases with baked shadows hang directly on the wall */
.hang .frame.alpha, .hang .frame.alpha:hover { background: transparent; box-shadow: none; transform: none; }
.label {
  position: absolute; top: calc(100% + 14px); left: 0; width: 260px; max-width: 20rem;
  font-size: .72rem; color: var(--soft); line-height: 1.5;
}
.label .t { font-family: var(--serif); font-size: .95rem; color: var(--ink); font-style: italic; }
.label .story-btn {
  margin-top: .45rem; display: inline-block; background: none; border: none; padding: 0;
  color: var(--accent); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  border-bottom: 1px dotted var(--accent);
}
.label .story { display: none; margin-top: .5rem; font-size: .74rem; color: var(--ink); font-style: italic; line-height: 1.55; }
.label.open .story { display: block; }

.wall-hint { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 50;
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); opacity: .8; }

/* ---------- the occasional visitor ---------- */
/* One standing figure, seen side-on, contemplating a work. It fades in,
   holds for a while, fades away, and reappears later at a different spot
   along the wall. Fades are artefact-free because the image's white ground
   multiplies to exactly the wall colour at any opacity. */
.visitor {
  /* Wall = 340cm mapped to 100vh, floor line at 86.5vh. Container 57vh with
     ~5% white padding in the generated image ≈ a 172cm person whose feet
     land just below the floor line (standing slightly forward of the wall)
     and whose eye level sits just above the 152cm hanging line. */
  position: fixed; bottom: 10vh; bottom: 10dvh; left: 0; z-index: 45; pointer-events: none;
  height: 57vh; height: 57dvh; width: 29vh; width: 29dvh;
  opacity: 0;
  animation: visit 150s linear infinite;
}
.visitor img {
  /* the figure PNG has a transparent background (Higgsfield background
     removal) so no blending tricks are needed — reliable on iOS Safari */
  position: absolute; bottom: 0; left: 0; height: 100%; width: auto;
  filter: blur(4px) brightness(1.35);
}
@keyframes visit {
  0%    { transform: translateX(-7vw); opacity: 0 }
  40%   { opacity: 0 }
  44%   { opacity: .55 }    /* only just on the page, standing looking */
  62%   { opacity: .55 }
  66%   { opacity: 0 }      /* fades away */
  100%  { transform: translateX(-7vw); opacity: 0 }
}
#toggle-visitors {
  position: fixed; right: 1.6rem; bottom: 1.2rem; z-index: 55;
  background: rgba(244,242,237,.85); border: 1px solid #c9c3b4; color: var(--soft);
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; padding: .5rem .9rem; cursor: pointer;
}
body.vmode-off .visitor { display: none; }

/* ---------- zoom overlay (white room) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: #ffffff;
  display: none; flex-direction: column; align-items: center; justify-content: center;
}
.overlay.open { display: flex; }
.overlay .stage { position: relative; flex: 1 1 auto; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.overlay .stage img { max-width: 88vw; max-height: 72vh; box-shadow: 0 18px 50px -18px rgba(45,40,28,.35); }
.overlay .stage img.detail-pan { max-width: none; max-height: none; width: 170vw; cursor: grab; }
.overlay .bar { flex: 0 0 auto; width: 100%; padding: 1.1rem 2rem 1.8rem; text-align: center; color: var(--soft); }
.overlay .bar .t { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink); }
.overlay .bar .m { font-size: .74rem; letter-spacing: .08em; margin-top: .25rem; color: var(--soft); }
.overlay .bar .s { font-size: .82rem; font-style: italic; max-width: 46rem; margin: .7rem auto 0; line-height: 1.6; color: #55524a; }
.overlay .modes { margin-top: .9rem; }
.overlay .modes button, .overlay .close, .overlay .gallery-btn {
  background: none; border: 1px solid #b8b1a0; color: #55524a; padding: .45rem 1.2rem;
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; margin: 0 .3rem;
}
.overlay .modes button.active { background: var(--ink); color: #f4f2ed; border-color: var(--ink); }
.overlay .gallery-btn { margin-top: .9rem; padding: .6rem 2.4rem; }
.overlay .gallery-btn:hover { background: var(--ink); color: #f4f2ed; border-color: var(--ink); }
.overlay .close { position: absolute; top: 1.2rem; right: 1.6rem; border: none; font-size: 1.7rem; padding: .2rem .6rem; color: #55524a; }
/* series browsing: step through individual drawings */
.overlay .nav-arrow {
  display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: none; border: none; font-size: 3.2rem; line-height: 1; color: #8a8578;
  cursor: pointer; padding: .4rem 1.1rem;
}
.overlay .nav-arrow:hover { color: var(--ink); }
#ov-prev { left: .8rem; } #ov-next { right: .8rem; }
.overlay.panels-on .nav-arrow { display: block; }

/* ---------- text pages ---------- */
.page { max-width: 46rem; margin: 0 auto; padding: 9rem 1.6rem 6rem; }
.page.wide { max-width: 58rem; }
.page h1 { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; letter-spacing: .06em; margin-bottom: 2.6rem; }
.page h2 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin: 2.6rem 0 1rem; }
.page p { line-height: 1.75; margin-bottom: 1.1rem; font-size: .95rem; }
.page .lede { font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; color: var(--ink); }

.essay { padding: 1.6rem 0; border-bottom: 1px solid #ddd8ca; }
.essay .t { font-family: var(--serif); font-size: 1.35rem; font-style: italic; }
.essay .t a { color: var(--ink); text-decoration: none; }
.essay .t a:hover { color: var(--accent); }
.essay .a { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: .3rem; }
.essay .x { font-size: .92rem; line-height: 1.7; color: var(--soft); margin-top: .6rem; font-style: italic; }
.essay .r { margin-top: .6rem; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.essay .r a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }

.cv-year { display: grid; grid-template-columns: 5rem 1fr; gap: .4rem 1.4rem; margin-bottom: 1.2rem; }
.cv-year .y { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }
.cv-year ul { list-style: none; }
.cv-year li { font-size: .88rem; line-height: 1.65; color: var(--ink); }

/* ---------- article pages ---------- */
.article-head { margin-bottom: 2.4rem; }
.article-title { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 2.1rem; line-height: 1.2; }
.article-by { margin-top: .7rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.article-by .src { color: var(--soft); }
.article-foot { margin-top: 3.2rem; padding-top: 1.2rem; border-top: 1px solid #ddd8ca;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.article-foot a { color: var(--ink); text-decoration: none; }
.article-foot a:hover { color: var(--accent); }

/* ---------- contact form ---------- */
.contact-form { margin-top: 2rem; display: grid; gap: 1.1rem; }
.contact-form label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); display: block; margin-bottom: .35rem; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid #cfc8b8; background: #fbfaf7; padding: .8rem .9rem;
  font-family: var(--sans); font-size: .92rem; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { min-height: 10rem; resize: vertical; }
.contact-form button {
  justify-self: start; background: var(--ink); color: #f4f2ed; border: none;
  padding: .8rem 2.6rem; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
}
.contact-form button:hover { background: var(--accent); }
.form-note { font-size: .8rem; color: var(--soft); }
.form-status { font-size: .85rem; color: var(--accent); min-height: 1.2rem; }
.contact-link { display: inline-block; margin-top: .4rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 1px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.contact-link:hover { color: var(--accent); }

.rep-card { border-top: 1px solid #ddd8ca; padding: 1.8rem 0; }
.rep-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: .08em; }
.rep-card p { margin: .5rem 0 0; }
.rep-card a { color: var(--accent); }

footer.site { text-align: center; padding: 3rem 1rem 2.4rem; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }

/* ---------- mobile ---------- */
.hint-mobile { display: none; }
@media (max-width: 700px) {
  nav.site { flex-direction: column; align-items: center; gap: .5rem; padding: .8rem .8rem; }
  nav.site .brand { font-size: 1.22rem; letter-spacing: .12em; white-space: nowrap; }
  nav.site ul { gap: 1rem; }
  nav.site a { font-size: .6rem; letter-spacing: .08em; }

  /* the visitor keeps to the very left edge, mostly off-screen */
  .visitor { animation-name: visit-m; }

  /* labels: title only — details appear in the zoom view on tap */
  .label { width: auto; max-width: 58vw; }
  .label .d, .label .story-btn, .label .story { display: none; }

  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
  .wall { padding: 0 8vw; }
  .overlay .stage img { max-width: 94vw; }
  .overlay .bar { padding: .8rem 1rem 1.2rem; }
}
@keyframes visit-m {
  0%    { transform: translateX(-58%); opacity: 0 }
  40%   { opacity: 0 }
  44%   { opacity: .5 }
  62%   { opacity: .5 }
  66%   { opacity: 0 }
  100%  { transform: translateX(-58%); opacity: 0 }
}
