@font-face {
  font-family: 'Publica Play';
  src: url('/assets/fonts/publicaplay-light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: block;
}

:root {
  --paper: #ffffff;
  --ink: #121110;
  --periwinkle: #b8c0ff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Publica Play', ui-serif, Georgia, serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--periwinkle); color: var(--ink); }

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1200ms ease;
  z-index: 0;
}
#gl.is-ready { opacity: 1; }

/* 'coming soon' — printed on the glass, never refracted.
   main.js anchors it to the artwork's whitespace per slide
   (transform/width/color are set inline). */
#tagline {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 400ms cubic-bezier(0.33, 0.01, 0.2, 1);
  pointer-events: none;
  will-change: transform, opacity;
}
#tagline.is-on {
  opacity: 1;
  transition-duration: 780ms;
}
/* every appearance rises gently with the fade; the exit settles back down */
#tagline svg {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(12px);
  transition: transform 300ms cubic-bezier(0.33, 0.01, 0.2, 1);
}
#tagline.is-on svg {
  transform: none;
  transition-duration: 950ms;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.2, 1);
}

#fallback img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1800ms ease;
  z-index: 0;
}
#fallback img.on { opacity: 1; }

/* Cover-crop at every aspect; main.js sets each image's object-position
   to its focal point (this is the no-JS default, ~slide 1's charm). */
#fallback img { object-position: 51% 42%; }

.brand {
  position: fixed;
  top: clamp(24px, 6vh, 64px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.wordmark {
  margin: 0;
  font-weight: 700; /* synthesized — only the Light cut is licensed/shipped */
  font-size: clamp(33px, 3.74vw, 48px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px);
  animation: rise 1200ms cubic-bezier(0.22, 0.61, 0.2, 1) 250ms forwards;
}

/* Cover crops can run art right under the mark; a breath of paper light
   across the top of the pane keeps it crisp at every aspect — it reads as
   bloom on the glass, not a band. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 16vh;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 1;
}

.foot {
  position: fixed;
  bottom: clamp(16px, 4vh, 36px);
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Publica Play', ui-serif, Georgia, serif;
  font-weight: 300;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--ink);
  opacity: 0;
  animation: fade 1600ms ease 900ms forwards;
  pointer-events: none;
}

.foot { z-index: 2; }

@keyframes rise {
  to { opacity: 0.92; transform: none; }
}

@keyframes fade {
  to { opacity: 0.38; }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .wordmark, .foot { animation-duration: 1ms; animation-delay: 0ms; }
  #gl, #fallback img { transition-duration: 1ms; }
  #tagline, #tagline.is-on { transition-duration: 1ms; }
  #tagline svg, #tagline.is-on svg { transition-duration: 1ms; }
}
