:root {
  --bg: #07090a;
  --ink: #eef3f0;
  --muted: #8c9a95;
  --line: rgba(238, 243, 240, 0.14);
  --accent: #0d5c4a;
  --accent-ink: #f7fffb;
  --mint: #7be0a8;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  --top: calc(44px + env(safe-area-inset-top));
  --col: 34rem;
}

* { box-sizing: border-box; }

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Top bar: a slim breadcrumb. Every part is a dropdown. */

.hud-top {
  position: fixed;
  inset: 0 0 auto;
  /* Above the open chat and the plan sheet, so the breadcrumb and its menus always work. */
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  height: var(--top);
  padding: env(safe-area-inset-top) 0.6rem 0;
  background: linear-gradient(rgba(7, 9, 10, 0.92), rgba(7, 9, 10, 0));
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.crumb { position: relative; }

.crumb + .crumb::before {
  content: "/";
  margin-right: 0.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.crumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 34vw;
  height: 32px;
  padding: 0 0.45rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 700 0.85rem var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.crumb-btn svg { flex: none; color: var(--muted); }

.crumb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb-btn:hover,
.crumb-btn[aria-expanded="true"] { background: rgba(238, 243, 240, 0.08); }

.crumb-btn:not([aria-haspopup]) { cursor: default; }
.crumb-btn:not([aria-haspopup]):hover { background: none; }

.crumb-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 31;
  display: grid;
  min-width: 11rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 11, 12, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.crumb-menu[hidden] { display: none; }

.crumb-item {
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: 0.9rem var(--sans);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.crumb-item:hover { background: rgba(238, 243, 240, 0.08); }

.crumb-item[aria-current="true"] { color: var(--mint); font-weight: 700; }

/* A floor heading in the room menu: small grey caps, a line above the second floor. */
.crumb-head {
  padding: 0.4rem 0.7rem 0.15rem;
  color: var(--muted);
  font: 600 0.66rem var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crumb-head.is-split {
  margin-top: 0.3rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

/* Beats */

.beat {
  --sky: #0a1d18;
  --glow: #7be0a8;
  --tint: #0d5c4a;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--top);
  /* The chat line sits over the bottom of every beat; the page measures it into --horb-dock. */
  padding-bottom: var(--horb-dock, 0px);
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.copy {
  width: min(100% - 2.5rem, var(--col));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

h2 { font-size: clamp(2.4rem, 11vw, 4rem); }

h3 { font-size: clamp(2rem, 9.5vw, 3.4rem); }

.copy p { margin: 0.6rem 0 0; }

.lede {
  color: #cbd6d1;
  font-size: 1.15rem;
}

/* Viewer frame */

.view {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  background: #050607;
  box-shadow: inset 0 0 0 1px var(--line);
}

.room .view {
  flex: 1;
  width: min(100% - 1.5rem, var(--col));
  margin: 0.25rem auto 0;
}

.view::before {
  --c: rgba(238, 243, 240, 0.7);
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) top left / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) top right / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) top right / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) bottom left / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) bottom left / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) bottom right / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) bottom right / 1.5px 18px;
  background-repeat: no-repeat;
}

.view::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  pointer-events: none;
  background:
    linear-gradient(rgba(238, 243, 240, 0.45), rgba(238, 243, 240, 0.45)) center / 100% 1px,
    linear-gradient(rgba(238, 243, 240, 0.45), rgba(238, 243, 240, 0.45)) center / 1px 100%;
  background-repeat: no-repeat;
}

