/* Reusable navigation, branding, actions, containers, section headings and footer. */

.shell {
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(192, 160, 64, 0.38);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.brand-title {
  margin: 3px 0 0;
  font-family: var(--font-heading);
  font-size: 1.65rem;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 2px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(192, 160, 64, 0.08);
  border: 1px solid rgba(192, 160, 64, 0.18);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  color: #fff;
  background: rgba(192, 160, 64, 0.16);
  border-color: rgba(192, 160, 64, 0.36);
  transform: translateY(-1px);
}

.social-link svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.store-badge img {
  height: 54px;
  width: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(180deg, #d4b85d, var(--gold));
  color: var(--red);
  box-shadow: 0 18px 42px rgba(192, 160, 64, 0.18);
}

.button-secondary {
  background: rgba(245, 240, 232, 0.06);
  border-color: rgba(245, 240, 232, 0.14);
  color: var(--paper);
}

.store-buttons {
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px 16px;
  align-items: center;
  justify-content: start;
}

.badge-appstore {
  grid-column: 1;
  grid-row: 1;
}

.badge-macappstore {
  grid-column: 1;
  grid-row: 2;
}

.badge-googleplay {
  grid-column: 2;
  grid-row: 1;
}

.badge-steam {
  grid-column: 2;
  grid-row: 2;
}

.store-credit {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.store-credit a {
  color: var(--gold);
  font-weight: 700;
}

.store-credit a:hover {
  color: #fff;
}

.section {
  padding: var(--section-space) 0 0;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: start;
  gap: 18px;
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.7vw, 3.25rem);
  line-height: 1.02;
  color: #fff;
  max-width: 12ch;
}

.section-header p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  padding: 0 0 var(--section-space);
  color: rgba(245, 240, 232, 0.46);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3);
}

@media (max-width: 980px) {
  .section-header {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
  }
}

.nav-social-menu {
  display: none;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 8px 0;
    gap: 10px;
  }

  .brand-copy {
    display: none;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand {
    flex-shrink: 0;
  }

  .nav {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(8px, 2vw, 14px);
  }

  .nav > a {
    padding-block: 12px;
    font-size: .82rem;
    white-space: nowrap;
  }

  .nav > .social-links {
    display: none;
  }

  .nav-social-menu {
    display: block;
    position: relative;
  }

  .nav-social-menu summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
  }

  .nav-social-menu summary::-webkit-details-marker {
    display: none;
  }

  .nav-social-menu summary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .nav-social-menu summary:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
  }

  .nav-social-menu .social-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: max-content;
    margin: 0;
    padding: 12px;
    gap: 8px;
    flex-wrap: nowrap;
    background: var(--facade-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .button {
    width: 100%;
  }

  .store-buttons {
    grid-template-columns: 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .badge-appstore,
  .badge-macappstore,
  .badge-googleplay,
  .badge-steam {
    grid-column: 1;
    grid-row: auto;
  }

  .store-badge {
    width: 100%;
    justify-content: center;
  }

  .store-badge img {
    max-width: min(100%, 260px);
    height: auto;
  }

  .social-link {
    width: 42px;
    height: 42px;
  }
}

/* Room window: the video artwork supplies its own frame and panes. */
.game-window {
  position: relative;
  margin: 0;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3));
}

.game-window::before {
  content: '';
  display: block;
  height: 12px;
  margin-inline: -8px;
  background: #b9a78d;
  border-top: 2px solid #d0c0a7;
  border-bottom: 3px solid #8c7c67;
}

.game-window video {
  display: block;
  width: 100%;
  height: auto;
  background: #49432b;
}

.game-window figcaption {
  margin-inline: -10px;
  padding: 10px 44px;
  background: var(--stone);
  color: #29231c;
  border-bottom: 3px solid var(--stone-shadow);
  border-radius: 2px;
  text-align: center;
  font: 700 1.15rem var(--font-heading);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.window-playback {
  position: absolute;
  right: -4px;
  bottom: 1px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #554735;
  cursor: pointer;
}

.window-playback::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(85, 71, 53, .35);
  border-radius: 50%;
  background: rgba(85, 71, 53, .06);
}

.window-playback:hover::before {
  background: rgba(85, 71, 53, .16);
}

.window-playback svg {
  position: relative;
  width: 14px;
  height: 14px;
}

.play-icon { fill: currentColor; }
.pause-icon { fill: none; stroke: currentColor; stroke-width: 3; }
.window-playback[data-paused="true"] .pause-icon,
.window-playback[data-paused="false"] .play-icon,
.window-playback[hidden] { display: none; }

.window-playback:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
