/* Div Puri Photography: gallery styles (v2) */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/cormorant-garamond-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300; font-display: swap; src: url(fonts/cormorant-garamond-latin-300-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }

/* ---------- colour ----------
   Every room sets --hue / --sat from its own photos, so the walls change as you walk through. */
:root {
  --hue: 32;
  --sat: 10%;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* night gallery (default) */
:root, [data-theme="dark"] body {
  --wall: hsl(var(--hue) var(--sat) 6.5%);
  --wall-2: hsl(var(--hue) var(--sat) 9%);
  --ink: hsl(var(--hue) 20% 92%);
  --muted: hsl(var(--hue) 10% 62%);
  --faint: hsl(var(--hue) 8% 42%);
  --line: hsl(var(--hue) 15% 90% / 0.12);
  --accent: hsl(var(--hue) 50% 68%);
  --spot: hsl(40 70% 85% / 0.075);
  --shadow: 0 30px 60px -20px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.03);
  --btn-bg: hsl(var(--hue) 20% 92% / 0.08);
  --btn-bg-hover: hsl(var(--hue) 20% 92% / 0.16);
  color-scheme: dark;
}
/* daytime gallery */
[data-theme="light"], [data-theme="light"] body {
  --wall: hsl(var(--hue) calc(var(--sat) * 0.9) 94%);
  --wall-2: hsl(var(--hue) calc(var(--sat) * 0.9) 90%);
  --ink: hsl(var(--hue) 15% 11%);
  --muted: hsl(var(--hue) 8% 38%);
  --faint: hsl(var(--hue) 6% 55%);
  --line: hsl(var(--hue) 15% 10% / 0.12);
  --accent: hsl(var(--hue) 45% 34%);
  --spot: hsl(40 60% 100% / 0.85);
  --shadow: 0 2px 2px rgb(40 30 20 / 0.06), 0 30px 50px -24px rgb(40 30 20 / 0.45);
  --btn-bg: hsl(var(--hue) 15% 11% / 0.07);
  --btn-bg-hover: hsl(var(--hue) 15% 11% / 0.14);
  color-scheme: light;
}

/* smooth "walk through the door" between pages, in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.75s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.5s; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--wall); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
h1 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.015em; line-height: 0.95; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.overline { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; margin: 0 0 1.2rem; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  width: 100%; padding: 24px var(--gutter);
}
.topbar-over { position: absolute; inset: 0 0 auto; z-index: 20; color: #f4efe7; }
.topbar-over::before { content: ""; position: absolute; inset: 0 0 -60px; background: linear-gradient(rgb(0 0 0 / 0.5), transparent); pointer-events: none; z-index: -1; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2; white-space: nowrap; }
.brand-sub { font-family: var(--serif); font-style: italic; font-size: 1rem; opacity: 0.75; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; padding-top: 4px; }
.topnav-rooms { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.topnav a { opacity: 0.72; transition: opacity 0.2s; position: relative; }
.topnav a:hover, .topnav a[aria-current="page"] { opacity: 1; }
.topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; }
.theme-toggle { width: 34px; height: 34px; margin-top: -8px; border-radius: 50%; display: grid; place-items: center; opacity: 0.8; transition: background-color 0.2s, opacity 0.2s; }
.theme-toggle:hover { background: rgb(128 128 128 / 0.2); opacity: 1; }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.i-moon { display: none; }
[data-theme="light"] .i-moon { display: block; }
[data-theme="light"] .i-sun { display: none; }

/* ---------- lobby: three full-height doors ---------- */
.page-lobby { background: #0b0a09; }
.lobby { position: relative; }
.room, .lobby { overflow-x: clip; }
.doors { display: flex; height: 100vh; height: 100svh; min-height: 520px; background: #0b0a09; }
.door {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; isolation: isolate;
  transition: flex-grow 1s var(--ease);
  color: #f4efe7;
  animation: door-open 1.3s var(--ease) both;
  animation-delay: calc(0.1s + var(--i) * 0.14s);
}
.door + .door { box-shadow: -1px 0 0 rgb(0 0 0 / 0.6); }
.door img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  filter: brightness(0.82) saturate(0.95);
  transform: scale(1.08);
  animation: settle 2.6s var(--ease) both;
  animation-delay: calc(0.1s + var(--i) * 0.14s);
  transition: filter 0.8s ease, transform 1.4s var(--ease);
}
.door-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / 0.72) 0%, rgb(0 0 0 / 0.15) 38%, transparent 60%); }
.door-label { position: absolute; left: clamp(20px, 3vw, 44px); right: 20px; bottom: clamp(28px, 6vh, 64px); display: flex; flex-direction: column; gap: 6px; }
.door-no { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.75; }
.door-name { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 4.6vw, 4.6rem); line-height: 1; letter-spacing: -0.01em; }
.door-count { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8; display: inline-flex; gap: 10px; align-items: center; }
.arrow { display: inline-block; transition: transform 0.4s var(--ease); }
@media (hover: hover) {
  .doors:hover .door { flex-grow: 0.75; }
  .doors .door:hover { flex-grow: 1.9; }
  .doors:hover .door:not(:hover) img { filter: brightness(0.42) saturate(0.7); }
  .door:hover img { filter: brightness(1) saturate(1.02); transform: scale(1.02); }
  .door:hover .arrow { transform: translateX(6px); }
}
.door:focus-visible { outline: none; }
.door:focus-visible .door-label { outline: 1px solid currentColor; outline-offset: 10px; }
.lobby-foot { position: absolute; right: var(--gutter); bottom: 18px; margin: 0; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgb(244 239 231 / 0.55); pointer-events: none; }

