/* mobile.css — Figma MOBILE 152:1739 (440x956)
   Loaded via <link media="(max-width: 1023px)">. Desktop lives in index.css (>=1024px).
   Scale: --cc-u = min(100vw/440, 500px/440). Mọi size = calc(N * var(--cc-u)), N = px @ 440.
   Khi khối cha hẹp, --cc-u nhỏ theo → cả UI thu cùng tỷ lệ. Page max-width 500px. */

@media (max-width: 1023px) {
  html {
    --cc-u: min(100vw / 440, 500px / 440);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #afe3fd;
    -webkit-text-size-adjust: 100%;
  }

  body {
    width: 100%;
    max-width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: #364859;
    background-color: #afe3fd;
    background-image: url("assets/mb-v2-bg.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: calc(440 * var(--cc-u)) calc(956 * var(--cc-u));
    font-family: "Roboto", sans-serif;
  }

  img {
    max-width: 100%;
  }

  .page {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: calc(440 * var(--cc-u));
    max-width: 500px;
    min-height: 100svh;
    min-height: 100dvh;
    margin-inline: auto;
    overflow-x: hidden;
    background: transparent;
  }

  /* ----- Header 440x70 ----- */
  .header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    height: calc(70 * var(--cc-u));
    background: #26a9e0;
    padding-top: env(safe-area-inset-top, 0px);
    flex: 0 0 auto;
  }

  .header__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: calc(400 * var(--cc-u));
    height: calc(48 * var(--cc-u));
    margin: calc(11.42 * var(--cc-u)) auto 0;
    padding: 0;
  }

  .header__logo {
    display: block;
    width: calc(146.41 * var(--cc-u));
    height: calc(48 * var(--cc-u));
    object-fit: contain;
    flex: 0 0 calc(146.41 * var(--cc-u));
    max-width: none;
    content: url("assets/mb-v2-logo.png");
  }

  .header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(30.75 * var(--cc-u));
    height: calc(30.75 * var(--cc-u));
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 calc(30.75 * var(--cc-u));
  }

  .header__menu-icon {
    display: block;
    width: calc(30.75 * var(--cc-u));
    height: calc(30.75 * var(--cc-u));
    object-fit: contain;
    max-width: none;
    content: url("assets/mb-v2-menu.png");
  }

  .nav {
    display: none;
  }

  /* Drawer (not in Figma; mobile nav only) */
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(14, 55, 78, 0.45);
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .drawer-backdrop[hidden] {
    display: none;
  }

  .drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: 75%;
    max-width: calc(320 * var(--cc-u));
    height: 100%;
    height: 100dvh;
    background: #26a9e0;
    box-shadow: calc(8 * var(--cc-u)) 0 calc(28 * var(--cc-u)) rgba(2, 87, 130, 0.28);
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding:
      env(safe-area-inset-top, 0px)
      0
      calc(calc(16 * var(--cc-u)) + env(safe-area-inset-bottom, 0px));
  }

  .drawer.drawer--open {
    transform: translateX(0);
  }

  .drawer__head {
    display: flex;
    align-items: center;
    min-height: calc(70 * var(--cc-u));
    padding: calc(11.42 * var(--cc-u)) calc(20 * var(--cc-u));
    background: #26a9e0;
    flex: 0 0 auto;
  }

  .drawer__logo {
    display: block;
    width: auto;
    height: calc(48 * var(--cc-u));
    object-fit: contain;
    content: url("assets/mb-v2-logo.png");
  }

  .drawer__nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: calc(4 * var(--cc-u)) 0 calc(8 * var(--cc-u));
    background: #26a9e0;
    flex: 0 0 auto;
  }

  .drawer__link {
    display: block;
    padding: calc(14 * var(--cc-u)) calc(20 * var(--cc-u));
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    font-size: calc(14 * var(--cc-u));
    line-height: calc(18 * var(--cc-u));
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: calc(1 * var(--cc-u)) solid rgba(255, 255, 255, 0.2);
  }

  .drawer__link:last-child {
    border-bottom: 0;
  }

  .drawer__link:active {
    background: rgba(255, 255, 255, 0.08);
  }

  body.nav-open {
    overflow: hidden;
  }

  /* ----- Main column 400, x=20 ----- */
  .main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(400 * var(--cc-u));
    margin: 0 auto;
    padding: 0 0 calc(43.24 * var(--cc-u));
    gap: calc(10.19 * var(--cc-u));
    flex: 1 1 auto;
  }

  /* ----- Showcase / hero 332.96x401.81 (includes CTA art) ----- */
  .showcase {
    position: relative;
    width: calc(332.96 * var(--cc-u));
    height: calc(401.81 * var(--cc-u));
    flex: 0 0 auto;
    overflow: visible;
  }

  .showcase__img {
    display: block;
    width: calc(332.96 * var(--cc-u));
    height: calc(401.81 * var(--cc-u));
    max-width: none;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
    content: url("assets/mb-v2-hero.png");
  }

  /* Hit-area over "THAM GIA PHIÊN BẢN 1" (152:1838 rel. to hero group). */
  .showcase__cta {
    position: absolute;
    left: calc(67.7 * var(--cc-u));
    top: calc(351.12 * var(--cc-u));
    width: calc(197.52 * var(--cc-u));
    height: calc(47.97 * var(--cc-u));
    z-index: 2;
    display: block;
    border-radius: calc(23.985 * var(--cc-u));
  }

  /* ----- Card 400x406, r=10, stroke 1 #02A9DD ----- */
  .card {
    width: calc(400 * var(--cc-u));
    height: calc(406 * var(--cc-u));
    flex: 0 0 auto;
    background: #ffffff;
    border: calc(1.0003 * var(--cc-u)) solid #02a9dd;
    border-radius: calc(10.003 * var(--cc-u));
    box-shadow: none;
    overflow: hidden;
    backdrop-filter: blur(calc(15.755 * var(--cc-u)));
    -webkit-backdrop-filter: blur(calc(15.755 * var(--cc-u)));
  }

  .card__inner {
    width: calc(370.49 * var(--cc-u));
    height: calc(360.3 * var(--cc-u));
    margin: calc(19 * var(--cc-u)) auto 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(17.006 * var(--cc-u));
  }

  .card__art {
    display: block;
    width: calc(300.11 * var(--cc-u));
    height: calc(146.69 * var(--cc-u));
    max-width: none;
    object-fit: fill;
    flex: 0 0 auto;
    content: url("assets/mb-v2-card-art.png");
  }

  .card__copy {
    width: calc(370.49 * var(--cc-u));
    height: calc(108.48 * var(--cc-u));
    flex: 0 0 auto;
    position: relative;
  }

  .card__desc {
    width: calc(370.49 * var(--cc-u));
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: calc(13 * var(--cc-u));
    line-height: calc(17.937 * var(--cc-u));
    letter-spacing: 0;
    color: #364859;
    text-align: left;
    flex: 0 0 auto;
  }

  .card__desc-brand {
    font-weight: 700;
    color: #02a9dd;
  }

  .card__desc-em {
    font-weight: 600;
    color: #02a9dd;
  }

  .card__desc-checkline {
    display: inline;
  }

  .card__desc-icon {
    display: inline-block;
    width: calc(16.854 * var(--cc-u));
    height: calc(16.854 * var(--cc-u));
    max-width: none;
    object-fit: contain;
    vertical-align: middle;
    margin-right: calc(4 * var(--cc-u));
    position: relative;
    top: calc(-0.5 * var(--cc-u));
    content: url("assets/mb-v2-check.png");
  }

  .contact-title {
    width: calc(370.49 * var(--cc-u));
    height: calc(18 * var(--cc-u));
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: calc(9.58 * var(--cc-u));
  }

  .contact-title__line {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: calc(0.617 * var(--cc-u));
    background: #364859;
    border: 0;
    border-radius: 0;
  }

  .contact-title__text {
    margin: 0;
    flex: 0 0 auto;
    width: auto;
    height: calc(18 * var(--cc-u));
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: calc(12.956 * var(--cc-u));
    line-height: calc(17.892 * var(--cc-u));
    color: #26a7df;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .contacts {
    width: calc(370.86 * var(--cc-u));
    height: calc(36.12 * var(--cc-u));
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(10.67 * var(--cc-u));
  }

  .contact-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: calc(116.51 * var(--cc-u));
    height: calc(36.12 * var(--cc-u));
    flex: 0 0 calc(116.51 * var(--cc-u));
    padding: calc(2.913 * var(--cc-u)) calc(6 * var(--cc-u)) calc(2.913 * var(--cc-u)) calc(3.495 * var(--cc-u));
    background: #ffffff;
    border: calc(0.583 * var(--cc-u)) solid #02a9dd;
    border-radius: calc(47.185 * var(--cc-u));
    text-decoration: none;
    color: inherit;
    gap: calc(5.243 * var(--cc-u));
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  .contact-btn:active {
    background: #f3fbff;
  }

  .contact-btn__icon {
    display: block;
    width: calc(29.13 * var(--cc-u));
    height: calc(29.13 * var(--cc-u));
    max-width: none;
    object-fit: contain;
    flex: 0 0 calc(29.13 * var(--cc-u));
  }

  .contact-btn--telegram .contact-btn__icon {
    content: url("assets/mb-v2-telegram.png");
  }

  .contact-btn--livechat .contact-btn__icon {
    content: url("assets/mb-v2-livechat.png");
  }

  .contact-btn--facebook .contact-btn__icon {
    content: url("assets/mb-v2-facebook.png");
  }

  .contact-btn__label {
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    font-size: calc(12.112 * var(--cc-u));
    line-height: calc(14.306 * var(--cc-u));
    color: #364859;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    flex: 0 0 auto;
  }

  /* leftover from v1, if reintroduced */
  .brand {
    display: none;
  }
}
