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

/* Shared with pages.css so the intro and the catalogue read as one site */
:root {
  --paper: #e8e3d7;
  --brass: #c8a86a;
}

html, body {
  margin: 0;
  background: #000;
  color: #d8d2c4;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  overscroll-behavior-y: none;
}

/* A mobile address bar sliding in and out changes 100vh mid-scroll. Two things
   follow from that, and the stage needs to survive both:

   1. The stage is fixed, not sticky. A sticky box has to be shorter than the
      scrollport to stay pinned, so the moment the viewport shrank it started
      scrolling with the page. Fixed is pinned to the top whatever happens.
   2. Its height is the LARGEST viewport (lvh, or a --vh that script.js only
      ever grows). Sizing to the current or the smallest viewport leaves a black
      strip the instant the bar hides; sizing to the largest means the bar can
      only ever cover the bottom edge, and nothing on screen moves.

   The vh fallbacks keep it working if the script never runs. */

/* Scroll length = how "slow" the video plays while scrolling */
.track {
  height: 700vh;
  height: 700lvh;
  height: calc(var(--vh, 1vh) * 700);
}

.stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
}

#canvas,
.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.overlay { pointer-events: none; }

/* Maison Colchia in Marcellus SC — engraved Roman small capitals — in
   polished gold, a small Bolnisi cross, and BORN RARE set small */