.hud {
  position: absolute;
  inset: auto 26px 22px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: rgba(238, 243, 240, 0.8);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-shadow: 0 1px 6px #050607;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* A live splat inside a frame */

.splat-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.splat-frame.is-ready { opacity: 1; }

.view.is-look .splat-frame { pointer-events: auto; }

.view.has-splat::after { display: none; }

.view.has-splat .hud {
  inset: auto 0 0;
  padding: 2.5rem 26px 22px;
  background: linear-gradient(transparent, rgba(5, 6, 7, 0.6));
  pointer-events: none;
}

.sample,
.look { display: none; }

.view.has-splat .sample,
.view.has-splat .look { display: inline-flex; }

.view-acts {
  position: absolute;
  right: 22px;
  bottom: 44px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
}

.host {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(238, 243, 240, 0.35);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.65);
  color: var(--ink);
  font: 600 0.85rem var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.view-acts .look {
  position: static;
  right: auto;
  bottom: auto;
}

.sample {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 4;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.6);
  color: rgba(238, 243, 240, 0.85);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px #050607;
  pointer-events: none;
}

.look {
  position: absolute;
  right: 22px;
  bottom: 44px;
  z-index: 4;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(238, 243, 240, 0.35);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.65);
  color: var(--ink);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}

.view.is-look .look {
  border-color: var(--mint);
  background: var(--accent);
}

.room .copy .credit {
  color: var(--muted);
  font-size: 0.8rem;
}

.host-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0.7rem 0 0;
  color: #cbd6d1;
  font-size: 0.88rem;
}

.host-call {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.host-wa {
  color: #25d366;
  font-weight: 650;
  text-decoration: none;
}

.host-number {
  min-width: 9em;
  flex: 1 1 9em;
  max-width: 16em;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid rgba(238, 243, 240, 0.25);
  border-radius: 999px;
  background: rgba(8, 11, 12, 0.45);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

.host-number:focus { outline: none; border-color: var(--mint); }

/* Room photos: one per frame, swiped sideways */

.shots {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar { display: none; }
.shots:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; border-radius: 22px; }

.shots img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  user-select: none;
}

.view.has-shots::after { display: none; }

/* The frame takes the photos' 4:3 and leaves room for the name and the line under it. */
.room .view.has-shots {
  flex: none;
  width: min(100% - 1.5rem, var(--col), max(14rem, (100dvh - var(--top) - var(--horb-dock, 0px) - 13rem) * 4 / 3));
  aspect-ratio: 4 / 3;
}

.room:has(.view.has-shots) { justify-content: center; }

.view.has-shots .hud {
  inset: auto 0 0;
  padding: 2.5rem 26px 22px;
  background: linear-gradient(transparent, rgba(5, 6, 7, 0.65));
  pointer-events: none;
}

.shot-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0 0 4px;
  border: 1px solid rgba(238, 243, 240, 0.3);
  border-radius: 50%;
  background: rgba(5, 6, 7, 0.55);
  color: var(--ink);
  font: 400 1.8rem/1 var(--sans);
  cursor: pointer;
}

.shot-nav.is-prev { left: 14px; }
.shot-nav.is-next { right: 14px; }
.shot-nav:hover { border-color: var(--mint); }
.shot-nav:disabled { opacity: 0; pointer-events: none; }

.shot-count {
  position: absolute;
  top: 20px;
  left: 38px;
  z-index: 4;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.6);
  color: rgba(238, 243, 240, 0.9);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.view.has-shots[data-splat] .look { display: inline-flex; }
.view.has-shots .host { display: inline-flex; }
.view.has-splat .shot-nav,
.view.has-splat .shot-count { display: none; }

@media (hover: none) {
  .shot-nav { display: none; }
}

/* Scene layers */

.scene {
  position: absolute;
  inset: -6%;
  background: radial-gradient(120% 75% at 50% 30%, var(--sky), #050607 72%);
  animation: orbit 16s ease-in-out infinite alternate;
}

.stars {
  position: absolute;
  inset: 0 0 40%;
  opacity: var(--stars, 0.35);
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.6) 0 0.8px, transparent 1.2px);
  background-size: 67px 53px, 41px 37px;
  background-position: 0 0, 19px 23px;
  animation: twinkle 5s ease-in-out infinite alternate;
}

