/* Mobile landing page refinement - v338.86
   Applies only to the public home on small screens. Desktop remains unchanged. */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: #071f29;
  }

  .public-home-gate,
  .public-home-gate .gate-card,
  .public-home-gate .gate-card-pro,
  .public-home-gate .gate-v232 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 0;
    overflow-x: hidden;
  }

  .public-home-gate .gate-card-pro {
    padding: 0;
    background:
      radial-gradient(circle at 50% 18%, rgba(40, 151, 150, .13), transparent 34%),
      linear-gradient(180deg, #082b38 0%, #052632 48%, #041d28 100%);
  }

  /* Header */
  .landing-nav {
    min-height: 72px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(93, 187, 213, .2);
  }

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

  .landing-brand .logo,
  .landing-custom-logo {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px;
  }

  .landing-brand strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.15;
    white-space: nowrap;
  }

  .landing-brand span {
    display: block;
    margin-top: 3px;
    font-size: .72rem;
    opacity: .78;
    white-space: nowrap;
  }

  .landing-links,
  .landing-nav-actions {
    display: none !important;
  }

  /* Hero */
  .landing-hero {
    min-height: auto !important;
    padding: 34px 18px 28px !important;
    display: block !important;
    position: relative;
    overflow: hidden;
    text-align: center;
    background-position: center !important;
    background-size: cover !important;
  }

  .landing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 29, 40, .16), rgba(4, 29, 40, .82));
    pointer-events: none;
  }

  .landing-hero-copy {
    position: relative;
    z-index: 2;
    width: 100% !important;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
  }

  .landing-hero-copy h1 {
    margin: 0;
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1.12;
    font-weight: 800;
    color: #fff;
  }

  .landing-hero-copy h2 {
    margin: 7px 0 0;
    font-size: clamp(1.02rem, 4.8vw, 1.35rem);
    line-height: 1.35;
    color: rgba(255,255,255,.87);
    font-weight: 500;
  }

  .landing-highlight {
    display: block;
    margin: 19px auto 0;
    max-width: 92%;
    font-size: clamp(1.18rem, 5.4vw, 1.62rem);
    line-height: 1.45;
    color: #f7fbfc;
  }

  .landing-hero-copy p {
    margin: 13px auto 0;
    max-width: 92%;
    font-size: .98rem;
    line-height: 1.85;
    color: rgba(255,255,255,.82);
  }

  .landing-hero-actions {
    width: 100%;
    margin: 24px auto 0;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .landing-hero-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 10px 8px;
    border-radius: 14px;
    font-size: .92rem;
    white-space: nowrap;
  }

  .landing-hero-actions .primary {
    background: linear-gradient(135deg, #ffb020, #ffc246);
    color: #152128;
    border-color: rgba(255, 190, 60, .9);
    box-shadow: 0 8px 22px rgba(255, 176, 32, .2);
  }

  .landing-hero-visual {
    display: none !important;
  }

  /* Feature cards: stable 2x2 grid like approved mobile mockup */
  .landing-feature-strip {
    width: 100%;
    padding: 16px 14px 20px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .landing-feature-strip article {
    box-sizing: border-box;
    min-width: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 178px !important;
    margin: 0 !important;
    padding: 18px 10px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    position: relative !important;
    inset: auto !important;
    overflow: hidden !important;
    text-align: center !important;
    border: 1px solid rgba(39, 143, 178, .35) !important;
    border-radius: 22px !important;
    background: linear-gradient(180deg, rgba(5, 43, 56, .96), rgba(4, 34, 46, .96)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  }

  .landing-feature-strip article > span {
    position: static !important;
    inset: auto !important;
    width: 62px !important;
    height: 62px !important;
    flex: 0 0 62px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 2rem !important;
    line-height: 1 !important;
    color: #ffb020 !important;
    background:
      radial-gradient(circle, rgba(75, 93, 50, .42), rgba(28, 48, 37, .76) 66%, rgba(255, 176, 32, .08) 68%) !important;
    border: 1px solid rgba(255, 176, 32, .22) !important;
    box-shadow: 0 0 20px rgba(255,176,32,.12) !important;
  }

  .landing-feature-strip article > div {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .landing-feature-strip article b {
    display: block !important;
    margin: 0 !important;
    font-size: clamp(1.02rem, 4.4vw, 1.28rem) !important;
    line-height: 1.35 !important;
    color: #fff !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .landing-feature-strip article small {
    display: block !important;
    margin: 8px auto 0 !important;
    max-width: 96% !important;
    font-size: .78rem !important;
    line-height: 1.65 !important;
    color: rgba(232, 241, 245, .72) !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Supporting homepage sections */
  .landing-public-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding-inline: 14px !important;
  }

  .landing-public-metrics article {
    min-width: 0 !important;
  }

  .landing-cards {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding-inline: 14px !important;
  }

  /* Footer: no overlap */
  .landing-bottom {
    box-sizing: border-box;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin: 18px 0 0 !important;
    padding: 24px 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    border-top: 1px solid rgba(61, 150, 177, .28);
    background: linear-gradient(180deg, rgba(4,31,42,.92), rgba(3,24,34,.98));
  }

  .vision-footer-logo,
  .landing-contact,
  .landing-motto {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .vision-footer-logo {
    width: min(210px, 58vw) !important;
    height: 94px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
  }

  .landing-contact {
    width: 100% !important;
  }

  .landing-contact h3 {
    margin: 0 0 8px !important;
    font-size: 1rem !important;
  }

  .public-contact-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .landing-motto {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: rgba(255,255,255,.82) !important;
  }

  .gate-footer {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)) !important;
    position: static !important;
    inset: auto !important;
    text-align: center !important;
    font-size: .84rem !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow: visible !important;
    background: #061b24 !important;
    border-top: 1px solid rgba(61,150,177,.2) !important;
  }

  #landingFooterCopyright {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  /* Login popup stays inside viewport */
  .login-popup {
    box-sizing: border-box;
    width: calc(100vw - 28px) !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 28px) !important;
    overflow-y: auto !important;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .landing-nav {
    padding-inline: 12px;
  }

  .landing-brand span {
    font-size: .66rem;
  }

  .landing-hero {
    padding-inline: 14px !important;
  }

  .landing-hero-actions {
    grid-template-columns: 1fr !important;
  }

  .landing-feature-strip {
    gap: 9px !important;
    padding-inline: 10px !important;
  }

  .landing-feature-strip article {
    min-height: 166px !important;
    padding: 15px 7px 13px !important;
    border-radius: 18px !important;
  }

  .landing-feature-strip article > span {
    width: 56px !important;
    height: 56px !important;
    flex-basis: 56px !important;
    font-size: 1.7rem !important;
  }

  .landing-feature-strip article small {
    font-size: .72rem !important;
  }
}
