.site-shell {
  min-height: 100vh;
  overflow: clip;
}

.site-header {
  position: relative;
  z-index: var(--z-content);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 58px;
  padding: 7px 12px;
  border-bottom: 1px solid rgb(214 165 65 / 0.14);
  background: #060809;
}

.menu-toggle,
.drawer-close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-content: center;
  border: 0;
  color: var(--color-text);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 1px;
  margin: 3px 0;
  background: var(--color-silver);
}

.header-wordmark {
  display: grid;
  min-width: 0;
  height: 30px;
  place-items: center;
}

.header-wordmark img {
  width: 120px;
  height: 30px;
  object-fit: contain;
}

.site-drawer {
  position: fixed;
  z-index: var(--z-modal);
  inset: 0;
  background: rgb(0 0 0 / 0.68);
}

.site-drawer__panel {
  width: min(320px, calc(100% - 40px));
  min-height: 100%;
  padding: 18px;
  border-right: 1px solid var(--color-border-gold);
  background: #090c0d;
  box-shadow: 18px 0 36px rgb(0 0 0 / 0.42);
}

.site-drawer__top {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(214 165 65 / 0.26);
}

.site-drawer__label,
.player-label {
  margin: 0;
  color: var(--color-gold);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.drawer-close {
  color: var(--color-gold-bright);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.site-drawer__nav {
  display: grid;
  gap: 5px;
  padding-top: var(--space-6);
}

.site-drawer__nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgb(140 101 31 / 0.55);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-label);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
  background: #050708;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgb(5 7 8 / 0.18) 55%, rgb(5 7 8 / 0.9) 100%);
  content: "";
  pointer-events: none;
}

.hero__image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.hero__copy {
  position: absolute;
  right: 16px;
  bottom: 17px;
  left: 16px;
  max-width: 350px;
}

.hero h1 {
  max-width: 350px;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 0.96;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.72);
}

.hero p {
  margin: 11px 0 0;
  color: #cbc8c2;
  font-size: 0.84rem;
  line-height: 1.48;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.88);
}

.player-section {
  width: 100%;
  margin-inline: auto;
  padding: 17px 16px 0;
}

.player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.player-heading__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-live-test {
  display: none;
  margin: 0;
  color: var(--color-text-muted);
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.player-live-test > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-live);
  box-shadow: 0 0 0 2px rgb(220 45 32 / 0.14);
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-md);
  background: var(--color-surface-media);
  box-shadow: var(--shadow-card);
}

.video-frame__host,
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.player-sound-control {
  display: inline-flex;
  min-width: 84px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgb(224 175 70 / 0.86);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: rgb(6 8 9 / 0.88);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.45);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.player-sound-control:hover,
.player-sound-control:focus-visible {
  border-color: var(--color-gold-bright);
  background: #17120a;
}

.player-sound-control:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

.player-sound-control:active {
  color: #17120a;
  background: var(--color-gold-bright);
}

.player-sound-control:disabled {
  cursor: wait;
  opacity: 0.62;
}

.player-note {
  margin: 10px 0 12px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.youtube-cta {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e0af46;
  border-radius: var(--radius-md);
  color: #17120a;
  background: #c9993e;
  box-shadow: inset 0 1px 0 rgb(255 232 165 / 0.45);
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.youtube-cta__play {
  font-size: 0.8rem;
}

.knight-files-promo {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgb(140 101 31 / 0.82);
  border-radius: var(--radius-md);
  background: #0b0f11;
  box-shadow: var(--shadow-card);
}

.knight-files-promo__masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 1px solid rgb(214 165 65 / 0.18);
}

.knight-files-promo__eyebrow {
  margin: 0;
  color: var(--color-gold);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.knight-files-promo__mark {
  width: 20px;
  height: 20px;
  color: var(--color-silver);
}

.knight-files-promo h2 {
  margin: 7px 0 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
}

.knight-files-promo__copy {
  margin: 5px 0 0;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.knight-files-cta {
  width: 100%;
  margin-top: 12px;
}

.knight-files-cta img {
  display: block;
  width: 100%;
  height: auto;
}

a.knight-files-cta {
  display: block;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

a.knight-files-cta:hover,
a.knight-files-cta:focus-visible {
  box-shadow: 0 0 0 1px rgb(238 194 83 / 0.62);
  transform: translateY(-1px);
}

a.knight-files-cta:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 3px;
}

a.knight-files-cta:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  a.knight-files-cta {
    transition: none;
  }
}

.armory-promo {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgb(140 101 31 / 0.82);
  border-radius: var(--radius-md);
  background: #0b0f11;
  box-shadow: var(--shadow-card);
}

.armory-promo__masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 1px solid rgb(214 165 65 / 0.18);
}

.armory-promo__eyebrow {
  margin: 0;
  color: var(--color-gold);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.armory-promo__mark {
  width: 20px;
  height: 20px;
  color: var(--color-silver);
}

.armory-promo h2 {
  margin: 7px 0 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1;
}

.armory-promo__cta {
  display: block;
  width: 100%;
  margin-top: 12px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.armory-promo__cta img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-md) - 6px);
}

