/* ---------------------------------------------------------------------------
   game-night.css — the game-night page (/game-night/): game night for
   someone new to it, as a landing page. It builds on friends.css (the head,
   the light Host button, the game cards and section heads) and keeps the
   room's rule: the chrome is achromatic, a saturated pixel is a game's, and
   the session's four seat colours (--seat) mark only a seat or a player.
--------------------------------------------------------------------------- */

.night main {
  flex: 1;
}

.night-head__games {
  color: var(--dust);
  font-size: var(--step--1);
  font-variation-settings: 'wdth' 100, 'wght' 650;
  transition: color 0.15s var(--ease);
}

.night-head__games:hover,
.night-head__games:focus-visible {
  color: var(--light);
}

/* The quiet way on, beside the light button. */
.night-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.7rem 1.3rem;
  border-radius: 0.95rem;
  border: 1px solid var(--hair-bright);
  font-variation-settings: 'wdth' 100, 'wght' 720;
  transition:
    background-color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.night-button:hover,
.night-button:focus-visible {
  background: var(--riser);
  border-color: var(--light);
}

.night-section {
  padding: 0 var(--wide);
  margin-bottom: clamp(3.5rem, 2.4rem + 4vw, 7rem);
}

.night-section .section-head {
  margin-bottom: 1.4rem;
}

/* --- the first screen ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5.5rem);
  padding: clamp(1.25rem, 0.6rem + 3vw, 4rem) var(--wide) clamp(3.5rem, 2.2rem + 5vw, 7.5rem);
}

.hero__eyebrow {
  color: var(--dust);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-variation-settings: 'wdth' 110, 'wght' 700;
}

.hero__title {
  margin: 0.5rem 0 1.2rem;
  font-size: clamp(2.6rem, 1rem + 5.2vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: 'wdth' 112, 'wght' 900;
  text-wrap: balance;
  text-shadow: 0 0 2.5rem rgba(243, 238, 247, 0.16);
}

.hero__lead {
  max-width: 34rem;
  color: var(--dust);
  font-size: var(--step-1);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.2rem;
  margin-top: 2rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.4rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--dust);
  font-size: var(--step--1);
}

.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* A tick before each. */
.hero__facts li::before {
  content: '';
  flex: none;
  width: 1rem;
  height: 1rem;
  background: var(--light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Three games' frames, the front one a screen with a round's standings over it. */
.hero__shot {
  position: relative;
  aspect-ratio: 1 / 0.84;
  min-width: 0;
  isolation: isolate;
  /* The standings scale with the picture (cqi), so they cover the same part of it at any size. */
  container-type: inline-size;
}

/* The four players' colours, faint, under the screen. */
.hero__shot::before {
  content: '';
  position: absolute;
  inset: 18% 14%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 30deg, #e8443a, #3b82f6, #22c55e, #f5b700, #e8443a);
  filter: blur(4.5rem);
  opacity: 0.2;
}

.hero__frame {
  position: absolute;
  width: 54%;
  height: auto;
  border-radius: 0.9rem;
  border: 1px solid var(--hair-bright);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.55);
  opacity: 0.55;
}

.hero__frame--back {
  top: 0;
  inset-inline-end: 0;
  transform: rotate(5deg);
}

.hero__frame--side {
  bottom: 10%;
  inset-inline-start: 0;
  transform: rotate(-6deg);
}

.hero__screen {
  position: absolute;
  top: 7%;
  inset-inline: 8% 10%;
  aspect-ratio: 4 / 3;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(243, 238, 247, 0.24);
  box-shadow:
    0 0 0 0.4rem rgba(12, 9, 16, 0.7),
    0 2.5rem 5rem rgba(0, 0, 0, 0.65);
}

.hero__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__board {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 54cqi;
  /* Everything in the board is in em, from this. */
  font-size: max(0.6rem, 2.55cqi);
  padding: 1.05em 1.1em 0.95em;
  border-radius: 1.2em;
  background: rgba(20, 16, 25, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--hair-bright);
  box-shadow: 0 1.6rem 3.2rem rgba(0, 0, 0, 0.6);
}

.hero__board:empty {
  display: none;
}

.board__eyebrow {
  margin-bottom: 0.75em;
  color: var(--dust);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-variation-settings: 'wdth' 106, 'wght' 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board__rows {
  display: grid;
  gap: 0.38em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board__row {
  display: grid;
  grid-template-columns: 1.1em 0.65em minmax(0, 1fr) auto 2.4em;
  align-items: center;
  gap: 0.65em;
  padding: 0.5em 0.75em;
  border-radius: 0.75em;
  border: 1px solid transparent;
  background: rgba(243, 238, 247, 0.05);
}

.board__row:first-child {
  background: color-mix(in oklab, var(--seat) 16%, transparent);
  border-color: color-mix(in oklab, var(--seat) 45%, transparent);
}

.board__place {
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}

.board__dot {
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: var(--seat);
  box-shadow: 0 0 0.7em var(--seat);
}

.board__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variation-settings: 'wdth' 100, 'wght' 650;
}

.board__points {
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 100, 'wght' 820;
}

.board__gain {
  color: var(--dust);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.board__caption {
  margin-top: 0.7em;
  color: var(--dust-dim);
  font-size: 0.8em;
}

/* --- how it works ----------------------------------------------------------------- */

.how__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  column-gap: 0.9rem;
  row-gap: 0.2rem;
  padding: 1rem 1rem 1.3rem;
  border-radius: 1.2rem;
  background: var(--riser);
  border: 1px solid var(--hair);
}

.how-step__art {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  height: 9rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem;
  border-radius: 0.85rem;
  background:
    radial-gradient(90% 120% at 50% 0%, color-mix(in oklab, var(--seat) 13%, transparent), transparent 70%),
    var(--room);
  border: 1px solid var(--hair);
  overflow: hidden;
}

.how-step__n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--seat);
  color: var(--room-deep);
  font-variation-settings: 'wdth' 100, 'wght' 860;
}

