:root {
  --bg: #171211;
  --bg-deep: #211a18;
  --ink: #f7f0ea;
  --cream: #fff9f6;
  --accent: #c2808a;
  --line: rgba(255, 255, 255, .14);
  --shadow: rgba(0, 0, 0, .42);
}

* {
  box-sizing: border-box;
}
html {
  margin: 0;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: none;
}

html.menu-navigation {
  scroll-snap-type: none;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}
body.overlay-open { overflow: hidden; }
button { font: inherit; }

#gallery {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.slide-wrap {
  width: 100vw;
  height: 100svh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: .94;
  transition: opacity .42s ease, transform .48s cubic-bezier(.22, 1, .36, 1);
}
.slide-wrap:not(.visible) { opacity: .88; transform: translateY(12px) scale(.992); }
.slide-wrap.visible { opacity: 1; transform: translateY(0) scale(1); }
.slide-frame {
    position: relative;

    display: inline-block;
    width: fit-content;
    height: fit-content;
    max-width: 95vw;
    max-height: 92vh;

    max-width: 95vw;
    max-height: 92vh;

    overflow: hidden;

    border-radius: 12px;
    background: #000;

    box-shadow: 0 26px 90px var(--shadow);

    cursor: zoom-in;
    outline: none;
}
.slide-frame:focus-visible {
  box-shadow: 0 0 0 4px var(--cream), 0 26px 90px var(--shadow);
}
.slide-frame img {
    display: block;

    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;

    max-width: 95vw;
    max-height: 92vh;

    object-fit: contain;

    background: #000;

    user-select: none;
    -webkit-user-drag: none;
}

