@font-face {
  font-family: Manrope;
  src: url("/manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #111214;
  --surface: #1a1c1f;
  --text: #f3f3f2;
  --muted: #a9abb1;
  --accent: #efc49d;
  --line: #ffffff1f;
  font-family: Manrope, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 72rem);
  margin-inline: auto;
  min-height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .64rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.055em;
}

.wordmark-icon {
  position: relative;
  width: 2rem;
  height: 1.5rem;
  border-radius: .19rem .8rem .8rem .19rem;
  background: var(--accent);
}

.wordmark-icon::before,
.wordmark-icon::after {
  position: absolute;
  content: "";
  background: var(--background);
}

.wordmark-icon::before {
  inset: .34rem .35rem .34rem .63rem;
  border-radius: .1rem .55rem .55rem .1rem;
}

.wordmark-icon::after {
  top: .28rem;
  left: .22rem;
  width: .22rem;
  height: .2rem;
  border-radius: .04rem;
  box-shadow: 0 .37rem var(--background), 0 .74rem var(--background);
}

.home-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 3rem, 43rem);
  min-height: calc(100svh - 5rem);
  margin-inline: auto;
  padding-block: 4rem 11rem;
}

.home h1 {
  margin: 0;
  font-size: clamp(2.05rem, 5vw, 4.45rem);
  line-height: 1.08;
  letter-spacing: -.043em;
  font-weight: 700;
}

.intro {
  margin: .9rem 0 1.65rem;
  color: var(--muted);
  font-size: clamp(.98rem, 1.6vw, 1.125rem);
  line-height: 1.5;
}

.search {
  min-height: 4rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .4rem .4rem .4rem 1.15rem;
  background: var(--surface);
  border: 1px solid #383a40;
  border-radius: .8rem;
}

.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 .19rem #efc49d25; }

.search-icon {
  position: relative;
  width: .88rem;
  height: .88rem;
  flex: none;
  margin-right: .15rem;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  top: .65rem;
  left: .6rem;
  width: .4rem;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

.search input {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search input::placeholder { color: var(--muted); }

.search button {
  min-height: 3.1rem;
  padding: 0 1.6rem;
  border: 0;
  border-radius: .5rem;
  background: var(--accent);
  color: #24190f;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.search button:hover { background: #f8d5b6; }
.search-error { margin: .9rem 0 0; color: #ffba9e; line-height: 1.5; }
.search-error:empty { display: none; }

.room {
  min-height: 100vh;
}

.back-link {
  padding: .55rem .85rem;
  border-radius: .55rem;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: .94rem;
}

.back-link:hover { border-color: var(--accent); }

.room-content {
  width: min(100% - 3rem, 63rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3.25rem) 0 4rem;
}

.room h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.08; letter-spacing: -.048em; }
.film-meta { margin: .6rem 0 0; color: var(--muted); }

.stage {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 1.4rem;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: .85rem;
  overflow: hidden;
  background: #090a0b;
  box-shadow: 0 1rem 3rem #0006;
}

.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-message { padding: 1rem; text-align: center; color: var(--muted); }
.source-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.source-list button {
  padding: .6rem .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .55rem;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.source-list button:hover, .source-list button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
details { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
summary { cursor: pointer; width: fit-content; }
details p { max-width: 72ch; color: var(--muted); line-height: 1.65; }

@media (max-width: 40rem) {
  .site-header { min-height: 4rem; }
  .site-header, .room-content { width: calc(100% - 2rem); }
  .home-content { width: min(100% - 2.5rem, 43rem); min-height: calc(100svh - 4rem); padding-block: 3rem 9rem; }
  .search { gap: .6rem; padding-left: .85rem; }
  .search button { padding-inline: 1rem; }
  .stage { border-radius: .55rem; }
}
