/** Home page only. Shared tokens, buttons and the nav live in styles.css and nav.js. */

:root {
  --measure: 34em;
}

body {
  font-size: 17px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

main h2 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 16em;
}

main h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.lede {
  margin: 20px 0 0;
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}

.note {
  margin: 18px 0 0;
  max-width: var(--measure);
  font-size: 16px;
  color: var(--faint);
}

main p a,
.note a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

main > section {
  padding: clamp(72px, 11vw, 140px) 0 0;
}

/* hero: a room of real players on one real film */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 4.4vw, 60px) 28px 0;
}

/* the screen's light may spill past the column, never past the page */
main {
  overflow-x: clip;
}

/* the page shares the room's width so every section starts on the same edge */
main .wrap {
  max-width: 1180px;
}

.hero-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.room {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
  gap: clamp(16px, 2.2vw, 30px);
  align-items: stretch;
  margin-top: clamp(30px, 4vw, 52px);
}

/* the projector's light: a tiny copy of the playing frame, blurred far past recognition */
.seat-you {
  isolation: isolate;
}
.room-glow {
  position: absolute;
  z-index: -1;
  inset: -9% -7% -4%;
  pointer-events: none;
}
.room-glow canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: blur(56px) saturate(1.25);
  opacity: 0.36;
}

.seat {
  position: relative;
  margin: 0;
  min-width: 0;
}

.film {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 28px 70px rgba(0, 0, 0, 0.75);
}
.film video,
.film canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transport {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.t-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.t-btn:hover {
  background: var(--accent-hover);
}
.t-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.t-btn .i-pause,
.t-btn.is-playing .i-play {
  display: none;
}
.t-btn.is-playing .i-pause {
  display: block;
}

.t-seek {
  flex: 1;
  min-width: 0;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  --at: 0%;
}
.t-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--at), var(--track) var(--at));
}
.t-seek::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--at), var(--track) var(--at));
}
.t-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.t-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.t-seek:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.t-time,
.tc {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.t-time {
  flex: none;
  min-width: 4.6em;
  text-align: right;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}

.seat figcaption {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
}
.seat figcaption b {
  color: var(--ink);
  font-weight: 700;
}
.seat .tc {
  margin-left: auto;
  color: var(--online);
  font-weight: 700;
}
.seat .tc.is-off {
  color: var(--danger);
}

.bear {
  flex: none;
  display: block;
  width: 26px;
  height: 26px;
}
.bear svg {
  display: block;
  width: 100%;
  height: 100%;
}

.others {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 20px;
  min-width: 0;
  /* the chat's last line sits level with the bottom of the big screen */
  padding-bottom: 38px;
}
.others-screens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.others .seat figcaption {
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
}
.others .seat .tc {
  flex-basis: 100%;
  margin-left: 0;
  padding-left: 34px;
}

.chat {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-height: 190px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chat li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  animation: say 0.28s ease-out;
}
.chat li b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
}
.chat li.is-old {
  opacity: 0.45;
}

@keyframes say {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.room-hint {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.hero-facts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--faint);
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--online);
}

.film-credit {
  position: relative;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--faint);
}
.film-credit a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* screen share vs Watchbear */

.split-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 44px;
}
.split-card {
  margin: 0;
}
.split-card figcaption {
  margin-top: 14px;
  max-width: 30em;
  font-size: 15px;
  color: var(--muted);
}
.split-card figcaption b {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
/* a call re-encodes the picture: few pixels stretched wide, then softened */
.film-share canvas {
  image-rendering: auto;
  filter: blur(1.4px) contrast(0.9);
  transform: scale(1.03);
}

/* two column rows */

.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.two.flip {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
}

.need {
  margin: 22px 0 0;
  max-width: var(--measure);
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  color: var(--muted);
  font-size: 16px;
}
.need b {
  color: var(--ink);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 4px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}
.steps li:last-child {
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 44px;
  line-height: 0.9;
  color: var(--accent);
}
.steps b {
  color: var(--ink);
}

.shot {
  margin: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 28px 70px rgba(0, 0, 0, 0.75);
}
.shot figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--faint);
}

/* chat facts */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 40px 0 0;
}
.facts div {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-weight: 800;
  font-size: 19px;
}
.facts dd {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 30em;
}

/* comparison */

.table-wrap {
  margin-top: 40px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
thead th {
  font-size: 15px;
  color: var(--muted);
  font-weight: 700;
}
tbody th {
  font-weight: 700;
  color: var(--ink);
  width: 18%;
}
td {
  color: var(--muted);
}
.us {
  background: var(--accent-tint);
  color: var(--ink);
}
thead .us {
  color: var(--accent-text);
}

/* who it's for */

.apart-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.apart-list li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.apart-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* faq */

.faq .wrap {
  max-width: 820px;
}
.faq h2 {
  margin-bottom: 28px;
}
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 700;
  font-size: 18px;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(225deg);
}
.faq details p {
  margin: 0 0 22px;
  max-width: 40em;
  color: var(--muted);
}

/* closing */

.end {
  position: relative;
  text-align: center;
  padding-bottom: clamp(80px, 12vw, 150px);
  overflow: hidden;
}
/* a wide frame from the film, fading into the page */
.end-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(transparent, #000 38%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 38%, #000 70%, transparent);
}
.end .wrap {
  position: relative;
}
.end .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.end h2 {
  margin-top: 18px;
}
.end p {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 19px;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
  font-size: 15px;
  color: var(--muted);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.foot nav a:hover {
  color: var(--ink);
}

@media (max-width: 980px) {
  .hero-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .room {
    grid-template-columns: 1fr;
  }
  .chat {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .two,
  .two.flip,
  .split-pair,
  .facts,
  .apart-list {
    grid-template-columns: 1fr;
  }
  .split-pair {
    gap: 28px;
  }
  .lede,
  .hero-sub {
    font-size: 17px;
  }
  .others {
    padding-bottom: 0;
  }
}

/* short laptop screens keep the player's controls above the fold */
@media (min-width: 981px) and (max-height: 820px) {
  .hero h1 {
    font-size: clamp(40px, 4.4vw, 60px);
  }
}

@media (max-width: 480px) {
  .hero,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .transport {
    gap: 10px;
    padding: 36px 12px 12px;
  }
  .t-time {
    font-size: 15px;
  }
  .steps li {
    grid-template-columns: 40px 1fr;
    font-size: 17px;
  }
  .steps li::before {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .chat li {
    animation: none;
  }
}
