:root {
  --ivory: #F6F1EA;
  --sand: #ECE3D6;
  --greige: #C9BCA9;
  --taupe: #A18D76;
  --espresso: #2E241C;
  --ink: #17110C;

  --bg: #17110C;
  --fg: #F6F1EA;
  --fg-mut: #C9BCA9;

  --hall-pad: clamp(130px, 22vh, 250px);
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.caps { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 30px; }

#cursor {
  position: fixed; z-index: 99; width: 30px; height: 30px;
  border: 1px solid var(--taupe); border-radius: 50%;
  pointer-events: none; opacity: 0; translate: -50% -50%;
  transition: opacity 0.4s, width 0.25s, height 0.25s, background 0.25s;
}
body.cursor-on #cursor { opacity: 1; }
#cursor.big { width: 52px; height: 52px; background: color-mix(in srgb, var(--taupe) 18%, transparent); }
@media (hover: none) { #cursor { display: none; } }

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 30px; color: var(--fg);
  background: linear-gradient(to bottom, var(--bg) 46%, transparent);
}
.bar .brand { display: flex; align-items: center; text-decoration: none; }
.bar .brand img { width: 36px; transition: opacity 0.6s; }
.bar .brand img.inv { position: absolute; opacity: 0; }
.bar .hall { opacity: 0.72; }
body.dark-hall .bar .brand img.pos { opacity: 0; }
body.dark-hall .bar .brand img.inv { opacity: 1; }
@media (max-width: 1400px) { .bar .hall { display: none; } }

.progress { position: fixed; bottom: 0; left: 0; z-index: 50; height: 2px; width: 0; background: var(--taupe); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }
.mreveal { overflow: hidden; padding-bottom: 0.08em; }
.mreveal .mr {
  display: inline-block; transform: translateY(120%);
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.mreveal.in .mr { transform: none; }

.hero {
  min-height: 100vh;
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 90px 20px 160px; position: relative; overflow: hidden;
}
.hero .inner { will-change: transform, opacity; }
.hero h1 {
  font-family: 'Cormorant Garamond', serif; font-weight: 500;
  font-size: clamp(46px, 10.5vw, 150px); line-height: 1;
  letter-spacing: 0.18em; margin-left: 0.18em; white-space: nowrap;
}
.hero h1 span {
  display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(10px);
  transition: opacity 1.2s ease, transform 1.2s ease, filter 1.2s ease;
}
body.loaded .hero h1 span { opacity: 1; transform: none; filter: blur(0); }
.hero .sub { margin-top: 36px; color: var(--fg-mut); opacity: 0; transition: opacity 1.4s ease 1s; }
.hero .tagline {
  margin-top: 20px; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: clamp(19px, 2.4vw, 25px); color: var(--fg-mut);
  opacity: 0; transition: opacity 1.4s ease 1.3s;
}
body.loaded .hero .sub, body.loaded .hero .tagline { opacity: 1; }

.enter {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  color: var(--fg-mut); opacity: 0; transition: opacity 1.4s ease 1.8s;
}
body.loaded .enter { opacity: 1; }
.enter span { white-space: nowrap; }
.enter .by-touch { display: none; }
@media (hover: none) {
  .enter .by-touch { display: inline; }
  .enter .by-pointer { display: none; }
}
.enter i { display: block; position: relative; width: 20px; height: 104px; }
.enter i::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 80px;
  margin-left: -0.5px; background: linear-gradient(to bottom, transparent, var(--fg-mut));
  transform-origin: top; animation: descend 2.8s ease-in-out infinite;
}
.enter i::after {
  content: ''; position: absolute; top: 72px; left: 50%; width: 16px; height: 16px;
  margin-left: -8px; border-right: 1px solid var(--fg-mut);
  border-bottom: 1px solid var(--fg-mut); transform: rotate(45deg);
  animation: nod 2.8s ease-in-out infinite;
}
@keyframes descend {
  0%, 100% { transform: scaleY(0.3); opacity: 0.35; }
  45% { transform: scaleY(1); opacity: 1; }
}
@keyframes nod {
  0%, 100% { transform: rotate(45deg) translate(-5px, -5px); opacity: 0.4; }
  45% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
}

.threshold { height: 200vh; position: relative; }
.threshold .stage-t {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 0 26px;
}
.threshold .phrase {
  font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: clamp(34px, 6.4vw, 82px); line-height: 1.14;
  text-align: center; text-wrap: balance; max-width: 15em;
  opacity: 0; will-change: transform, opacity;
}