@keyframes door-open { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.18); } to { transform: scale(1.08); } }

/* ---------- room entrance ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; isolation: isolate; color: #f4efe7; display: flex; align-items: flex-end; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: hero-in 2.4s var(--ease) both; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 60% at 0% 100%, rgb(0 0 0 / 0.55), transparent 70%), linear-gradient(to top, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.08) 55%, rgb(0 0 0 / 0.15)); }
.hero-text { width: 100%; padding: 0 var(--gutter) clamp(40px, 9vh, 96px); }
.hero-text > * { animation: rise 1.1s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: 0.1s; }
.hero-text > :nth-child(3) { animation-delay: 0.2s; }
.hero-text > :nth-child(4) { animation-delay: 0.3s; }
.hero .overline { color: rgb(244 239 231 / 0.75); }
.hero h1 { font-size: clamp(4rem, 13vw, 11rem); }
.hero-meta { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.5rem); margin: 0.6rem 0 1.8rem; opacity: 0.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.btn span { transition: transform 0.3s var(--ease); }
.btn-solid { background: #f4efe7; color: #141210; }
.btn-solid:hover { background: #fff; }
.btn-solid:hover span { transform: translateX(4px); }
.btn-ghost { border: 1px solid rgb(244 239 231 / 0.45); color: #f4efe7; }
.btn-ghost:hover { border-color: #f4efe7; background: rgb(244 239 231 / 0.1); }
.btn-ghost:hover span { transform: translateY(3px); }
@keyframes hero-in { from { transform: scale(1.08); filter: brightness(0.6); } to { transform: scale(1); filter: none; } }

/* ---------- the hang ---------- */
.hang { padding: clamp(40px, 10vh, 120px) var(--gutter) 0; max-width: 1680px; margin: 0 auto; }
.bay { position: relative; display: grid; align-items: end; padding: clamp(48px, 14vh, 170px) 0; }
.work { margin: 0; position: relative; }
.work-frame { display: block; width: 100%; aspect-ratio: var(--ar); cursor: zoom-in; position: relative; box-shadow: var(--shadow); }
.work-frame img { width: 100%; height: 100%; object-fit: cover; }
/* a soft pool of gallery light on the wall behind each photograph */
.work-frame::before {
  content: ""; position: absolute; z-index: -1; left: -20%; right: -20%; top: -24%; height: 95%;
  background: radial-gradient(ellipse 50% 50% at 50% 35%, var(--spot), transparent 72%);
  pointer-events: none; transition: opacity 1.8s ease;
}

/* sizes: every photo as large as the screen comfortably allows */
.bay-wide { justify-items: center; }
.bay-wide .work { width: min(100%, calc(84vh * var(--ar)), 1560px); }
.bay-pair { grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 5vw, 96px); align-items: end; }
.bay-pair .work { width: min(100%, calc(76vh * var(--ar))); justify-self: end; }
.bay-pair .work + .work { justify-self: start; }