.armory-promo__cta:hover,
.armory-promo__cta:focus-visible {
  box-shadow: 0 0 0 1px rgb(238 194 83 / 0.62);
  transform: translateY(-1px);
}

.armory-promo__cta:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 3px;
}

.armory-promo__cta:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .armory-promo__cta {
    transition: none;
  }
}

.homepage-content {
  width: 100%;
  margin-inline: auto;
  padding-inline: 16px;
}

.dispatches-section {
  padding-top: 20px;
}

.section-heading {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-heading h2,
.discord-copy h2 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.section-action {
  color: var(--color-gold);
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dispatch-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(140 101 31 / 0.8);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
  scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom));
}

.dispatch-card img {
  width: 100%;
  height: clamp(82px, 24vw, 110px);
  object-fit: cover;
  filter: saturate(0.88) contrast(1.06);
}
.dispatch-card__destination { display: block; color: inherit; text-decoration: none; }
.dispatch-card__destination:focus-visible { outline: 2px solid var(--color-gold-bright); outline-offset: -3px; }

.dispatch-card--gameplay img {
  object-position: center 52%;
}

.dispatch-card--setup img {
  object-position: center 48%;
}

.dispatch-card--files img {
  object-position: center 65%;
}

.dispatch-card__category {
  display: block;
  padding: 7px 7px 0;
  color: var(--color-gold);
  font-family: var(--font-label);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.05;
}

.dispatch-card strong {
  display: block;
  min-height: 38px;
  padding: 4px 7px 8px;
  font-family: var(--font-display);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 0.95;
}

.discord-section {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0 12px;
  margin-top: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  border: 1px solid rgb(140 101 31 / 0.82);
  border-radius: var(--radius-md);
  background: linear-gradient(105deg, #0d1115, #0b0e0f 72%);
  box-shadow: var(--shadow-card);
  scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom));
}

.discord-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius-md);
  color: #fff;
  background: #5865f2;
}

.discord-mark svg {
  width: 28px;
  height: 28px;
}

.discord-copy h2 {
  padding-top: 3px;
  font-size: 1rem;
}

.discord-copy p {
  margin: 5px 0 0;
  color: var(--color-text-muted);
  font-size: 0.66rem;
  line-height: 1.3;
}

.discord-cta {
  display: inline-flex;
  grid-column: 1 / -1;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid rgb(214 165 65 / 0.76);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: #111719;
  font-family: var(--font-label);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom));
}

.discord-cta svg {
  width: 16px;
  height: 16px;
}

.bottom-nav {
  position: fixed;
  z-index: var(--z-nav);
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid rgb(214 165 65 / 0.25);
  background: #060809;
  box-shadow: 0 -8px 18px rgb(0 0 0 / 0.28);
}

