/* Guest site. No web fonts and no external requests: the venue box is offline, so type
   comes from faces already on guests' devices (Didot / Bodoni on Apple, serif elsewhere). */

:root {
  --stage: #000000;      /* the hall with the lights down */
  --chalk: #f3efe8;      /* spotlit white */
  --silver: #aeb1b8;     /* chrome frame, secondary text */
  --smoke: #6e6e6e;      /* fine print */
  --violet: #8b5cff;     /* house lights */
  --siren: #e3203f;      /* sequin red: live indicator and errors only */

  --display: Didot, "Bodoni 72", "Bodoni MT", "Didot LT STD", "Playfair Display", "Times New Roman", serif;
  --text: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;

  --mirror-h: min(54vh, 620px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--stage); }

body {
  margin: 0;
  background: var(--stage);
  color: var(--chalk);
  font: 400 1rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible,
.visually-hidden:focus-visible + label {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* ---- masthead: the house lockup, as on the designer's films ---- */

.masthead {
  padding: 1.75rem 1rem 1.25rem;
  text-align: center;
}

.wordmark {
  margin: 0;
  font: 400 clamp(1.05rem, 2.1vw, 1.6rem)/1.2 var(--display);
  letter-spacing: 0.34em;
  margin-right: -0.34em; /* tracking adds a trailing gap; pull it back to stay centred */
  text-transform: uppercase;
}

.wordmark-sub {
  margin: 0.45rem 0 0;
  color: var(--silver);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
}

/* ---- layout ---- */

.show {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: start;
}

/* ---- the stage ---- */

.stage {
  position: sticky;
  top: 0;
  height: calc(100vh - 6.6rem); /* the first screen is masthead + stage, caption included */
  min-height: 560px;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  padding-top: 4vh;
  isolation: isolate;
}

.wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse 48% 46% at 50% 40%, rgb(139 92 255 / 0.34), transparent 100%);
  opacity: 0.55;
  transition: opacity 1.8s ease;
}

.beam {
  position: absolute;
  inset: 0 0 20% 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.03));
  clip-path: polygon(47% 0, 53% 0, 84% 100%, 16% 100%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 1.8s ease 0.3s;
}

.figure {
  position: relative;
  height: var(--mirror-h);
  aspect-ratio: 3 / 4; /* empty mirror; app.js sets the picture's own shape once one loads */
  max-width: 80%;
  transition: aspect-ratio 0.4s ease;
}

/* The runway: a long strip laid flat and seen in perspective, starting at the mirror's foot. */
.floor {
  position: absolute;
  z-index: -1;
  top: calc(4vh + var(--mirror-h) - 4px);
  left: 50%;
  width: calc(var(--mirror-h) * 0.75 * 1.12);
  height: 1400px;
  transform: translateX(-50%) perspective(520px) rotateX(66deg);
  transform-origin: top center;
  background:
    linear-gradient(90deg, transparent 0 30%, rgb(255 255 255 / 0.07) 50%, transparent 70% 100%),
    linear-gradient(to bottom, #1d1630, #0b0912 45%, #050408);
  border-inline: 3px solid rgb(139 92 255 / 0.75);
  box-shadow: 0 0 60px rgb(139 92 255 / 0.25);
}

.mirror {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(160deg, #1a1c22, #08080a 55%, #121318);
  /* chrome frame: bright inner rule, dark gap, dim outer rule */
  box-shadow: 0 0 0 1px #d5d8de, 0 0 0 6px #050505, 0 0 0 7px #5d6068;
  transition: box-shadow 1.6s ease;
}

.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain, not cover: never cut off a guest's head or feet. The frame matches the
     picture's shape (app.js), so bars only appear when max-width has to narrow it. */
  object-fit: contain;
  object-position: center;
  transition: filter 0.8s ease, opacity 1.6s ease;
}

.shot-still { opacity: 0; }

.mirror-prompt {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
}

.mirror-prompt-title {
  font: 400 clamp(1.4rem, 2.6vw, 2rem)/1.15 var(--display);
}

.mirror-prompt-hint {
  color: var(--silver);
  font-size: 0.92rem;
}

/* a pane of glass catching the light */
.sheen {
  position: absolute;
  inset: -40% 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgb(255 255 255 / 0.09) 50%, transparent 58%);
}