/* offset and tall bays: the placard hangs on the empty wall beside the photo */
.bay-offset .work, .bay-tall .work { display: grid; align-items: end; column-gap: clamp(28px, 4vw, 72px); }
.bay-offset .work { grid-template-columns: minmax(0, 1fr) minmax(200px, 0.4fr); }
.bay-offset .work-frame { width: min(100%, calc(80vh * var(--ar))); }
.bay-offset.bay-right .work { grid-template-columns: minmax(200px, 0.4fr) minmax(0, 1fr); }
.bay-offset.bay-right .work-frame { grid-column: 2; grid-row: 1; justify-self: end; }
.bay-tall .work { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.bay-tall.bay-left .placard { grid-column: 3; grid-row: 1; }
.bay-tall .work-frame { grid-row: 1; grid-column: 2; width: min(calc(86vh * var(--ar)), 70vw); }
.bay-tall.bay-right .placard { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; align-items: flex-end; }
.bay-offset.bay-right .placard { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; align-items: flex-end; }
.bay-offset .placard, .bay-tall .placard { margin: 0 0 6px; }

/* wall placards */
.placard { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; max-width: 24em; }
.placard::before { content: ""; width: 28px; height: 1px; background: var(--accent); margin-bottom: 12px; }
.pl-no { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint); font-variant-numeric: tabular-nums; }
.pl-title { font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.25; }
.pl-room { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

/* lights come on as you reach each photograph */
.js .work-frame img { opacity: 0; filter: brightness(0.35); transform: translateY(18px); transition: opacity 1.4s ease, filter 1.8s ease, transform 1.4s var(--ease); }
.js .work-frame::before { opacity: 0; }
.js .work.is-lit .work-frame img { opacity: 1; filter: none; transform: none; }
.js .work.is-lit .work-frame::before { opacity: 1; }
.work-frame:hover img { filter: brightness(1.04) !important; }

/* ---------- end of room: the next doorway ---------- */
.room-end { padding: clamp(40px, 10vh, 120px) 0 0; }
.next-door { position: relative; display: flex; align-items: flex-end; height: 62vh; min-height: 360px; overflow: hidden; isolation: isolate; color: #f4efe7; }
.next-door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(0.7); transition: filter 0.8s ease, transform 1.4s var(--ease); }
.next-door:hover img { filter: brightness(0.95); transform: scale(1.03); }
.next-door:hover .arrow { transform: translateX(8px); }
.next-label { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--gutter) clamp(32px, 7vh, 72px); }
.next-name { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 8vw, 7rem); line-height: 1; }
.back-lobby { display: block; text-align: center; padding: 32px var(--gutter) 0; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.back-lobby:hover { color: var(--ink); }

/* ---------- about ---------- */
.page-about .topbar, .page-404 .topbar { color: var(--ink); }
.about { max-width: 760px; margin: 0 auto; padding: clamp(40px, 10vh, 120px) var(--gutter) clamp(48px, 8vw, 110px); }
.about h1 { font-size: clamp(3.2rem, 9vw, 6.5rem); margin-bottom: clamp(28px, 5vw, 52px); }
.about-body p { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.5; margin: 0 0 1em; }
.contact { list-style: none; padding: 0; margin: clamp(28px, 5vw, 52px) 0 0; border-top: 1px solid var(--line); }
.contact li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-label { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.contact a { font-family: var(--serif); font-size: 1.4rem; overflow-wrap: anywhere; transition: color 0.2s; }
.contact a:hover { color: var(--accent); }
.about-back { margin-top: 44px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.about-back a:hover { color: var(--ink); }

/* ---------- footer ---------- */
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding: 40px var(--gutter) 44px; font-size: 0.74rem; color: var(--faint); }
.site-foot p { margin: 0; }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--ink); }

/* ---------- viewer: tour + full screen ---------- */
html.viewer-open, html.viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; background: hsl(var(--hue) var(--sat) 4%); color: #ece6dc; opacity: 0; transition: opacity 0.4s ease; }
[data-theme="light"] .viewer { background: hsl(var(--hue) calc(var(--sat) * 0.9) 93%); color: var(--ink); }
.viewer.is-open { opacity: 1; }
.viewer[hidden] { display: none; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(60px, env(safe-area-inset-top)) clamp(12px, 7vw, 110px) max(22px, env(safe-area-inset-bottom)); }
.slide img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); object-fit: contain; opacity: 0; transition: opacity 0.5s ease; box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8); }
.slide img.is-loaded { opacity: 1; }
.slide figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 22px; text-align: center; }
.slide-title { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.2; }
.slide-meta { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.6; }
.viewer-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgb(128 128 128 / 0.16); transition: background-color 0.2s, opacity 0.2s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.viewer-btn:hover { background: rgb(128 128 128 / 0.3); }
.viewer-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viewer-btn:disabled { opacity: 0; pointer-events: none; }
.viewer-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); }
.viewer-prev { left: clamp(10px, 2vw, 28px); }
.viewer-next { right: clamp(10px, 2vw, 28px); }
@media (hover: none) { .viewer-prev, .viewer-next { display: none; } }
.viewer-hint { position: absolute; left: 50%; top: max(24px, env(safe-area-inset-top)); transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 999px; background: rgb(128 128 128 / 0.16); font-size: 0.72rem; letter-spacing: 0.1em; white-space: nowrap; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.viewer.show-hint .viewer-hint { opacity: 0.8; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .topnav-rooms { display: none; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { display: none; }
  .doors { flex-direction: column; }
  .door { animation-name: door-open-side; }
  .door + .door { box-shadow: 0 -1px 0 rgb(0 0 0 / 0.6); }
  .door-label { bottom: 22px; }
  .door-name { font-size: clamp(2.2rem, 11vw, 3rem); }
  .lobby-foot { display: none; }
  .hang { padding-top: 24px; }
  .bay, .bay-offset, .bay-offset.bay-right, .bay-tall, .bay-pair { display: flex; flex-direction: column; gap: 56px; padding: 36px 0; }
  .bay .work, .bay-pair .work + .work { width: 100%; display: block; }
  .bay .work-frame { width: 100% !important; }
  .bay .placard { text-align: left !important; align-items: flex-start !important; margin: 18px 0 0 !important; }
  .next-door { height: 48vh; }
  .site-foot { flex-direction: column; }
  .slide { padding-left: 0; padding-right: 0; }
}
@keyframes door-open-side { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .work-frame img { opacity: 1; filter: none; transform: none; }
}
