/* Room display. Everything here assumes a 1080p/4K screen viewed from ~4m:
   type is sized in vw/vh so it scales to whatever the projector actually is. */

html, body, .display { height: 100%; overflow: hidden; }
.display { cursor: none; background: var(--bg-0); }

/* ---------- start gate ---------- */

.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-2), var(--bg-0) 70%);
  cursor: default;
}
.gate-card { text-align: center; max-width: 34rem; padding: 2rem; }
.gate-mark { font-size: 2.5rem; color: var(--accent); margin-bottom: 1rem; }
.gate-card h1 { font-family: var(--font-display); font-size: 2.4rem; margin: 0 0 .4rem; font-weight: 500; }
.gate-screen { color: var(--ink-2); margin: 0 0 2rem; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.gate-btn {
  background: var(--accent); color: var(--accent-ink); border: 0;
  padding: 1rem 2.6rem; border-radius: 999px; font-size: 1.05rem; font-weight: 650;
  cursor: pointer; box-shadow: var(--shadow-2); transition: transform .15s, filter .15s;
}
.gate-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.gate-note { color: var(--ink-3); font-size: .82rem; margin-top: 1.4rem; }

/* ---------- scene switching ---------- */

.stage { position: fixed; inset: 0; }
.scene {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease;
}
.scene.active { opacity: 1; visibility: visible; }

/* ---------- holding ---------- */

.holding {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6vh 8vw;
  background: radial-gradient(100% 80% at 50% 10%, var(--bg-2), var(--bg-0) 75%);
}
.hold-logo { max-height: 14vh; max-width: 40vw; margin-bottom: 4vh; object-fit: contain; }
.hold-rule { width: 8vw; height: 2px; background: var(--accent); opacity: .8; margin-bottom: 4vh; }
.hold-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 5.4vw, 6rem); line-height: 1.08; margin: 0;
  letter-spacing: -.01em;
}
.hold-sub { color: var(--ink-1); font-size: clamp(1rem, 1.8vw, 2rem); margin: 2vh 0 0; font-weight: 300; }
.hold-meta {
  display: flex; gap: 2.5vw; margin-top: 5vh;
  color: var(--ink-2); font-size: clamp(.85rem, 1.15vw, 1.25rem);
  letter-spacing: .16em; text-transform: uppercase;
}
.hold-meta span:empty { display: none; }
.hold-clock {
  margin-top: 6vh; font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.4vw, 4rem); color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

/* ---------- agenda ---------- */

[data-scene="agenda"] { display: flex; flex-direction: column; padding: 5vh 6vw; }
.ag-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; padding-bottom: 2.5vh; border-bottom: 2px solid var(--line); flex: 0 0 auto;
}
.ag-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3.2vw, 3.4rem); margin: 0; }
.ag-sub { color: var(--ink-2); margin: .5vh 0 0; font-size: clamp(.85rem, 1.2vw, 1.3rem); }
.ag-clock {
  font-family: var(--font-mono); font-size: clamp(1.1rem, 2.2vw, 2.4rem);
  color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap;
}

.ag-list {
  list-style: none; margin: 0; padding: 3vh 0 0;
  flex: 1 1 auto; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.2vh;
}
.ag-item {
  display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: baseline;
  gap: 1.5vw; padding: 1.6vh 1.6vw; border-radius: var(--r-md);
  border-left: 4px solid transparent;
  transition: background .4s, border-color .4s, opacity .4s;
}
.ag-num {
  font-family: var(--font-mono); color: var(--ink-3);
  font-size: clamp(.8rem, 1.2vw, 1.3rem); font-variant-numeric: tabular-nums;
}
.ag-main { min-width: 0; }
.ag-item-title {
  font-size: clamp(1rem, 1.9vw, 2.1rem); font-weight: 500; line-height: 1.25;
}
.ag-speaker { color: var(--ink-2); font-size: clamp(.8rem, 1.15vw, 1.25rem); margin-top: .3vh; }
.ag-time {
  font-family: var(--font-mono); color: var(--ink-2);
  font-size: clamp(.8rem, 1.2vw, 1.3rem); font-variant-numeric: tabular-nums; white-space: nowrap;
}

.ag-item.done { opacity: .35; }
.ag-item.done .ag-item-title { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.ag-item.current {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  border-left-color: var(--accent);
}
.ag-item.current .ag-num { color: var(--accent); }
.ag-item.current .ag-item-title { color: var(--ink-0); font-weight: 650; }
.ag-item.current .ag-time { color: var(--accent); }

.ag-live {
  display: inline-flex; align-items: center; gap: .5em; margin-left: .8em;
  font-size: .5em; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); vertical-align: middle;
}
.ag-live::before {
  content: ''; width: .5em; height: .5em; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- deck ---------- */

[data-scene="deck"] { background: #000; }
.slide-wrap { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; opacity: 0; transition: opacity .28s ease;
}
.slide.on { opacity: 1; }

.slide-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2vh 2.5vw 1.8vh;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: var(--ink-1); font-size: clamp(.75rem, 1.05vw, 1.15rem);
  opacity: 0; transition: opacity .4s;
}
.slide-bar.show { opacity: 1; }
.slide-count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--accent); }

