/* LetsGames 5.15 — mobile-only refinement.
   IMPORTANT: every rule in this file is scoped to mobile/tablet breakpoints,
   so the desktop layout from 5.14.1 remains unchanged. */

@media (max-width: 768px) {
  html, body { min-height: 100%; }
  body { overflow-x: hidden; }

  /* Compact overlay navigation that still keeps every pre-launch action visible. */
  .nav.nav-prelaunch {
    height: 68px !important;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .nav-prelaunch-inner {
    min-width: 0;
    padding-left: max(11px, env(safe-area-inset-left, 0px));
    padding-right: max(11px, env(safe-area-inset-right, 0px));
    gap: 8px;
  }
  .prelaunch-nav-brand {
    width: 50px;
    height: 48px;
    flex: 0 0 50px;
  }
  .prelaunch-nav-brand img {
    width: 50px;
    height: 44px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.34));
  }
  .prelaunch-nav-actions {
    min-width: 0;
    gap: 6px;
  }
  .prelaunch-team-nav {
    min-height: 32px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 8.5px;
    letter-spacing: .04em;
    white-space: nowrap;
  }
  .language-pair {
    gap: 4px;
    font-size: 8.5px;
    letter-spacing: .035em;
    white-space: nowrap;
  }
  .language-pair span { opacity: .55; }
  .prelaunch-signin {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  /* Full-height mobile hero. dvh handles the browser address bar better than vh. */
  .prelaunch-home { min-height: 100dvh; }
  .prelaunch-hero {
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background-position: 50% 50%;
  }
  .prelaunch-overlay {
    background:
      linear-gradient(180deg, rgba(2,6,11,.34) 0%, rgba(2,6,11,.38) 34%, rgba(2,6,11,.52) 100%),
      radial-gradient(circle at 50% 44%, rgba(9,36,65,.03) 0%, rgba(2,6,11,.36) 76%);
  }
  .prelaunch-content {
    width: min(100% - 24px, 520px);
    min-height: 100dvh;
    justify-content: center;
    padding: calc(78px + env(safe-area-inset-top, 0px)) 0 max(22px, env(safe-area-inset-bottom, 0px));
  }
  .prelaunch-wordmark {
    width: min(86vw, 460px);
    margin: 0 0 17px;
    filter: drop-shadow(-3px 0 6px rgba(0,0,0,.08)) drop-shadow(3px 0 6px rgba(0,0,0,.08)) drop-shadow(0 3px 8px rgba(0,0,0,.13));
  }
  .prelaunch-intro {
    width: min(100%, 470px);
    margin: 0 0 18px;
    gap: 7px;
  }
  .prelaunch-games {
    max-width: 440px;
    font-size: 8.5px;
    line-height: 1.65;
    letter-spacing: .025em;
    text-wrap: balance;
  }
  .prelaunch-games i { padding: 0 1px; }
  .prelaunch-copy {
    max-width: 420px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1.52;
    text-wrap: balance;
  }

  /* Preserve Instagram – IP – Discord order, but give the IP most of the width. */
  .prelaunch-actions {
    width: min(100%, 390px);
    grid-template-columns: minmax(46px,.58fr) minmax(158px,1.45fr) minmax(46px,.58fr);
    gap: 7px;
  }
  .prelaunch-actions .btn {
    min-height: 49px !important;
    height: 49px;
    padding-left: 9px !important;
    padding-right: 9px !important;
    border-radius: 9px !important;
  }
  .prelaunch-instagram,
  .prelaunch-discord {
    gap: 6px !important;
    font-size: 8px !important;
    overflow: hidden;
  }
  .prelaunch-instagram img { width: 18px; height: 18px; flex: none; }
  .prelaunch-discord img { width: 19px; height: 17px; flex: none; }
  .prelaunch-ip {
    min-width: 0 !important;
    align-items: center !important;
    text-align: center !important;
  }
  .prelaunch-ip span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
  }
  .prelaunch-ip small {
    margin-top: 5px !important;
    font-size: 4.5px !important;
    letter-spacing: .10em !important;
    white-space: nowrap;
  }

  .prelaunch-status {
    width: min(100%, 330px);
    min-width: 0;
    margin-top: 18px;
    gap: 10px;
  }
  .prelaunch-status-dot { width: 8px; height: 8px; }
  .prelaunch-status div {
    min-width: 0;
    align-items: flex-start;
    gap: 4px;
  }
  .prelaunch-status b {
    font-size: 10.5px;
    white-space: nowrap;
  }
  .prelaunch-status span {
    font-size: 8.2px;
    letter-spacing: .015em;
    white-space: nowrap;
  }

  /* Team page: mobile typography and cards are condensed without changing desktop. */
  .staff-v511 { padding-bottom: 68px; }
  .team-v511-hero { padding: 105px 0 46px; }
  .team-v511-back { margin-bottom: 24px; }
  .team-v511-kicker { margin-bottom: 12px; font-size: 8px; }
  .team-v511-hero h1 {
    max-width: 520px;
    font-size: clamp(37px, 11.5vw, 56px);
    line-height: .98;
    letter-spacing: -.045em;
  }
  .team-v511-hero p {
    max-width: 520px;
    margin-top: 18px;
    font-size: 11px;
    line-height: 1.62;
  }
  .team-v511-summary {
    margin-top: 25px;
    gap: 10px;
  }
  .team-v511-summary b { font-size: 42px; }
  .team-v511-summary span { font-size: 7.5px; }
  .team-v511-roster { padding-top: 40px; }
  .team-v511-group { margin-bottom: 44px; }
  .team-v511-group-head { gap: 12px; margin-bottom: 15px; }
  .team-v511-group-head > span { width: 36px; height: 36px; border-radius: 8px; font-size: 10px; }
  .team-v511-group-head small { font-size: 6.5px; margin-bottom: 5px; }
  .team-v511-group-head h2 { font-size: 20px; }
  .team-v511-grid,
  .team-v511-grid.single { grid-template-columns: 1fr; gap: 11px; }
  .team-v511-card {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 13px;
  }
  .team-v511-skin-wrap { min-height: 270px; }
  .team-v511-skin-wrap .minecraft-skin { height: 92%; }
  .team-v511-card-copy { padding: 23px 21px 25px; }
  .team-v511-card-copy h3 { margin: 8px 0 10px; font-size: 25px; }
  .team-v511-card-copy p { font-size: 10.5px; line-height: 1.62; }
  .team-v511-mc { margin-top: 20px; padding-top: 16px; }
}