.gallery-wrap { height: 880vh; position: relative; }
.gallery-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(18px, 3vh, 30px); padding: 86px 16px 44px;
}
.gallery-sticky::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 62% 54% at 50% 46%,
    rgba(246, 241, 234, 0.055), transparent 72%);
}
.g-title { color: var(--fg-mut); white-space: nowrap; }
@media (min-width: 641px) {
  .g-title {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

.ghost {
  opacity: 0.13;
  position: absolute; top: 50%; left: clamp(24px, 5vw, 96px);
  transform: translateY(-50%);
  font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: clamp(110px, 24vh, 250px); line-height: 0.78;
  color: var(--ivory); pointer-events: none;
  font-variant-numeric: tabular-nums; user-select: none;
  transition: opacity 0.5s ease;
}
@media (max-width: 899px) { .ghost { display: none; } }
.stage {
  position: relative; flex: 0 1 auto; overflow: hidden; will-change: mask-image;
  width: min(94vw, 60vh); aspect-ratio: 4 / 5;
  background: var(--sand);
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.5);
}
.work { position: absolute; inset: 0; will-change: opacity; }
.work picture { display: contents; }
.work img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }

#gleam {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 34%;
  z-index: 5; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  will-change: transform;
  background: linear-gradient(to top,
    transparent, rgba(246, 241, 234, 0.16) 38%,
    rgba(246, 241, 234, 0.38) 50%,
    rgba(246, 241, 234, 0.16) 62%, transparent);
}

.plate { text-align: center; padding: 0 24px; }
.plate .line { height: 1px; width: 46px; background: var(--taupe); margin: 0 auto 16px; }
.plate .row { overflow: hidden; }
.plate .swap { display: block; transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s; }
.plate.out .swap { transform: translateY(-105%); opacity: 0; }
.plate .title-line {
  display: flex; align-items: baseline; justify-content: center;
  gap: clamp(12px, 2vw, 20px); font-family: 'Cormorant Garamond', serif;
}
.plate .no {
  font-size: clamp(24px, 3.2vw, 34px); color: var(--taupe);
  font-variant-numeric: tabular-nums; font-style: italic;
}
.plate .ttl { font-size: clamp(27px, 3.8vw, 40px); }
.plate .spec { font-size: 12.5px; color: var(--fg-mut); margin-top: 8px; letter-spacing: 0.04em; }

.ticks {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.ticks i {
  display: block; height: 1px; width: 14px; background: var(--fg);
  opacity: 0.28; transition: width 0.45s ease, opacity 0.45s ease;
}
.ticks i.on { width: 34px; opacity: 1; }
@media (max-width: 640px) {
  .stage { width: min(84vw, 60vh); }
  .ticks { right: 10px; gap: 10px; }
  .ticks i { width: 9px; }
  .ticks i.on { width: 20px; }
}

.hall-head { margin-bottom: 40px; }
.hall-head .num { color: var(--fg-mut); margin-bottom: 14px; }
.hall-head h2 {
  font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: clamp(32px, 4.5vw, 52px); line-height: 1.1; text-wrap: balance;
}

.master { padding: var(--hall-pad) 0; }
.master .grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 70px; align-items: start; }
.master blockquote {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.25; margin: 26px 0 30px;
}
.master p:not(.caps) { color: var(--fg-mut); font-size: 15px; max-width: 34em; margin-bottom: 14px; }
.portrait figcaption { margin-top: 16px; color: var(--fg-mut); }
@media (max-width: 860px) {
  .master .grid { grid-template-columns: 1fr; gap: 44px; }
  .portrait { max-width: 360px; }
}

.tech { padding: var(--hall-pad) 0; }
.tech .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 30px;
  padding: 26px 0; flex-wrap: wrap;
  border-top: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
}
.tech .row:last-of-type { border-bottom: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); }
.tech .name { font-family: 'Cormorant Garamond', serif; font-size: 28px; }
.tech .desc { font-size: 14px; color: var(--fg-mut); max-width: 34em; }
.tech .after { margin-top: 26px; font-size: 13.5px; color: var(--fg-mut); }