.how-step__title {
  margin: 0;
  font-size: var(--step-1);
  line-height: 2.2rem;
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.how-step__text {
  color: var(--dust);
  font-size: var(--step--1);
  line-height: 1.5;
}

/* Step 1: the table, the host's seat taken and one still open. */
.mini-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(100%, 17rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-seats li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 0.6rem;
  background: color-mix(in oklab, var(--seat) 10%, var(--room));
  border: 1px solid color-mix(in oklab, var(--seat) 36%, transparent);
  font-size: var(--step--2);
}

.mini-seats__puck {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--seat);
  color: var(--room-deep);
  font-variation-settings: 'wdth' 100, 'wght' 860;
}

.mini-seats__name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variation-settings: 'wdth' 100, 'wght' 680;
}

.mini-seats__tag {
  margin-inline-start: auto;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid var(--hair-bright);
  color: var(--dust);
}

.mini-seats .is-open {
  background: transparent;
  border-style: dashed;
  border-color: var(--hair-bright);
  color: var(--dust);
}

.mini-seats .is-open .mini-seats__puck {
  background: transparent;
  color: var(--dust);
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--seat) 70%, transparent);
}

/* Step 2: the invite link, just copied. */
.invite-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--riser-lit);
  border: 1px solid var(--hair-bright);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.4);
  font-size: var(--step--1);
}

.invite-pill svg {
  flex: none;
  color: var(--dust);
}

.invite-pill__url {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variation-settings: 'wdth' 92, 'wght' 600;
}

.invite-pill__done {
  flex: none;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--seat);
  color: #fff;
  font-size: var(--step--2);
  font-variation-settings: 'wdth' 100, 'wght' 760;
}

/* Step 3: the podium. */
.podium {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 100%;
  padding-top: 0.3rem;
}

.podium__step {
  display: flex;
  justify-content: center;
  width: 3.1rem;
  height: var(--h);
  border-radius: 0.55rem 0.55rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, var(--seat), color-mix(in oklab, var(--seat) 55%, var(--room)));
  box-shadow: 0 0 1.6rem color-mix(in oklab, var(--seat) 30%, transparent);
}

.podium__step span {
  margin-top: 0.35rem;
  color: var(--room-deep);
  font-variation-settings: 'wdth' 100, 'wght' 880;
}

/* --- a round, beat by beat ------------------------------------------------------------ */

.show__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The line the beats sit on. */
.show__track::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  inset-inline: 1.5rem;
  height: 1px;
  background: var(--hair-bright);
}

.show-beat {
  position: relative;
  min-width: 0;
}

.show-beat__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
}

.show-beat--lit .show-beat__icon {
  background: var(--light);
  border-color: var(--light);
  color: var(--room-deep);
  box-shadow: 0 0 2.4rem rgba(243, 238, 247, 0.3);
}

.show-beat__title {
  margin: 0 0 0.3rem;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.show-beat__text {
  color: var(--dust);
  font-size: var(--step--1);
  line-height: 1.5;
}

/* --- the hub's picks --------------------------------------------------------------- */

.picks__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tile-gap);
}

.picks__more {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

/* --- ways to play, ways to win ------------------------------------------------------------ */

.ways__list,
.formats__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ways__list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.formats__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.way-card,
.format-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--hair);
}

.way-card {
  background: var(--riser);
}

.format-card {
  background: linear-gradient(180deg, var(--riser), transparent);
}

.way-card__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--dust);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-variation-settings: 'wdth' 106, 'wght' 700;
}

.way-card__title,
.format-card__name {
  margin: 0.6rem 0 0.35rem;
  font-size: var(--step-1);
  line-height: 1.2;
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.format-card__name {
  margin-top: 0;
}

.way-card__blurb,
.format-card__blurb {
  color: var(--dust);
  font-size: var(--step--1);
  line-height: 1.5;
}

/* --- made for real game nights ------------------------------------------------------------ */

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 1rem + 2vw, 2.6rem) var(--tile-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
}

.feature__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.8rem;
  background: var(--riser);
  border: 1px solid var(--hair-bright);
}

.feature__title {
  margin: 0.15rem 0 0.3rem;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 104, 'wght' 800;
}