.menu-button {
  position: fixed;
  z-index: 140;

  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  right: auto;
  transform: translateX(-50%);

  width: max-content;
  min-width: 0;
  min-height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 9px 15px;

  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;

  background: rgba(23, 18, 17, .9);
  color: #fff;

  box-shadow: 0 8px 26px rgba(0, 0, 0, .32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  cursor: pointer;
  white-space: nowrap;

  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;

  transition:
    opacity .2s ease,
    visibility .2s ease,
    background .2s ease;
}

.menu-button:hover,
.menu-button:focus-visible {
  background: #4b2831;
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.menu-icon { display: grid; gap: 3px; }
.menu-icon i { display: block; width: 16px; height: 1px; background: currentColor; }

.menu-button.drawer-is-open {
  left: max(18px, env(safe-area-inset-left));
  right: auto;
  transform: none;

  background: rgba(23, 18, 17, .96);
}

.drawer {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(75, 40, 49, 0);
  visibility: hidden;
  pointer-events: none;
  transition: background .35s ease, visibility .35s ease;
}
.drawer.open {
  visibility: visible;
  pointer-events: auto;
  background: rgba(75, 40, 49, .34);
}
.drawer-panel {
  position: relative;
  width: min(580px, 100%);
  height: 100%;
  padding:
    max(32px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    42px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 70% 15%, #4b3333 0, transparent 35%),
    linear-gradient(155deg, #211a18 0%, #171211 65%, #120e0d 100%);
  color: var(--ink);
  box-shadow: -24px 0 80px rgba(0, 0, 0, .48);
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.drawer-close:hover,
.drawer-close:focus-visible { background: #fff; outline: 2px solid var(--ink); outline-offset: 3px; }
.drawer-eyebrow {
  margin: 70px 0 10px;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 11px;
}
.drawer h1 {
  margin: 0 0 32px;
  font-family: Georgia, serif;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 400;
  line-height: 1;
}
.theme-nav { display: grid; border-top: 1px solid var(--line); }
.theme-nav button {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 15px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.theme-nav button span {
    width: 100%;
    white-space: nowrap;
    font-family: Georgia, serif;
    font-size: clamp(18px, 2.5vw, 25px);
}


.theme-nav button:hover,
.theme-nav button:focus-visible { padding-left: 12px; background: rgba(255, 255, 255, .28); outline: none; }

.explore-neo-florals {
  position: absolute;
  z-index: 20;

  left: 50%;
  bottom: 70px;

  transform: translateX(-50%);

  min-height: 48px;
  padding: 12px 24px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);

  background: rgba(23,18,17,.88);
  color: #fff;

  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition: .25s ease;
}

.explore-neo-florals:hover,
.explore-neo-florals:focus-visible {
  background: #c2808a;
  transform: translateX(-50%) translateY(-2px);
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.return-home {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  background: rgba(75, 40, 49, .88);
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: clamp(9px, 1vw, 12px);
  cursor: pointer;
}
.return-home:hover,
.return-home:focus-visible { background: #4b2831; outline: 2px solid #fff; outline-offset: 3px; }

.viewer {
position: fixed;
z-index: 200;
inset: 0;
display: none;
overflow: hidden;
background: #000;
touch-action: none;
overscroll-behavior: none;
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}
.viewer.open { display: block; }
.viewer img {
position: absolute;
top: 50%;
left: 50%;
display: block;
width: 100vw;
height: 100svh;
object-fit: contain;
background: #000;
transform-origin: center center;
transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(1);
will-change: transform;
user-select: none;
-webkit-user-select: none;
-webkit-user-drag: none;
touch-action: none;
cursor: grab;
}
.viewer img.is-animating { transition: transform .26s cubic-bezier(.22, 1, .36, 1); }
.viewer.zoomed img { cursor: grabbing; }
.viewer button {
position: absolute;
z-index: 3;
width: 46px;
height: 46px;
border: 1px solid rgba(255, 255, 255, .34);
border-radius: 50%;
background: rgba(0, 0, 0, .46);
color: #fff;
cursor: pointer;
font-size: 20px;
touch-action: manipulation;
}
.viewer button:hover,
.viewer button:focus-visible { background: rgba(75, 40, 49, .92); outline: 2px solid #fff; outline-offset: 3px; }
.viewer-close { top: 18px; right: 18px; }
.viewer-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 18px; top: 50%; transform: translateY(-50%); }
.viewer-count {
position: absolute;
z-index: 3;
bottom: 18px;
left: 50%;
transform: translateX(-50%);
padding: 8px 12px;
border-radius: 999px;
background: rgba(0, 0, 0, .46);
color: #fff;
font-size: 11px;
letter-spacing: .14em;
pointer-events: none;
}
.viewer.zoomed .viewer-prev,
.viewer.zoomed .viewer-next { opacity: 0; visibility: hidden; pointer-events: none; }
body.menu-open .menu-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 700px) {
  .menu-button {
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    min-width: 0;
    padding: 9px 14px;
  }
  .slide-frame { width: min(96vw, calc((100svh - 76px) * 16 / 9)); border-radius: 8px; }
  .drawer-panel { padding-left: 22px; padding-right: 22px; }
  .drawer-eyebrow { margin-top: 62px; }
  .drawer h1 { margin-bottom: 24px; }
  .theme-nav button { min-height: 58px; }
  .theme-nav button span { font-size: clamp(16px, 4.7vw, 21px); }
  .return-home { bottom: 8px; min-height: 38px; padding: 8px 13px; }
  .viewer-prev, .viewer-next { top: auto; bottom: 16px; }
  .viewer-count { bottom: 72px; }
  .explore-neo-florals { bottom: 12px; min-height: 40px; padding: 9px 14px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide-wrap, .drawer, .drawer-panel { transition: none; }
}

/* Smooth final recenter after a pinch-to-dezoom. */
.viewer img{transition-timing-function:cubic-bezier(.22,1,.36,1)}

/* Camera-like zoom in the main gallery.
   The PNG remains static. The complete slide frame moves toward the viewport. */
.slide-wrap { overflow: hidden; }
.slide-frame {
  overflow: visible;
  touch-action: none;
  transform-origin: center center;
  will-change: transform;
}
.slide-frame img {
  transform: none !important;
  will-change: auto;
}
.slide-frame.inline-animating {
  transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.slide-frame.inline-zoomed {
  z-index: 30;
  touch-action: none;
  cursor: grab;
}
.slide-frame.inline-zoomed img { cursor: grabbing; }
body.gallery-image-zoomed { overscroll-behavior: none; }
body.gallery-image-zoomed .menu-button {
  pointer-events: none;
  opacity: .28;
}


/* Smartphone landscape layout: preserve a visible visual gap between slides. */
@media (orientation: landscape) and (max-height: 600px) {
  #gallery {
    background: var(--bg);
  }

  .slide-wrap {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    padding:
      max(16px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
    background: var(--bg);
    overflow: hidden;
  }

  .slide-frame {
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100svh - 32px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    box-shadow: 0 12px 42px rgba(0, 0, 0, .48);
  }

  .slide-frame img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100svh - 32px);
    object-fit: contain;
  }

  .menu-button {
    top: max(8px, env(safe-area-inset-top));
    min-height: 36px;
    padding: 7px 12px;
    font-size: 10px;
  }

  .explore-neo-florals,
  .return-home {
    bottom: 8px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 8px;
  }

  .viewer img {
    width: 100vw;
    height: 100svh;
    max-width: none;
    max-height: none;
  }
}

html,body{width:100%;height:100%;overflow:hidden;scroll-snap-type:none}#gallery{width:100%;height:100vh;height:100dvh;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scroll-snap-type:y mandatory;touch-action:pan-y}.slide-wrap{width:100%;height:100vh;height:100dvh;min-height:100vh;min-height:100dvh;scroll-snap-align:start;scroll-snap-stop:always;overflow:hidden;contain:layout paint}.slide-frame,.slide-frame img{touch-action:pan-y pinch-zoom}.slide-frame{transform:none!important}.slide-frame.inline-zoomed{z-index:35;transform-origin:center;will-change:transform}.slide-frame.inline-animating{transition:transform .26s cubic-bezier(.22,1,.36,1)!important}body.overlay-open #gallery{overflow:hidden}@media(orientation:landscape) and (max-height:600px){.slide-wrap{height:100dvh;min-height:100dvh}.slide-frame,.slide-frame img{max-height:calc(100dvh - 32px)}}


/* Prevent the previous PNG from persisting in the mobile compositor during slide changes. */
.viewer { isolation: isolate; }
.viewer img { opacity: 1; }
.viewer.is-changing-slide img { opacity: 0; }