.bottom-nav__item {
  display: grid;
  min-width: 0;
  min-height: 60px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 5px 2px;
  border: 0;
  color: #8f918f;
  background: transparent;
  font-family: var(--font-label);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.bottom-nav__item svg {
  width: 20px;
  height: 20px;
}

.bottom-nav__item.is-active {
  color: var(--color-gold-bright);
}

.bottom-nav__item:active {
  color: var(--color-gold-bright);
  background: rgb(214 165 65 / 0.08);
}

.site-shell[data-player-state="live"] .player-label,
.site-shell[data-player-state="live-test"] .player-label {
  display: none;
}

.site-shell[data-player-state="live"] .player-live-test,
.site-shell[data-player-state="live-test"] .player-live-test {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-shell[data-player-state="live"] .video-frame,
.site-shell[data-player-state="live-test"] .video-frame {
  border-color: #b93d33;
  box-shadow: 0 0 0 1px rgb(220 45 32 / 0.22), var(--shadow-card);
}

@media (min-width: 480px) {
  .site-header {
    padding-inline: 18px;
  }

  .hero {
    min-height: 330px;
  }

  .hero__copy {
    right: 24px;
    bottom: 22px;
    left: 24px;
  }

  .player-section {
    padding-inline: 24px;
  }

  .homepage-content {
    padding-inline: 24px;
  }

}

@media (min-width: 768px) {
  .site-shell {
    max-width: 960px;
    margin-inline: auto;
    border-inline: 1px solid rgb(214 165 65 / 0.1);
  }

  .site-header {
    min-height: 64px;
    padding-inline: 28px;
  }

  .header-wordmark img {
    width: 150px;
  }

  .hero {
    min-height: 390px;
  }

  .hero__image {
    object-position: 35% center;
  }

  .hero__copy {
    right: 40px;
    bottom: 33px;
    left: 40px;
    max-width: 360px;
  }

  .hero h1 {
    max-width: 330px;
    font-size: 2.65rem;
  }

  .player-section {
    width: min(100%, 760px);
    padding: 24px 32px 0;
  }

  .homepage-content {
    width: min(100%, 760px);
    padding-inline: 32px;
  }

  .dispatches-section {
    padding-top: 28px;
  }

  .dispatch-grid {
    gap: 12px;
  }

  .bottom-nav {
    display: none;
  }

  .player-note {
    font-size: 0.86rem;
  }
}

/* Desktop scale pass: widen the app shell on large screens so page content
   (media, cards, grids) is not boxed into a mobile-width column. Every page
   loads components.css, so this applies consistently. */
@media (min-width: 1024px) {
  .site-shell {
    max-width: 1180px;
  }
}

@media (min-width: 1360px) {
  .site-shell {
    max-width: 1280px;
  }
}

/* ------------------------------------------------------------------ *
 * Homepage mobile polish — phone widths only (<768px).              *
 * Hero, Featured Video, Discord and the 5-item bottom nav are left   *
 * as approved; this enlarges the lower sections that read too small. *
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
  /* Section rhythm: clearer separation between the major blocks. */
  .knight-files-promo,
  .armory-promo {
    margin-top: 34px;
  }

  .dispatches-section {
    padding-top: 34px;
  }

  .discord-section {
    margin-top: 34px;
  }

  /* Heading hierarchy nudge. */
  .section-heading h2,
  .knight-files-promo h2,
  .armory-promo h2 {
    font-size: 1.22rem;
  }

  .section-heading {
    min-height: 30px;
    margin-bottom: 11px;
  }

  .section-action {
    font-size: 0.68rem;
  }

  /* Knight Files + Armory promos: trim nested padding so the artwork is
     the focal point and uses almost the full content width (no crop). */
  .knight-files-promo.homepage-content,
  .armory-promo.homepage-content {
    padding: 14px 9px 12px;
  }

  .knight-files-promo__masthead,
  .knight-files-promo h2,
  .knight-files-promo__copy,
  .armory-promo__masthead,
  .armory-promo h2 {
    padding-inline: 4px;
  }

  .knight-files-promo__copy {
    font-size: 0.8rem;
  }

  /* Latest Dispatches: premium horizontal snap rail — one large card at a
     time with a peek of the next, natural touch scrolling, hidden bar. */
  .dispatch-grid {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    margin-inline: -16px;
    padding: 2px 16px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dispatch-grid::-webkit-scrollbar {
    display: none;
  }

  .dispatch-card {
    flex: 0 0 82vw;
    max-width: 340px;
    scroll-snap-align: start;
  }

  .dispatch-card img {
    height: clamp(196px, 56vw, 258px);
  }

  .dispatch-card__category {
    padding: 11px 13px 0;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  .dispatch-card strong {
    min-height: 0;
    padding: 6px 13px 14px;
    font-size: 1.02rem;
    line-height: 1;
  }
}

@media (max-width: 400px) {
  .dispatch-card {
    flex-basis: 80vw;
  }
}

/* ------------------------------------------------------------------ *
 * Homepage Latest Dispatches — tablet/desktop image-led cards.       *
 * The 3-column grid stays; the media frame becomes a proper 4:3      *
 * panel (was a ~110px landscape strip) so the masked-subject art is  *
 * readable. Phone snap rail (<768px) is untouched.                   *
 * ------------------------------------------------------------------ */
@media (min-width: 768px) {
  .dispatch-card {
    grid-template-rows: auto auto;
  }

  .dispatch-card img {
    height: auto;
    /* Portrait source art — a near-square frame keeps the masked subject
       (horns, face, hands) visually complete; 4:3 clipped too much. */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 24%;
  }

  .dispatch-card--gameplay img,
  .dispatch-card[data-category="GAMING"] img {
    object-position: center 26%;
  }

  .dispatch-card--setup img,
  .dispatch-card[data-category="TECH / SETUP"] img {
    object-position: center 28%;
  }

  .dispatch-card--files img,
  .dispatch-card[data-category="STORY"] img {
    object-position: center 20%;
  }

  .dispatch-card__category {
    padding: 12px 12px 0;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  .dispatch-card strong {
    min-height: 0;
    padding: 6px 12px 14px;
    font-size: 1.02rem;
    line-height: 1.02;
  }
}

@media (min-width: 1024px) {
  .dispatch-card__category { font-size: 0.68rem; }
  .dispatch-card strong { font-size: 1.15rem; padding-bottom: 16px; }
}