.feature__text {
  color: var(--dust);
  font-size: var(--step--1);
  line-height: 1.55;
}

/* --- questions ------------------------------------------------------------------------ */

.faq__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: var(--tile-gap);
}

.faq__item {
  border-bottom: 1px solid var(--hair);
}

.faq__item summary {
  position: relative;
  display: block;
  padding: 1.05rem 2.2rem 1.05rem 0;
  padding-inline: 0 2.2rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--step-1);
  font-variation-settings: 'wdth' 102, 'wght' 720;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

/* A plus that turns into a minus. */
.faq__item summary::before,
.faq__item summary::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-end: 0.35rem;
  width: 0.85rem;
  height: 2px;
  border-radius: 1px;
  background: var(--dust);
  transition: transform 0.2s var(--ease);
}

.faq__item summary::after {
  transform: rotate(90deg);
}

.faq__item[open] summary::after {
  transform: rotate(0deg);
}

.faq__item summary:hover::before,
.faq__item summary:hover::after {
  background: var(--light);
}

.faq__item p {
  max-width: 40rem;
  margin: -0.2rem 0 1.15rem;
  color: var(--dust);
  line-height: 1.6;
}

.faq__item a,
.ready__try a,
.night-foot a {
  color: var(--light);
  text-decoration: underline;
  text-decoration-color: var(--hair-bright);
  text-underline-offset: 0.2em;
}

.faq__item a:hover,
.ready__try a:hover,
.night-foot a:hover {
  text-decoration-color: currentColor;
}

/* --- the way in, at the foot ---------------------------------------------------------- */

.ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  text-align: center;
  margin: 0 var(--wide) clamp(3rem, 2rem + 4vw, 6rem);
  padding: clamp(1.6rem, 1rem + 3vw, 3.4rem);
  border-radius: 1.6rem;
  border: 1px solid var(--hair-bright);
  background:
    radial-gradient(70% 140% at 0% 0%, rgba(243, 238, 247, 0.08), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, rgba(243, 238, 247, 0.05), transparent 60%),
    var(--riser);
}

.ready__title {
  font-size: clamp(2rem, 1.1rem + 3vw, 3.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  font-variation-settings: 'wdth' 112, 'wght' 900;
}

.ready__text {
  max-width: 34rem;
  margin: 0.8rem auto 0;
  text-wrap: balance;
  color: var(--dust);
  font-size: var(--step-1);
}

.ready__try {
  max-width: 34rem;
  margin: 0.9rem auto 0;
  text-wrap: balance;
  color: var(--dust);
  font-size: var(--step--1);
}

.ready__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.2rem;
}

/* --- the foot ----------------------------------------------------------------------- */

.night-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  padding: 1.6rem var(--wide) 2.6rem;
  border-top: 1px solid var(--hair);
  color: var(--dust-dim);
  font-size: var(--step--1);
}

.night-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
}

.night-foot a {
  color: var(--dust);
}

/* --- on a phone: the way in, at hand ---------------------------------------------------- */

.night-dock {
  display: none;
}

@media (max-width: 48rem) {
  .night-dock {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 20;
    display: block;
    padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(12, 9, 16, 0.92) 35%);
    transition:
      transform 0.25s var(--ease),
      visibility 0s linear 0s;
  }

  .night-dock[data-shown='false'] {
    transform: translateY(110%);
    visibility: hidden;
    transition:
      transform 0.25s var(--ease),
      visibility 0s linear 0.25s;
  }

  .night-dock__host {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 3.2rem;
    border-radius: 0.95rem;
    background: var(--light);
    color: var(--room-deep);
    font-size: var(--step-1);
    font-variation-settings: 'wdth' 100, 'wght' 800;
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.5);
  }

  /* Room under the foot for the dock. */
  .night-foot {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }
}

/* --- smaller screens ------------------------------------------------------------------- */

@media (max-width: 64rem) {
  .show__track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 2.2rem;
  }

  .show__track::before {
    display: none;
  }

  .ways__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__shot {
    width: min(100%, 36rem);
    justify-self: center;
  }

  .picks__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picks__row > :nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 48rem) {
  .how__steps,
  .faq__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .show__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .hero__actions,
  .ready__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ready__actions {
    align-self: stretch;
  }

  .how-step__art {
    height: 7.5rem;
  }

  .hero__actions .party-host,
  .ready__actions .party-host {
    justify-content: flex-start;
  }

  .hero__board {
    width: 62cqi;
    font-size: max(0.62rem, 2.9cqi);
  }

  .board__caption {
    display: none;
  }

  .ways__list,
  .features__grid,
  .picks__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .picks__row > :nth-child(n + 4) {
    display: none;
  }

  /* The beats, one under the other on their line. */
  .show__track {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.3rem;
  }

  .show__track::before {
    display: block;
    top: 1.5rem;
    bottom: 1.5rem;
    inset-inline: 1.5rem auto;
    width: 1px;
    height: auto;
  }

  .show-beat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
  }

  .show-beat__icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .ready {
    border-radius: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .night-dock,
  .night-dock[data-shown='false'],
  .faq__item summary::after {
    transition: none;
  }
}