/* Typical phone widths: keep the three-button composition, use icon-only social buttons. */
@media (max-width: 520px) {
  .prelaunch-instagram span,
  .prelaunch-discord span { display: none; }
  .prelaunch-actions {
    width: min(100%, 350px);
    grid-template-columns: 50px minmax(168px,1fr) 50px;
    gap: 7px;
  }
  .prelaunch-instagram img,
  .prelaunch-discord img { width: 20px; height: 20px; }
}

/* Very narrow phones (320–360 px): protect nav and hero from horizontal overflow. */
@media (max-width: 370px) {
  .nav-prelaunch-inner { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .prelaunch-nav-brand { width: 43px; flex-basis: 43px; }
  .prelaunch-nav-brand img { width: 43px; height: 40px; }
  .prelaunch-nav-actions { gap: 4px; }
  .prelaunch-team-nav { padding: 0 6px; font-size: 7.5px; }
  .language-pair { gap: 3px; font-size: 7.5px; }
  .prelaunch-signin { padding: 0 7px; font-size: 8px; }

  .prelaunch-content { width: calc(100% - 18px); }
  .prelaunch-wordmark { width: 88vw; margin-bottom: 14px; }
  .prelaunch-games { font-size: 7.8px; }
  .prelaunch-copy { font-size: 9.4px; }
  .prelaunch-actions {
    width: 100%;
    grid-template-columns: 46px minmax(0,1fr) 46px;
    gap: 6px;
  }
  .prelaunch-actions .btn { min-height: 47px !important; height: 47px; }
  .prelaunch-ip span { font-size: 9.7px !important; }
  .prelaunch-status { margin-top: 15px; }
  .prelaunch-status b { font-size: 10px; }
  .prelaunch-status span { font-size: 7.7px; }
}

/* Short portrait screens: reduce vertical spacing instead of clipping content. */
@media (max-width: 768px) and (max-height: 720px) {
  .prelaunch-content { padding-top: calc(72px + env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
  .prelaunch-wordmark { width: min(72vw, 390px); margin-bottom: 10px; }
  .prelaunch-intro { margin-bottom: 12px; gap: 5px; }
  .prelaunch-copy { font-size: 9px; line-height: 1.45; }
  .prelaunch-games { font-size: 7.7px; line-height: 1.5; }
  .prelaunch-actions .btn { min-height: 45px !important; height: 45px; }
  .prelaunch-status { margin-top: 12px; }
}

/* Mobile landscape: keep the same design but make it scroll-safe. */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .prelaunch-hero { min-height: 100dvh; overflow-y: auto; }
  .prelaunch-content { min-height: 100dvh; padding-top: 76px; padding-bottom: 18px; }
  .prelaunch-wordmark { width: min(48vw, 360px); margin-bottom: 8px; }
  .prelaunch-intro { margin-bottom: 9px; gap: 4px; }
  .prelaunch-games { font-size: 7px; line-height: 1.35; }
  .prelaunch-copy { font-size: 8px; line-height: 1.35; }
  .prelaunch-actions { width: min(410px, 76vw); }
  .prelaunch-actions .btn { min-height: 42px !important; height: 42px; }
  .prelaunch-status { margin-top: 9px; }
}
