/* Home Slideshow — recreated from the Claude Design prototype `Slideshow.dc.html`.
   Values here mirror the prototype's inline styles one-for-one. */

:root {
  --fade: 1.4s;              /* cross-fade duration between slides */
  --ken-burns-scale: 1.08;   /* active-slide zoom target */
  --zoom-dur: 13.6s;         /* set from JS: slideSeconds + 1.6s */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body {
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #fff;
}

a { color: #fff; }
a:hover { color: #bbb; }

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

.stage {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.stage.is-idle { cursor: none; }

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity var(--fade) ease;
  will-change: opacity;
}

.slide.is-active {
  opacity: 1;
  z-index: 2;
}

/* Blurred, darkened copy of the photo fills the letterbox areas. */
.slide__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px) brightness(0.45);
  transform: scale(1.15);
}

/* The photo itself, never cropped. */
.slide__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
  transition: transform var(--zoom-dur) linear;
}

.slide.is-active .slide__photo.is-zooming {
  transform: scale(var(--ken-burns-scale));
}

/* ---------- counter ---------- */

.counter {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  transition: opacity 0.4s ease;
}

/* ---------- controls ---------- */

.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 18px 0 calc(22px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  transition: opacity 0.4s ease;
}

.stage.is-idle .controls,
.stage.is-idle .counter {
  opacity: 0;
}

.nav,
.music {
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
}

.nav {
  color: rgba(255, 255, 255, 0.85);
  font-size: 28px;
}

.play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.music {
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
}

.music[aria-pressed="true"] { color: #fff; }

.nav:hover,
.music:hover { color: #fff; }

.play:hover { background: rgba(255, 255, 255, 0.2); }

/* The prototype had no focus styling; a visible indicator is required for
   keyboard use, so controls get one without changing the resting look. */
.nav:focus-visible,
.play:focus-visible,
.music:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- status / empty state ---------- */

.status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-content: center;
  margin: 0;
  padding: 0 32px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  line-height: 1.6;
}

.status:not(:empty) { display: grid; }

@media (prefers-reduced-motion: reduce) {
  :root { --fade: 0.01s; }
  .slide__photo { transition: none; }
  .slide.is-active .slide__photo.is-zooming { transform: scale(1); }
  .counter, .controls { transition: none; }
}

/* ---------- access gate ---------- */

/* Until Supabase hands back a session the stage stays out of the way. */
body.is-locked .stage { visibility: hidden; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
}

.gate[hidden] { display: none; }

.gate__card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
}

.gate__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
}

.gate__blurb {
  margin: 6px 0 28px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.gate__label {
  margin-bottom: 7px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.gate__input {
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.gate__input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-color: transparent;
}

.gate__submit {
  margin-top: 4px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.gate__submit:hover:not(:disabled) { background: rgba(255, 255, 255, 0.86); }
.gate__submit:disabled { opacity: 0.55; cursor: default; }

.gate__submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.gate__error {
  margin: 16px 0 0;
  min-height: 1em;
  font-size: 13px;
  line-height: 1.5;
  /* 5.9:1 on black — readable without shouting. */
  color: #ff9a8c;
}

/* ---------- sign out ---------- */

.sign-out {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.sign-out:hover { color: #fff; }

.sign-out:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #000;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}