.orb {
  position: absolute;
  top: 24%;
  left: 50%;
  width: clamp(5rem, 28vw, 10rem);
  aspect-ratio: 1;
  margin-left: calc(clamp(5rem, 28vw, 10rem) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff 0, var(--glow) 38%, transparent 72%);
  box-shadow: 0 0 90px 10px color-mix(in srgb, var(--glow) 35%, transparent);
  animation: bob 9s ease-in-out infinite alternate;
}

.splat {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.s1 {
  top: 38%;
  left: 4%;
  width: 52%;
  height: 30%;
  background: radial-gradient(closest-side, var(--tint), transparent);
  opacity: 0.8;
  animation: drift-a 11s ease-in-out infinite alternate;
}

.s2 {
  top: 28%;
  right: 2%;
  width: 44%;
  height: 38%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.28;
  animation: drift-b 13s ease-in-out infinite alternate;
}

.s3 {
  bottom: 22%;
  left: 26%;
  width: 56%;
  height: 22%;
  background: radial-gradient(closest-side, var(--tint), transparent);
  opacity: 0.55;
  animation: drift-a 15s ease-in-out infinite alternate-reverse;
}

.floor {
  position: absolute;
  inset: auto -40% 0;
  height: 50%;
  overflow: hidden;
  perspective: 240px;
  perspective-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to top, #000 25%, transparent);
  mask-image: linear-gradient(to top, #000 25%, transparent);
}

.grid {
  position: absolute;
  inset: -100% 0 0;
  transform-origin: 50% 100%;
  transform: rotateX(72deg);
  background-image: radial-gradient(circle, rgba(238, 243, 240, 0.75) 0 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  animation: dolly 3.2s linear infinite;
}

.view-moon .orb {
  background: #c9c4d8;
  box-shadow:
    inset -2.4rem -0.6rem 0 0 #16121f,
    0 0 70px 4px rgba(185, 180, 201, 0.18);
}

.view-rise .orb {
  top: 40%;
  -webkit-mask-image: linear-gradient(#000 52%, transparent 70%);
  mask-image: linear-gradient(#000 52%, transparent 70%);
}

.view-deep { --stars: 1; }

.view-deep .orb {
  top: 20%;
  width: clamp(3.5rem, 18vw, 6.5rem);
  margin-left: calc(clamp(3.5rem, 18vw, 6.5rem) / -2);
}

.view-deep .orb::after {
  content: "";
  position: absolute;
  inset: 38% -55%;
  border: 1.5px solid rgba(157, 180, 255, 0.55);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.view-villa { --stars: 0.15; }

.view-villa .orb {
  top: 22%;
  width: clamp(4rem, 22vw, 8rem);
  aspect-ratio: 3 / 5;
  margin-left: calc(clamp(4rem, 22vw, 8rem) / -2);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(#fff3df, var(--glow) 55%, #8a5228);
}

/* Hero */

.hero .view {
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero .view::before { inset: calc(var(--top) + 4px) 12px 12px; }

.hero .view::after { display: none; }

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: pan-y;
}

.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* A tall phone would crop the sides of these landscape photos, and the logo with them. */
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
}

@media (min-aspect-ratio: 4 / 3) {
  .hero-slides img { object-fit: cover; }
}

.hero-slides img.is-on { opacity: 1; }

.hero .view.has-slides::after {
  display: block;
  top: auto;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 62%;
  margin: 0;
  background: linear-gradient(transparent, rgba(5, 6, 7, 0.5) 42%, rgba(5, 6, 7, 0.92));
}

.hero .shot-nav { top: 40%; }
.hero .shot-count { top: calc(var(--top) + 8px); left: 18px; }

/* On a phone the photo sits in a 4:3 frame and the name goes under it, so the logo stays whole. */
@media (max-aspect-ratio: 4 / 3) {
  .hero .view {
    position: relative;
    inset: auto;
    flex: none;
    width: min(100% - 1.5rem, var(--col));
    aspect-ratio: 4 / 3;
    margin: 0.4rem auto 0;
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .hero .view.has-slides::after { display: none; }
  .hero-slides img { object-fit: cover; }
  .hero .shot-nav { top: 50%; }
  .hero .shot-count { top: 12px; }
}

.hero .copy {
  position: relative;
  z-index: 4;
  margin-top: 0.6rem;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

@media (min-aspect-ratio: 4 / 3) {
  .hero .copy { margin-top: auto; }
}

.hero h1 {
  font-size: clamp(4rem, 21vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  padding-bottom: 0.1em;
  background: linear-gradient(175deg, #fff 30%, #9fe3c6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.pair a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 9, 10, 0.55);
  text-decoration: none;
}

.pair a:hover { border-color: var(--mint); }

.pair strong { font-size: 1.15rem; }

.pair span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cue {
  position: absolute;
  bottom: calc(1rem + var(--horb-dock, env(safe-area-inset-bottom)));
  left: 50%;
  z-index: 4;
  margin: 0;
  padding-bottom: 1.6rem;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cue::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 1.2rem;
  background: var(--mint);
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

/* Rooms */

.room .copy {
  padding: 1.1rem 0 calc(1.4rem + env(safe-area-inset-bottom));
}

.room .copy p:not(.eyebrow) { color: #cbd6d1; }

/* Close */

.close {
  justify-content: center;
  background: radial-gradient(90% 60% at 50% 70%, rgba(13, 92, 74, 0.45), transparent 70%);
  text-align: center;
}

.close-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.close-acts .host-line {
  flex: 1 1 100%;
  justify-content: center;
  margin-top: 0;
}

.go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  min-width: min(100%, 16rem);
  padding: 0 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(123, 224, 168, 0.35), 0 10px 40px rgba(13, 92, 74, 0.55);
}

.go:hover { background: #12735d; }

.go.is-wa {
  background: #25d366;
  color: #062016;
  box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.45), 0 10px 40px rgba(13, 92, 74, 0.4);
}

.go.is-wa:hover { background: #1fa855; }

.quiet {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Entry when a beat is on screen */

.js .beat .copy > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .beat .copy > :nth-child(2) { transition-delay: 0.08s; }
.js .beat .copy > :nth-child(3) { transition-delay: 0.16s; }
.js .beat .copy > :nth-child(4) { transition-delay: 0.24s; }
.js .beat .copy > :nth-child(5) { transition-delay: 0.32s; }

.js .beat.is-on .copy > * {
  opacity: 1;
  transform: none;
}

.js .room .view {
  opacity: 0.35;
  transform: scale(0.94);
  transition: opacity 0.7s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .room.is-on .view {
  opacity: 1;
  transform: none;
}

.js .beat:not(.is-on) .scene,
.js .beat:not(.is-on) .scene * {
  animation-play-state: paused;
}

@keyframes orbit {
  from { transform: translate3d(-3%, 0, 0) rotate(-1.2deg) scale(1.04); }
  to { transform: translate3d(3%, -1%, 0) rotate(1.2deg) scale(1.08); }
}

@keyframes dolly {
  from { transform: rotateX(72deg) translate3d(0, 0, 0); }
  to { transform: rotateX(72deg) translate3d(0, 44px, 0); }
}

@keyframes bob {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 8%, 0); }
}

@keyframes drift-a {
  from { transform: translate3d(-6%, 0, 0) scale(1); }
  to { transform: translate3d(8%, -4%, 0) scale(1.12); }
}

@keyframes drift-b {
  from { transform: translate3d(4%, 3%, 0) scale(1.1); }
  to { transform: translate3d(-8%, -2%, 0) scale(0.95); }
}

@keyframes twinkle {
  from { opacity: calc(var(--stars, 0.35) * 0.6); }
  to { opacity: var(--stars, 0.35); }
}

@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .beat .copy > *,
  .js .room .view {
    opacity: 1;
    transform: none;
  }
}