.docs { padding: var(--hall-pad) 0; }
.docs .wall {
  display: flex; gap: clamp(18px, 2.2vw, 30px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: 30px;
  margin: 0 -30px; padding: 10px 30px 18px;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.docs .wall::-webkit-scrollbar { display: none; }
.docs .wall.dragging { cursor: grabbing; scroll-snap-type: none; }
.docs .wall.dragging .frame { cursor: grabbing; }
.docs figure {
  flex: 0 0 min(70vw, 320px); scroll-snap-align: start;
  display: flex; flex-direction: column;
}
.docs .frame {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; color: inherit;
}
.glazed { position: relative; display: block; }
.glazed img { width: 100%; background: var(--sand); }
.glazed::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55),
              inset 0 -1px 0 rgba(0, 0, 0, 0.22),
              inset 1px 0 0 rgba(255, 255, 255, 0.22),
              inset -1px 0 0 rgba(0, 0, 0, 0.14);
}
.glazed::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: screen; opacity: 0.75;
  background: linear-gradient(114deg,
    rgba(255, 255, 255, 0.15) 0 14%,
    rgba(255, 255, 255, 0.04) 27%,
    transparent 42%, transparent 72%,
    rgba(255, 255, 255, 0.07) 88%,
    rgba(255, 255, 255, 0) 100%);
  transition: opacity 0.6s ease, background-position 0.9s ease;
  background-size: 220% 100%; background-position: 60% 0;
}
.docs .frame, .portrait .glazed {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease;
}
.docs .frame:hover, .docs .frame:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 34px 64px rgba(0, 0, 0, 0.55);
}
.docs .frame:hover::after, .docs .frame:focus-visible::after {
  opacity: 1; background-position: 20% 0;
}
.docs figcaption { margin-top: 14px; font-size: 13px; color: var(--fg-mut); min-height: 5.6em; }
.docs figcaption b { display: block; font-weight: 500; color: var(--fg); margin-bottom: 3px; }
.docs .wall-steps {
  margin-top: 22px; display: flex; align-items: center; justify-content: center;
  gap: clamp(18px, 3vw, 34px);
}
@media (min-width: 900px) {
  .docs .wall {
    overflow: visible; cursor: default; margin: 0; padding: 6px 0 18px;
    scroll-snap-type: none;
  }
  .docs figure { flex: 1 1 0; }
  .docs .wall-steps { display: none; }
}
.docs .step {
  background: none; border: 0; padding: 8px 2px; font-family: inherit;
  color: var(--fg-mut); cursor: pointer; transition: color 0.4s ease, opacity 0.4s ease;
}
.docs .step:hover { color: var(--fg); }
.docs .step[disabled] { opacity: 0.3; cursor: default; }
.docs .wall-ticks { display: flex; align-items: center; gap: 10px; }
.docs .wall-ticks button {
  width: 22px; height: 12px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.docs .wall-ticks button::before {
  content: ''; display: block; height: 1px; width: 100%;
  background: var(--fg); opacity: 0.28;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.docs .wall-ticks button[aria-current="true"]::before { opacity: 1; transform: scaleX(1.5); }
.docs .hint { margin-top: 14px; text-align: center; color: var(--fg-mut); }
#viewer {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; background: var(--ink); color: var(--ivory);
}
#viewer::backdrop { background: color-mix(in srgb, var(--ink) 94%, transparent); }

#viewer picture { display: contents; }
#viewer img {
  width: min(94vw, 1100px); height: 64vh; object-fit: contain;
  background: var(--sand);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
#viewer .cap { text-align: center; font-size: 13px; color: var(--greige); max-width: 40em; }
#viewer .cap b {
  display: block; font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: 24px; color: var(--ivory); margin-bottom: 6px;
}
#viewer .nav {
  position: absolute; top: 0; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
#viewer .prev, #viewer .next {
  position: absolute; bottom: 0; height: 68px;
  display: flex; align-items: center;
}
#viewer .prev { left: 0; padding-left: 26px; }
#viewer .next { right: 0; padding-right: 26px; }
@media (min-width: 900px) {
  #viewer .prev, #viewer .next {
    top: 50%; bottom: auto; height: auto; transform: translateY(-50%);
    padding: 18px 30px;
  }
}
#viewer button {
  background: none; border: 0; color: var(--greige);
  cursor: pointer; font-family: inherit; padding: 10px 4px;
}
#viewer button:hover { color: var(--ivory); }
#viewer .count { font-variant-numeric: tabular-nums; color: var(--taupe); }
#viewer .sheet {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  padding: 76px 20px 84px;
}
@media (min-width: 900px) { #viewer .sheet { padding: 84px 120px 40px; } }
@media (max-height: 700px) { #viewer img { max-height: 52vh; } }

.finale {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 24px 80px;
}
.finale > img { width: 72px; margin-bottom: 44px; }
.finale .phrase-f {
  font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: clamp(30px, 5vw, 60px); line-height: 1.15; text-wrap: balance;
  max-width: 15em; margin-bottom: 54px;
}
.finale .btn {
  display: inline-block; text-decoration: none;
  font-size: 11.5px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 500;
  padding: 17px 44px; border: 1px solid var(--fg); border-radius: 2px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.finale .btn:hover { background: var(--ivory); color: var(--espresso); border-color: var(--ivory); }
.finale .foot { margin-top: 90px; display: flex; flex-direction: column; gap: 10px; }
.finale .foot a { text-decoration: none; color: var(--fg-mut); }
.finale .foot a:hover { color: var(--fg); }
.finale .foot .small { font-size: 12px; color: var(--fg-mut); }

@media (prefers-reduced-motion: reduce) {
  .docs .frame, .plate .swap, .ticks i, .docs .wall-ticks button::before { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mreveal .mr { transform: none; transition: none; }
  .hero h1 span, .hero .sub, .hero .tagline, .enter { opacity: 1; transform: none; filter: none; transition: none; }
  .enter { transform: translateX(-50%); }
  .enter i::before, .enter i::after { animation: none; }
}