.brand { text-anchor: middle; }
.brand__halo { fill: url(#haloGrad); }
.brand__name {
  font-family: "Marcellus SC", "Trajan Pro", Georgia, serif;
  font-size: 42px;
  fill: url(#brandGold);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 12px rgba(240, 185, 95, 0.3));
}
.brand__cross {
  fill: url(#brandGold);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 6px rgba(240, 185, 95, 0.35));
}
.brand__tag {
  font-family: "Marcellus SC", Georgia, serif;
  font-size: 11px;
  fill: #e7c483;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9));
}

.hit {
  fill: transparent;
  pointer-events: none;
}
/* Only live at the end of the scroll, so an ordinary scroll is never
   intercepted earlier. The drag itself blocks page scrolling from JS —
   touch-action on an SVG child has no effect in Chrome or Safari. */
.stage.is-end .hit {
  pointer-events: all;
}

/* Way into the catalogue — centred at the top, and only once the map is on
   screen so it never competes with the animation. */
.enter {
  position: absolute;
  top: clamp(18px, 4vh, 42px);
  left: 50%;
  width: max-content;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4.5vw, 56px);
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage.is-end .enter {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Burnished gold lettering in the amber of the map illustration, with a slow
   sheen running across it so the links read as alive and pressable */
.enter a {
  position: relative;
  padding: 8px 2px;
  font: 500 clamp(13px, 1.5vw, 17px)/1 "Playfair Display", Georgia, serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: #e9b86a;
  background: linear-gradient(100deg, #a8692c 0%, #e9b86a 35%, #fff0c4 50%, #e9b86a 65%, #a8692c 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(240, 170, 90, 0.35));
  animation: gold-sheen 4.5s ease-in-out infinite;
  transition: filter 0.4s ease;
}
.enter a:nth-of-type(2) { animation-delay: 1.5s; }
.enter a:nth-of-type(3) { animation-delay: 3s; }
/* Letter-spacing leaves a gap after the last letter; take it back so the
   menu is centred on its letters, like the hint under it */
.enter a:last-child { margin-right: -0.22em; }

.enter a:hover,
.enter a:focus-visible {
  filter: drop-shadow(0 0 14px rgba(245, 185, 100, 0.75));
}

@keyframes gold-sheen {
  0% { background-position: 100% 0; }
  60%, 100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .enter a,
  .map-hint { animation: none; background-position: 50% 0; }
}

@media (max-width: 480px) {
  .enter { gap: 20px; }
  .enter a {
    font-size: 12px;
    letter-spacing: 0.14em;
  }
}

/* "Hover over the map": a line under the menu, shown for as long as the map
   is on screen, in the same burnished gold with a running sheen as the menu */
.map-hint {
  position: absolute;
  top: calc(clamp(18px, 4vh, 42px) + 46px);
  left: 50%;
  margin: 0;
  /* letter-spacing leaves a trailing gap; indent by the same to centre it */
  padding-left: 0.3em;
  transform: translateX(-50%);
  font: 500 13px/1.4 "Inter", system-ui, sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e9b86a;
  background: linear-gradient(100deg, #a8692c 0%, #e9b86a 35%, #fff0c4 50%, #e9b86a 65%, #a8692c 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(240, 170, 90, 0.35));
  animation: gold-sheen 4.5s ease-in-out infinite 1.1s;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.stage.is-end .map-hint { opacity: 1; transition-delay: 0.6s; }
.map-hint__touch { display: none; }
@media (hover: none) {
  .map-hint__mouse { display: none; }
  .map-hint__touch { display: inline; }
}

/* Next Exhibition — a gold outline button in three rows (name, countdown,
   address) at the top right. Narrower screens have no room beside the menu, so
   it moves to the bottom right, and on a phone to the bottom centre. */
.next-btn {
  position: absolute;
  top: calc(clamp(18px, 4vh, 42px) - 4px);
  right: clamp(18px, 3vw, 48px);
  display: grid;
  min-width: 232px;
  max-width: 280px;
  padding: 0;
  border: 1px solid rgba(214, 170, 96, 0.6);
  border-radius: 0;
  background: rgba(10, 7, 3, 0.55);
  color: #ecc77f;
  font-family: "Marcellus SC", Georgia, serif;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.next-btn span { padding: 10px 16px; line-height: 1.3; }
.next-btn span + span { border-top: 1px solid rgba(214, 170, 96, 0.35); }
.next-btn__title { font-size: 13px; letter-spacing: 0.22em; }
.next-btn__days { font-size: 15px; letter-spacing: 0.14em; }
.next-btn__place { font-size: 11px; letter-spacing: 0.12em; }
.stage.is-end .next-btn {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.next-btn:hover,
.next-btn:focus-visible {
  background: #e3b765;
  border-color: #e3b765;
  color: #120b04;
  outline: none;
}
@media (max-width: 1150px) {
  .next-btn {
    top: auto;
    /* sits above the phone and email in the same corner */
    bottom: calc(clamp(12px, 2.5vh, 28px) + 52px);
  }
}
@media (max-width: 600px) {
  .next-btn {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    right: 50%;
    transform: translate(50%, 8px);
  }
  .next-btn span { padding: 8px 14px; }
  .stage.is-end .next-btn { transform: translate(50%, 0); }
  .map-hint {
    top: calc(clamp(18px, 4vh, 42px) + 40px);
    font-size: 11px;
    letter-spacing: 0.22em;
  }
}

/* Sign-up dialog */
.signup {
  width: min(440px, calc(100% - 32px));
  padding: 44px clamp(22px, 6vw, 44px) 36px;
  border: 1px solid rgba(214, 170, 96, 0.45);
  background: #0c0905;
  color: #d8d2c4;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.signup::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.signup[open] { animation: signup-in 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes signup-in {
  from { opacity: 0; transform: translateY(14px); }
}
.signup__close {
  position: absolute;
  top: 10px;
  right: 14px;
  padding: 6px 8px;
  border: 0;
  background: none;
  color: rgba(232, 214, 176, 0.6);
  font: 300 26px/1 "Inter", sans-serif;
  cursor: pointer;
}
.signup__close:hover { color: #ecc77f; }
.signup__form { display: grid; gap: 18px; text-align: center; }
.signup__title {
  margin: 0;
  font: 400 30px/1.1 "Marcellus SC", Georgia, serif;
  letter-spacing: 0.06em;
  color: #ecc77f;
}
.signup__cross {
  width: 18px;
  height: 18px;
  margin: -4px auto 0;
  fill: #e3b765;
}
.signup__lead {
  margin: 0 0 6px;
  font: 400 14px/1.6 "Inter", sans-serif;
  color: rgba(232, 227, 215, 0.75);
}
.signup__field { display: grid; gap: 6px; text-align: left; }
.signup__field span {
  font: 400 10px/1 "Inter", sans-serif;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(232, 214, 176, 0.6);
}
.signup__field input {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(214, 170, 96, 0.4);
  border-radius: 0;
  background: transparent;
  color: #f0e8d8;
  font: 400 16px/1.2 "Inter", sans-serif;
  outline: none;
  transition: border-color 0.3s ease;
}
.signup__field input:focus { border-bottom-color: #e3b765; }
.signup__trap { position: absolute; left: -9999px; }
.signup__submit {
  margin-top: 10px;
  padding: 15px;
  border: 0;
  background: linear-gradient(100deg, #b98132, #ecc77f 50%, #b98132);
  color: #120b04;
  font: 400 13px/1 "Marcellus SC", Georgia, serif;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.3s ease;
}
.signup__submit:hover { filter: brightness(1.12); }
.signup__submit:disabled { opacity: 0.6; cursor: default; }
.signup__status {
  min-height: 1.2em;
  margin: 0;
  font: 400 13px/1.5 "Inter", sans-serif;
  color: #ecc77f;
}
.signup__status.is-error { color: #e08b6b; }

/* Hints */
.hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(232, 227, 215, 0.5);
  transition: opacity 0.8s ease;
  pointer-events: none;
  white-space: nowrap;
}

.hint--start {
  bottom: clamp(24px, 5vh, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hint--start i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--brass), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Keep the scroll hint clear of the social icons */
@media (max-width: 600px) {
  .hint--start { bottom: 64px; }
}

/* Loader — the wordmark, a rule that fills, and the count. Nothing else. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  background: #060607;
  transition: opacity 0.8s ease, visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }

.loader__mark {
  font: 500 clamp(13px, 2.4vw, 17px)/1 "Playfair Display", Georgia, serif;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--paper);
}

.loader__bar {
  width: min(56vw, 230px);
  height: 1px;
  background: rgba(232, 227, 215, 0.14);
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brass);
  transition: width 0.25s ease-out;
}

.loader p {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: rgba(232, 227, 215, 0.42);
}

/* Social icons and contact details (social.css) wait for the end of the video,
   like the menu. The inner pages have no .stage and show them straight away. */
.social,
.contact { transition: opacity 1s ease, visibility 1s; }
body:has(.stage:not(.is-end)) .social,
body:has(.stage:not(.is-end)) .contact { opacity: 0; visibility: hidden; }
