/*
|--------------------------------------------------------------------------
| BARELY ALIVE — MOBILE LAYOUT
|--------------------------------------------------------------------------
|
| Load this file AFTER style.css.
| Applies only to screens 760px wide and below.
|
| Mobile does not use the desktop panel artwork:
| - panel-control-background.webp
| - panel-game-card.webp
| - panel-features.webp
|
*/

@media (max-width: 760px) {

  /* =========================================================
     GLOBAL MOBILE LAYOUT
     ========================================================= */

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 320px;
    letter-spacing: 0.025em;
  }

  img,
  svg,
  video {
    max-width: 100%;
  }

  .shell {
    width: calc(100% - 24px);
    max-width: 560px;
    margin-inline: auto;
  }


  /* =========================================================
     MOBILE HEADER
     ========================================================= */

  .site-header {
    height: auto;
    padding: 12px 0 11px;
  }

  .nav-inner {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
    gap: 10px;
    text-align: left;
  }

  .brand img {
    width: 54px;
    height: 52px;
  }

  .brand span {
    justify-items: start;
  }

  .brand strong {
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .brand small {
    font-size: 7px;
    letter-spacing: 0.24em;
  }

  .primary-nav {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 20px;
  }

  .primary-nav a {
    height: auto;
    padding: 8px 0;
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .primary-nav a.active::after {
    bottom: 2px;
  }

  .nav-inner > .discord-btn {
    display: none;
  }

  .nav-toggle {
    display: none;
  }


  /* =========================================================
     MOBILE HERO
     ========================================================= */

  .hero {
    min-height: auto;
    padding: 28px 0 24px;
    background-position: center top;
    background-size: auto 430px;
  }

  .hero::before {
    background:
      linear-gradient(
        180deg,
        rgba(2, 2, 3, 0.34) 0%,
        rgba(2, 2, 3, 0.62) 62%,
        #020203 100%
      );
  }

  .hero-inner {
    width: 100%;
    text-align: center;
  }

  .eyebrow {
    margin-inline: auto;
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: 0.24em;
    text-align: center;
  }

  h1 {
    margin: 10px auto 8px;
    font-size: clamp(46px, 16vw, 68px);
    line-height: 0.9;
    letter-spacing: 0.01em;
    text-align: center;
  }

  .tagline {
    max-width: 310px;
    margin-inline: auto;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.24em;
    text-align: center;
  }


  /* =========================================================
     MOBILE LIVE NETWORK PANEL
     CSS panel only — no desktop panel image
     ========================================================= */

  .network-panel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 25px auto 0;
    padding: 22px 16px 18px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "dial dial"
      "left right";
    align-items: stretch;
    justify-items: center;
    gap: 16px 10px;

    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.028),
        rgba(255, 255, 255, 0.008)
      ),
      #070709 !important;
    background-image: none !important;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    clip-path: none;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.035),
      0 18px 35px rgba(0, 0, 0, 0.42);
  }

  .network-panel::before {
    content: "";
    display: block;
    position: absolute;
    top: -1px;
    left: 13%;
    right: 13%;
    height: 1px;
    background:
      linear-gradient(
        90deg,
        transparent,
        rgba(255, 36, 44, 0.82),
        transparent
      );
    box-shadow: 0 0 10px rgba(255, 36, 44, 0.20);
  }

  .panel-corner,
  .panel-leds,
  .edge-light {
    display: none;
  }

  .dial-wrap {
    grid-area: dial;
    position: relative;
    left: auto;
    top: auto;
    width: 194px;
    height: 194px;
    margin-inline: auto;
    transform: none;
  }

  .dial {
    width: 178px;
  }

  .dial-core strong {
    font-size: 56px;
  }

  .dial-core span {
    font-size: 11px;
  }

  .dial-core small {
    font-size: 8px;
  }

  .panel-side {
    position: relative;
    z-index: 3;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-align: center;
  }

  .panel-side--left {
    grid-area: left;
    grid-column: auto;
  }

  .panel-side--right {
    grid-area: right;
    grid-column: auto;
  }

  .metric {
    width: 100%;
    min-height: 100px;
    height: auto;
    padding: 12px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transform: none;
    text-align: center;

    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
  }

  .metric-icon,
  .metric-icon img {
    width: 48px;
    height: 48px;
  }

  .metric span {
    font-size: 7px;
    line-height: 1.35;
    letter-spacing: 0.10em;
  }

  .metric strong {
    font-size: 25px;
    line-height: 1;
  }

  .metric strong.online {
    font-size: 20px;
    line-height: 1;
  }

  .metric-divider {
    width: min(90px, 82%);
  }


  /* =========================================================
     MOBILE GAME SERVERS
     CSS cards only — no desktop panel image
     ========================================================= */

  .games {
    padding: 28px 0 38px;
  }

  .section-heading {
    width: 100%;
    padding-inline: 8px;
    text-align: center;
  }

  .section-heading::before,
  .section-heading::after {
    display: none;
  }

  .section-heading h2 {
    margin-inline: auto;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0.20em;
    text-align: center;
  }

  .section-heading p {
    max-width: 320px;
    margin: 8px auto 0;
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: 0.15em;
    text-align: center;
  }

  .game-grid {
    width: 100%;
    max-width: 520px;
    margin: 22px auto 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-card {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
    isolation: isolate;

    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.026),
        rgba(255, 255, 255, 0.006)
      ),
      #070709;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    clip-path: none;

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.035),
      0 16px 32px rgba(0, 0, 0, 0.34);

    transform: none;
    filter: none;
  }

  .game-card--live:hover {
    transform: none;
    filter: none;
  }

  .game-card-panel {
    display: none !important;
  }

  .game-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }

  .game-card--coming-soon .game-art {
    filter: grayscale(1) brightness(0.62);
  }

  .game-name {
    position: absolute;
    top: 22px;
    left: 16px;
    right: 16px;
    max-width: none;
    color: #f3f3f3;
    font-size: 27px;
    line-height: 1;
    text-align: center;
    text-shadow:
      0 2px 2px #000,
      0 0 16px rgba(0, 0, 0, 0.92);
  }

  .game-stats {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 108px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    align-items: stretch;

    background: rgba(255, 255, 255, 0.012);
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .game-stats > div {
    min-width: 0;
    min-height: 108px;
    padding: 18px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
    text-align: center;
  }

  .game-stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.09);
  }

  .game-player-stat,
  .game-stats .joining {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .game-stats strong {
    font-size: 39px;
  }

  .game-stats span {
    margin-top: 7px;
    font-size: 8px;
    line-height: 1.25;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .joining strong {
    font-size: 29px;
  }

  .joining-lights {
    margin-top: 8px;
  }

  .game-stats--coming-soon {
    display: block;
  }

  .game-stats--coming-soon > div:first-child {
    width: 100%;
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .coming-soon-state {
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    text-align: center;
  }

  .coming-soon-state strong {
    font-size: 29px;
  }

  .coming-soon-state span {
    font-size: 8px;
  }

  .game-footer {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 52px;
    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 9px;
    line-height: 1.35;
    letter-spacing: 0.10em;
    text-align: center;
  }

  .game-footer > span,
  .game-server-status,
  .game-server-count {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .game-card-arrow,
  .game-footer > b {
    display: none !important;
  }


  /* =========================================================
     MOBILE FOOTER
     Logo, Discord and copyright only
     ========================================================= */

  .site-footer {
    margin-top: 28px;
    padding: 28px 0 18px;
    text-align: center;
  }

  .footer-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
  }

  .footer-logo {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    text-align: center;
  }

  .footer-logo img {
    width: 54px;
    height: auto;
  }

  .footer-logo strong {
    font-size: 13px;
    letter-spacing: 0.20em;
  }

  .site-footer .discord-btn {
    width: min(100%, 280px);
    min-width: 0;
    min-height: 44px;
    margin: 0 auto;
  }

  .footer-bottom {
    width: 100%;
    margin: 20px auto 0;
    padding: 14px 0 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    text-align: center;
  }

  .footer-bottom span {
    display: block;
    width: 100%;
    text-align: center;
  }
}


/* =========================================================
   SMALL MOBILE ADJUSTMENTS
   ========================================================= */

@media (max-width: 420px) {

  .shell {
    width: calc(100% - 20px);
  }

  .site-header {
    padding-top: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 50px;
    height: 48px;
  }

  .brand strong {
    font-size: 13px;
    letter-spacing: 0.18em;
  }

  .brand small {
    font-size: 6px;
  }

  .primary-nav {
    gap: 0 14px;
  }

  .primary-nav a {
    font-size: 9px;
  }

  .hero {
    padding-top: 24px;
  }

  h1 {
    font-size: 46px;
  }

  .tagline {
    max-width: 280px;
    font-size: 9px;
    letter-spacing: 0.20em;
  }

  .network-panel {
    padding: 20px 10px 14px;
    gap: 14px 8px;
  }

  .dial-wrap {
    width: 182px;
    height: 182px;
  }

  .dial {
    width: 166px;
  }

  .dial-core strong {
    font-size: 52px;
  }

  .metric {
    min-height: 94px;
    padding-inline: 4px;
  }

  .metric-icon,
  .metric-icon img {
    width: 42px;
    height: 42px;
  }

  .metric strong {
    font-size: 22px;
  }

  .metric strong.online {
    font-size: 17px;
  }

  .metric span {
    font-size: 6px;
  }

  .section-heading h2 {
    font-size: 18px;
    letter-spacing: 0.15em;
  }

  .game-art {
    aspect-ratio: 16 / 9.5;
  }

  .game-name {
    top: 19px;
    font-size: 24px;
  }

  .game-stats {
    grid-template-columns: minmax(0, 1fr) 98px;
  }

  .game-stats > div {
    padding-inline: 10px;
  }

  .game-stats strong {
    font-size: 35px;
  }

  .joining strong {
    font-size: 26px;
  }

  .footer-logo {
    flex-direction: column;
    gap: 8px;
  }

  .footer-logo strong {
    font-size: 12px;
  }
}