.slide-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.slide-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s ease; }

/* ---------- gallery ---------- */

[data-scene="gallery"] { background: #000; }
.gal-wrap { position: absolute; inset: 0; }
.gal-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0;
  transition: opacity 1.1s ease, transform 7s linear;
  transform: scale(1);
}
.gal-img.on { opacity: 1; transform: scale(1.04); }   /* slow Ken Burns drift */
.gal-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3vh 5vw; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  font-size: clamp(.9rem, 1.6vw, 1.8rem); color: var(--ink-0);
  opacity: 0; transition: opacity .6s;
}
.gal-caption.show { opacity: 1; }

/* ---------- interval ---------- */

[data-scene="interval"] { background: var(--bg-0); overflow: hidden; }
.int-aurora { position: absolute; inset: -20%; filter: blur(90px); opacity: .5; }
.int-aurora i {
  position: absolute; display: block; border-radius: 50%;
  width: 45vw; height: 45vw;
  animation: drift 26s ease-in-out infinite;
}
.int-aurora i:nth-child(1) { background: var(--accent); top: 5%;  left: 8%;  opacity: .40; }
.int-aurora i:nth-child(2) { background: #3b7bd8;       top: 35%; left: 55%; opacity: .34; animation-delay: -9s; }
.int-aurora i:nth-child(3) { background: #8e4bd0;       top: 55%; left: 20%; opacity: .28; animation-delay: -17s; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(12vw, -8vh) scale(1.15); }
  66%     { transform: translate(-9vw, 10vh) scale(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .int-aurora i { animation: none; }
  .gal-img.on { transform: none; }
}

.interval {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6vh 8vw;
}
.int-kicker {
  color: var(--ink-2); letter-spacing: .3em; text-transform: uppercase;
  font-size: clamp(.75rem, 1.15vw, 1.2rem); margin: 0 0 2vh;
}
.int-clock {
  font-family: var(--font-mono); font-weight: 300;
  font-size: clamp(4rem, 16vw, 18rem); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: var(--ink-0); text-shadow: 0 0 60px color-mix(in srgb, var(--accent) 40%, transparent);
}
.int-clock.ending { color: var(--accent); animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.int-msg { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 3.6rem); margin: 4vh 0 0; }
.int-sub { color: var(--ink-1); font-size: clamp(.9rem, 1.5vw, 1.6rem); margin: 1.5vh 0 0; font-weight: 300; }

.int-np {
  display: flex; align-items: center; gap: .8em; margin-top: 5vh;
  color: var(--ink-2); font-size: clamp(.8rem, 1.15vw, 1.2rem);
}
.np-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 1.1em; }
.np-bars i {
  width: 3px; background: var(--accent); border-radius: 2px;
  animation: eq .9s ease-in-out infinite;
}
.np-bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
.np-bars i:nth-child(2) { height: 90%; animation-delay: .15s; }
.np-bars i:nth-child(3) { height: 60%; animation-delay: .3s; }
.np-bars i:nth-child(4) { height: 100%; animation-delay: .45s; }
@keyframes eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* ---------- share ---------- */

[data-scene="share"] { background: #000; }
.share-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.share-status {
  position: absolute; top: 2.5vh; left: 2.5vw;
  display: flex; align-items: center; gap: .7em;
  padding: .6em 1.2em; border-radius: 999px;
  background: rgba(0,0,0,.62); backdrop-filter: blur(8px);
  font-size: clamp(.75rem, 1.05vw, 1.05rem); color: var(--ink-1);
}
.live-dot {
  width: .6em; height: .6em; border-radius: 50%;
  background: var(--live); animation: pulse 1.6s infinite;
}

/* ---------- message ---------- */

.msg {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 6vh 10vw;
  background: radial-gradient(100% 80% at 50% 40%, var(--bg-2), var(--bg-0) 75%);
}
.msg-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 7vw, 8rem); margin: 0; line-height: 1.1; }
.msg-body { color: var(--ink-1); font-size: clamp(1rem, 2.2vw, 2.4rem); margin: 3vh 0 0; font-weight: 300; }

[data-scene="blank"] { background: #000; }

/* ---------- connection badge ---------- */

.conn {
  position: fixed; right: 1.5vw; bottom: 1.5vh; z-index: 50;
  display: flex; align-items: center; gap: .5em;
  padding: .5em 1em; border-radius: 999px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  color: var(--warn); font-size: .8rem;
}
.conn-dot { width: .55em; height: .55em; border-radius: 50%; background: var(--warn); animation: pulse 1.2s infinite; }