.reflection {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  height: 46%;
  object-fit: cover;
  object-position: center bottom;
  transform: scaleY(-1);
  opacity: 0;
  filter: blur(2px);
  -webkit-mask-image: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent 85%);
  mask-image: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent 85%);
  transition: opacity 2s ease 0.6s;
}

.stage-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4vh;
  margin: 0;
  padding: 0 1rem;
  text-align: center;
  font: 400 clamp(1rem, 1.7vw, 1.3rem)/1.3 var(--display);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px #000, 0 0 6px #000;
}

.stage-caption small {
  display: block;
  margin-top: 0.3rem;
  color: var(--silver);
  font: 400 0.8rem/1.3 var(--text);
  letter-spacing: 0.22em;
}

/* the hall falls away to black before the stage meets the panel */
.stage::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 14%;
  background: linear-gradient(to right, transparent, var(--stage));
  pointer-events: none;
}

/* states */

.stage[data-state="photo"] .mirror-prompt,
.stage[data-state="rendering"] .mirror-prompt,
.stage[data-state="ready"] .mirror-prompt { display: none; }

.stage[data-state="rendering"] #shot-photo { filter: brightness(0.5) saturate(0.6); }

.stage[data-state="rendering"] .sheen { animation: sweep 3.2s ease-in-out infinite; }

@keyframes sweep {
  from { transform: translateY(-45%); }
  to { transform: translateY(45%); }
}

/* the one staged moment: the frame falls away and the lights come up */
.stage[data-state="ready"] .mirror {
  box-shadow: 0 0 0 1px transparent, 0 0 0 6px transparent, 0 0 90px 10px rgb(139 92 255 / 0.35);
}
.stage[data-state="ready"] .shot-still { opacity: 1; }
.stage[data-state="ready"] .sheen { opacity: 0; }
.stage[data-state="ready"] .wash { opacity: 1; }
.stage[data-state="ready"] .beam { opacity: 1; }
.stage[data-state="ready"] .reflection { opacity: 0.5; }

/* ---- the panel ---- */

.panel {
  padding: 4vh clamp(1.25rem, 4vw, 4rem) 4rem;
  max-width: 44rem;
}

h1:focus { outline: none; } /* focused by script on view change, for screen readers */

h1 {
  margin: 0 0 1rem;
  font: 400 clamp(2rem, 3.6vw, 3.1rem)/1.08 var(--display);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 2.5rem;
  max-width: 34rem;
  color: var(--silver);
  font-size: 1.08rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  counter-increment: step;
  padding: 0 0 2.75rem 3.25rem;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.35rem;
  color: var(--silver);
  font: italic 400 2.1rem/1 var(--display);
}

h2 {
  margin: 0 0 0.6rem;
  font: 400 1.45rem/1.2 var(--display);
}

.step-note {
  margin: 0 0 1.1rem;
  max-width: 32rem;
  color: var(--silver);
  font-size: 0.95rem;
}

.photo-tips {
  margin: -0.4rem 0 1.4rem;
  padding: 0;
  max-width: 32rem;
  list-style: none;
  color: var(--silver);
  font-size: 0.95rem;
}

.photo-tips li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.45rem;
}

.photo-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.4rem;
  height: 1px;
  background: var(--silver);
}

.photo-tips strong { color: var(--chalk); font-weight: 500; }

.advice {
  margin: 1.2rem 0 0;
  padding: 1rem 0 0.2rem 1rem;
  max-width: 32rem;
  border-left: 2px solid var(--siren);
}

.advice h3 {
  margin: 0 0 0.6rem;
  font: 400 1.15rem/1.25 var(--display);
}

.advice ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--silver);
}

.advice li { margin-bottom: 0.5rem; }

.advice strong { display: block; color: var(--chalk); font-weight: 500; }

.advice-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.field-error {
  margin: 0.9rem 0 0;
  padding-left: 0.8rem;
  border-left: 2px solid var(--siren);
  font-size: 0.95rem;
}

