/* Purpose-built mobile composition for the BIVA intent and authentication page. */

@media (max-width: 820px) {
  body:has(.signup-intent-page) {
    background: #071c2b;
  }

  body:has(.signup-intent-page) .portal-shell,
  body:has(.signup-intent-page) .portal-card {
    min-height: 100dvh;
    padding: 0;
    background: transparent;
  }

  .signup-intent-page,
  .signup-intent-visual {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    overflow: visible;
  }

  .signup-intent-visual {
    display: flow-root;
    padding: 0 0 max(12px, env(safe-area-inset-bottom));
    background-color: #071c2b;
    background-image:
      linear-gradient(180deg, rgba(2, 22, 36, .18) 0%, rgba(3, 21, 33, .1) 34%, rgba(4, 24, 37, .54) 65%, #071c2b 100%),
      url("../../assets/biva-intent-hero-v2.png");
    background-position: 58% top;
    background-size: auto 610px;
    background-repeat: no-repeat;
  }

  .signup-intent-visual::before,
  .signup-intent-visual::after {
    pointer-events: none;
  }

  .intent-hotspot-nav {
    position: absolute;
    z-index: 12;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    left: auto;
    width: auto;
  }

  .intent-hotspot-nav .intent-help {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    justify-content: center;
    color: #effff9;
    background: rgba(3, 30, 43, .5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 12px 28px rgba(0, 0, 0, .2);
    text-decoration: none;
  }

  .intent-hotspot-nav--essential {
    right: 14px;
    left: 14px;
    justify-content: flex-end;
    gap: 10px;
  }

  .intent-hotspot-nav--essential > button:not(.intent-help) {
    display: inline-flex;
    min-height: 40px;
    padding: 0 2px;
    align-items: center;
    color: rgba(255, 255, 255, .93);
    font-size: .69rem;
    font-weight: 680;
  }

  .intent-hotspot-nav--essential > span {
    display: block;
    height: 13px;
  }

  .intent-hotspot-nav .intent-help span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .intent-story {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 600px;
    padding: max(64px, calc(48px + env(safe-area-inset-top))) 20px 24px;
    display: flex;
    flex-direction: column;
    color: #fff;
  }

  .intent-brand-lockup {
    gap: 11px;
    margin: 0 58px 27px 0;
  }

  .intent-brand-lockup img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .intent-brand-lockup > span {
    font-size: 2rem;
    line-height: .82;
    letter-spacing: -.045em;
  }

  .intent-brand-lockup small {
    margin-top: 10px;
    font-size: .58rem;
    letter-spacing: .13em;
  }

  .intent-story h1 {
    width: min(305px, 88%);
    margin: 0 0 13px;
    font-size: clamp(2.62rem, 12.8vw, 3.5rem);
    line-height: .91;
    letter-spacing: -.062em;
    text-wrap: balance;
  }

  .intent-story > p {
    width: min(290px, 86%);
    max-width: none;
    margin: 0;
    color: rgba(255, 255, 255, .95);
    font-size: .87rem;
    font-weight: 500;
    line-height: 1.45;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
  }

  .intent-story-actions {
    width: calc(100% + 20px);
    margin: auto -20px 0 0;
    padding: 21px 20px 3px 0;
    display: flex;
    justify-content: flex-start;
    gap: 11px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .intent-story-actions::-webkit-scrollbar {
    display: none;
  }

  .intent-story-actions button:nth-child(n) {
    display: grid;
  }

  .intent-story-actions button {
    flex: 0 0 76px;
    min-width: 76px;
    scroll-snap-align: start;
  }

  .intent-story-actions button b {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    border-radius: 15px;
    background: rgba(3, 42, 50, .68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 28px rgba(0, 0, 0, .2);
    backdrop-filter: blur(12px);
  }

  .intent-story-actions button span {
    font-size: .63rem;
    line-height: 1.23;
  }

  .intent-auth-card {
    position: relative;
    inset: auto;
    z-index: 10;
    width: calc(100% - 24px);
    max-width: 560px;
    max-height: none;
    margin: -10px auto 0;
    padding: 28px 24px 26px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 26px;
    background: #fbfcfe;
    box-shadow: 0 28px 64px rgba(0, 12, 24, .34);
  }

  .intent-auth-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: #d8e1e8;
    transform: translateX(-50%);
  }

  .intent-auth-tabs {
    margin-bottom: 27px;
  }

  .intent-auth-tabs button {
    min-height: 54px;
    font-size: .86rem;
  }

  .intent-auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.78rem;
    line-height: 1.05;
  }

  .intent-auth-card > p {
    margin: 0 0 23px;
    font-size: .9rem;
  }

  .intent-login-form {
    gap: 12px;
  }

  .intent-login-form > label,
  .intent-register-form > label,
  .intent-otp-form > label {
    min-height: 56px;
    border-radius: 14px;
  }

  .intent-auth-options {
    align-items: center;
    min-height: 36px;
    gap: 10px;
    font-size: .76rem;
  }

  .intent-auth-options label {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .intent-auth-options button {
    min-height: 36px;
  }

  .intent-sign-in {
    min-height: 56px;
    border-radius: 14px;
  }

  .intent-social {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .intent-social button {
    min-width: 0;
    min-height: 52px;
  }

  .intent-buy-internet {
    min-height: 76px;
    margin-top: 20px;
    padding: 13px 16px;
    border-radius: 16px;
  }

  .signup-intent-modal {
    align-items: flex-end;
    padding: 0;
  }
}

@media (max-width: 390px) {
  .signup-intent-visual {
    background-position: 57% top;
  }

  .intent-story {
    min-height: 580px;
    padding-right: 17px;
    padding-left: 17px;
  }

  .intent-story h1 {
    font-size: clamp(2.45rem, 12.3vw, 3rem);
  }

  .intent-story > p {
    width: 82%;
    font-size: .82rem;
  }

  .intent-story-actions {
    width: calc(100% + 17px);
    margin-right: -17px;
  }

  .intent-auth-card {
    width: calc(100% - 16px);
    padding: 26px 18px 22px;
    border-radius: 24px;
  }
}

@media (max-width: 340px) {
  .intent-story h1 {
    font-size: 2.25rem;
  }

  .intent-social {
    grid-template-columns: 1fr;
  }
}
