/* The guests' gallery, in the Momenti look: obsidian, the aurora as the one light, Jost Light,
   the Sempre logo as supplied. Made for a phone first; the same tokens as the photographer's
   app (see the sempre-brand skill there). */
:root {
  color-scheme: dark;
  --bg: #0A0B0D;
  --surface: #111317;
  --surface-2: #171A1F;
  --text: #F3F4F6;
  --text-2: #9AA0A8;
  --text-3: #5F646C;
  --aurora-a: #9AD6FF;
  --aurora-b: #B59CFF;
  --aurora: linear-gradient(135deg, var(--aurora-a), var(--aurora-b));
  --accent-glow: rgb(154 214 255 / 0.18);
  --aurora-glow-a: rgb(154 214 255 / 0.16);
  --aurora-glow-b: rgb(181 156 255 / 0.14);
  --primary: #F3F4F6;
  --primary-hover: #FFFFFF;
  --primary-text: #0A0B0D;
  --error: #FF8A80;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.18);
  --edge: rgb(255 255 255 / 0.24);
  --fill: rgb(255 255 255 / 0.03);
  --shadow-print: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 24px -8px rgb(0 0 0 / 0.55), 0 32px 64px -16px rgb(0 0 0 / 0.65);
  --radius: 2px;
  --ease: 200ms cubic-bezier(0.2, 0.6, 0.2, 1);
  --slow: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  min-height: 100%;
  background:
    radial-gradient(700px 420px at 15% -10%, var(--aurora-glow-a), transparent 62%) no-repeat,
    radial-gradient(560px 360px at 70% -14%, var(--aurora-glow-b), transparent 60%) no-repeat,
    var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  color: var(--text);
  font: 300 16px/1.5 "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
.wrap { max-width: 640px; margin: 0 auto; }
section { margin-top: 40px; animation: rise 700ms var(--slow) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* the masthead */
.masthead { text-align: center; padding-top: 8px; animation: rise 900ms var(--slow) both; }
.masthead .logo { display: block; width: 132px; height: auto; margin: 0 auto 18px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
h1 { margin: 10px 0 0; font: 300 34px/1.1 "Jost", system-ui, sans-serif; letter-spacing: -0.005em; }
h2 { margin: 0 0 16px; font: 300 22px/1.2 "Jost", system-ui, sans-serif; }
.when { margin: 12px 0 0; font-size: 14px; color: var(--text-2); }
.fine { margin: 14px 0 0; font-size: 13px; letter-spacing: 0.02em; color: var(--text-2); text-align: center; }

/* words and controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--fill);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease, opacity var(--ease);
}
.button:hover { border-color: rgb(255 255 255 / 0.5); }
.button:active { transform: scale(0.985); }
.button:disabled { opacity: 0.45; cursor: default; }
.button.primary {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  border-color: var(--primary);
  color: var(--primary-text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 8px 20px -8px rgb(0 0 0 / 0.5);
}
.button.big { width: 100%; min-height: 54px; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.row .button { flex: 1 1 160px; }
.row.between { align-items: center; justify-content: space-between; margin: 0; }
.row.between .button { flex: none; }

/* a print on the wall, with its frame of light */
.mount { position: relative; }
.mount img, #reel img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-print); }
.frame-light {
  position: absolute;
  inset: -7px;
  padding: 1.5px;
  border-radius: 3px;
  background: var(--aurora);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

/* the glimpse: one photo at a time, large and sharp, each for a fraction of a second, a clean
   cut to the next, under the studio's name written again and again across the whole picture;
   and the wall of all of them, softened, behind the unlock. A web page cannot forbid
   screenshots: this is why one is worth little, a small picture with the name all over it. */
#reel { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
#reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
#reel img.on { opacity: 1; }
/* the watermark: lines of the studio's name, set diagonally, covering the picture */
#watermark {
  position: absolute;
  inset: -40%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  transform: rotate(-28deg);
  pointer-events: none;
  opacity: 0.62;
}
#watermark span {
  white-space: nowrap;
  font: 300 clamp(16px, 5.4vw, 26px)/1 "Jost", system-ui, sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 0 2px rgb(0 0 0 / 0.55), 0 1px 10px rgb(0 0 0 / 0.35);
}
#watermark span:nth-child(even) { margin-left: -16%; }
#reel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgb(10 11 13 / 0.35) 100%);
  pointer-events: none;
}
#mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
#mosaic img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); filter: blur(7px) brightness(0.8); transform: scale(1.04); animation: rise 600ms var(--slow) both; animation-delay: calc(var(--i) * 40ms); }
#mosaic, #reel { pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#unlock { margin-top: 22px; position: relative; overflow: hidden; }
#unlock::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / 0.35) 50%, transparent 60%);
  background-size: 260% 100%;
  animation: sheen 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* unlocked: every photo, to look at and to keep */
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; margin-top: 22px; }
#grid figure { margin: 0; animation: rise 600ms var(--slow) both; animation-delay: calc(min(var(--i), 20) * 35ms); }
#grid img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-print); background: var(--surface); }
#grid a.button { width: 100%; margin-top: 8px; min-height: 38px; padding: 8px 10px; font-size: 13px; }
#grid img { cursor: zoom-in; }

/* the viewer: one photo, full size, over everything; its neighbours a swipe or a tap away */
#viewer {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(5 6 7 / 0.96);
  color: var(--text);
  overflow: hidden;
}
#viewer[open] { display: grid; grid-template-rows: 1fr auto; animation: fade 220ms var(--slow) both; }
#viewer::backdrop { background: rgb(5 6 7 / 0.9); }
@keyframes fade { from { opacity: 0; } }
#viewer-image { width: 100vw; height: 100%; min-height: 0; object-fit: contain; align-self: center; animation: rise 300ms var(--slow) both; touch-action: pan-y; }
#viewer-image.loading { opacity: 0.6; }
#viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
#viewer-count { font-size: 14px; color: var(--text-2); }
#viewer-bar .button { min-height: 42px; padding: 10px 18px; }
#viewer-close, .viewer-step {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 50%;
  background: rgb(10 11 13 / 0.55);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#viewer-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.viewer-step { top: 50%; transform: translateY(-50%); }
#viewer-prev { left: 12px; }
#viewer-next { right: 12px; }
#viewer-close svg, .viewer-step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .viewer-step { display: none; } } /* on a phone: swipe */

#message p { margin: 0; padding: 24px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); text-align: center; }
#message p.error { color: var(--error); }
.colophon { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.04em; color: var(--text-3); text-align: center; }

@media (min-width: 640px) {
  .masthead .logo { width: 150px; }
  h1 { font-size: 40px; }
  #grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