.button {
  display: inline-block;
  padding: 0.95rem 1.7rem;
  border: 1px solid var(--chalk);
  border-radius: 0;
  background: var(--chalk);
  color: #000;
  font: 500 0.98rem/1 var(--text);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.button:hover:not(:disabled) { background: #fff; }

.button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.button-quiet {
  background: transparent;
  color: var(--chalk);
}

.button-quiet:hover:not(:disabled) {
  background: var(--chalk);
  color: #000;
}

.link-button {
  margin-top: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--silver);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover { color: var(--chalk); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

/* looks */

.season {
  margin: 1.4rem 0 0.7rem;
  color: var(--silver);
  font: 400 0.92rem/1.3 var(--text);
  letter-spacing: 0.06em;
}

.season:first-child { margin-top: 0.2rem; }

.look-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.9rem 0.7rem;
}

.look {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--silver);
  font: 400 0.82rem/1.3 var(--text);
  text-align: left;
  cursor: pointer;
}

.look img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 0.45rem;
  background: #111;
  filter: brightness(0.72);
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: filter 0.2s, outline-color 0.2s;
}

.look:hover img { filter: brightness(0.95); }

.look[aria-checked="true"] { color: var(--chalk); }

.look[aria-checked="true"] img {
  filter: none;
  outline-color: var(--chalk);
}

/* experience password */

.locked .stage { display: none; }

/* Alone on the page, so centred under the wordmark. */
.locked .show { grid-template-columns: minmax(0, 1fr); }

.locked .panel {
  margin: 0 auto;
  padding-top: 10vh;
  text-align: center;
}

.locked .lede { margin-inline: auto; }

.enter {
  display: grid;
  gap: 0.8rem;
  max-width: 22rem;
  margin: 0 auto;
  justify-items: center;
}

.enter-input { text-align: center; }

.enter-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver);
}

.enter-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming the page on focus */
  color: var(--chalk);
  background: transparent;
  border: 1px solid var(--silver);
  border-radius: 0;
}

.enter-input:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 2px;
}

/* consent */

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  max-width: 32rem;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.consent input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  accent-color: var(--chalk);
}

#walk + .step-note { margin: 0.9rem 0 0; }

/* waiting */

.progress {
  height: 2px;
  max-width: 32rem;
  background: #2a2a2e;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--chalk);
  transition: width 1s linear;
}

.progress-time {
  margin: 0.8rem 0 2rem;
  font-variant-numeric: tabular-nums;
}

.progress-time::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--siren);
}

/* what the render is working from: the guest's photo and the garment */
.sources {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  max-width: 22rem;
  margin-top: 2rem;
}

.source { margin: 0; }

.source img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  background: #0d0d10;
  box-shadow: 0 0 0 1px #3a3c42;
}

/* show the whole garment, not a crop of it */
.source img.source-garment { object-fit: contain; object-position: center; }

.source figcaption {
  margin-top: 0.6rem;
  color: var(--silver);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sources-join {
  margin-bottom: 1.6rem; /* centre on the images, not the captions */
  color: var(--silver);
  font: italic 400 1.6rem/1 var(--display);
}

.video-note {
  max-width: 32rem;
  margin: -1.2rem 0 2rem;
}

.video-note:empty { display: none; }

/* the filming bar sits between the note and the buttons */
#film-wait { margin: -0.8rem 0 2rem; }
#film-wait .progress-time { margin-bottom: 0; }

/* ---- colophon ---- */

.colophon {
  position: relative;
  padding: 2.5rem 1.25rem 3rem;
  background: var(--stage);
  color: var(--smoke);
  font-size: 0.82rem;
  text-align: center;
}

.colophon p { margin: 0.2rem 0; }
.colophon p:first-child { color: var(--silver); letter-spacing: 0.08em; }
.colophon .build { margin-top: 0.8rem; font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* ---- phones: the stage first, then the steps ---- */

@media (max-width: 860px) {
  :root { --mirror-h: min(52svh, 480px); }

  .show { grid-template-columns: minmax(0, 1fr); }

  .stage {
    position: relative;
    height: calc(var(--mirror-h) + 26svh);
    min-height: 0;
    padding-top: 2svh;
  }

  .stage::after { display: none; }

  .floor { top: calc(2svh + var(--mirror-h) - 4px); }

  .stage-caption { bottom: 2svh; }

  .panel { padding-top: 2.5rem; }

  .step { padding-left: 2.4rem; }

  .step::before { font-size: 1.7rem; top: -0.15rem; }

  .actions .button { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
