/* Mobile View Matching Desktop Web */

/* Prevent page scroll bounce on canvas view */
html:has(.hero-section),
body:has(.hero-section) {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  height: 100vh !important;
  height: 100dvh !important;
}

@media screen and (max-width: 991px) {
  /* Fullscreen hero section */
  .hero-section {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    position: relative !important;
    overflow: hidden !important;
    background-color: var(--black, #000) !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Centered Top Logo */
  .logo-link-wrapper.hide-on-tab {
    display: flex !important;
    position: fixed !important;
    top: 1.25rem !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    margin: 0 !important;
    inset: 1.25rem 0 auto 0 !important;
  }

  .logo-link-wrapper.hide-on-tab .logo {
    pointer-events: auto !important;
    min-width: unset !important;
    max-width: 3.5rem !important;
    width: auto !important;
    height: 1.8rem !important;
    object-fit: contain !important;
    background-color: #fff !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .logo-link-wrapper.show-on-tab {
    display: none !important;
  }

  .menu-button {
    display: none !important;
  }

  /* Center Looping Title: exactly one title visible, cycling vertically */
  .hero-block {
    position: fixed !important;
    inset: 0% !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    pointer-events: none !important;
    z-index: 8 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hero-title-wrapper {
    display: block !important;
    position: relative !important;
    text-align: center !important;
    pointer-events: none !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 3rem !important;
    min-height: 3rem !important;
    max-height: 3rem !important;
    overflow: hidden !important;
  }

  .hero-title {
    font-family: var(--_typography---font-family--primary, Inter, sans-serif) !important;
    font-size: clamp(1.8rem, 7vw, 2.6rem) !important;
    line-height: 3rem !important;
    height: 3rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.04em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    white-space: nowrap !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
  }

  /* Hide "DRAG" badge in mobile view */
  .drag,
  .drag.center {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .drag-text {
    display: none !important;
  }

  /* Floating Bottom Pill Dock Navigation */
  .navbar {
    position: fixed !important;
    bottom: 1.5rem !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 1000 !important;
    background-color: transparent !important;
    pointer-events: none !important;
  }

  .nav-container {
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    height: 3.2rem !important;
    width: auto !important;
    max-width: 92vw !important;
    padding: 0.2rem 0.4rem !important;
    margin: 0 auto !important;
    border-radius: 40px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background-color: rgba(22, 22, 22, 0.65) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  }

  .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    inset: auto !important;
    height: 100% !important;
    width: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .nav-link-wrapper {
    height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.95rem !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    color: #fff !important;
    margin: 0 0.15rem !important;
    transition: all 0.2s ease !important;
    background-color: transparent !important;
  }

  .nav-link-wrapper.w--current {
    background-color: #fff !important;
    color: #000 !important;
  }

  .nav-link-block {
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .nav-link {
    font-family: var(--_typography---font-family--primary, Inter, sans-serif) !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    text-align: center !important;
    display: block !important;
    color: inherit !important;
  }

  .nav-link-wrapper.w--current .nav-link {
    color: #000 !important;
  }

  .nav-link.hide-on-tab {
    display: none !important;
  }

  /* Cards and Titles on Mobile / Tablet */
  .hero-image {
    display: block !important;
    position: relative;
    cursor: pointer !important;
    touch-action: none !important;
    z-index: 7 !important;
    top: 0;
    left: 0;
  }

  .hero-image .image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .hero-wrapper .w-dyn-item {
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .work-title-wrapper {
    position: absolute !important;
    bottom: -1.25rem !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  .work-title {
    font-family: var(--_typography---font-family--primary, Inter, sans-serif) !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    white-space: nowrap !important;
    display: block !important;
    text-align: center !important;
  }

  /* Hide extra mobile spacing elements on index */
  .hero-section ~ .space-4rem,
  .hero-section ~ .bottom-line,
  .space-4rem.show-on-tab,
  .bottom-line.show-on-tab {
    display: none !important;
  }
}

/* Specific Mobile Phone Screen Sizes (<= 767px) - Tight, Compact Spacing */
@media screen and (max-width: 767px) {
  .hero-container {
    cursor: grab !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    display: flex !important;
    flex-flow: wrap !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 410vw !important;
    max-width: 410vw !important;
    height: 332vw !important;
    max-height: 332vw !important;
    touch-action: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
  }

  .hero-wrapper {
    display: flex !important;
    flex-flow: wrap !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 205vw !important;
    height: 166vw !important;
    grid-column-gap: 3vw !important;
    grid-row-gap: 6vw !important;
    padding: 2vw !important;
  }

  .hero-image {
    width: 48vw !important;
    height: 36vw !important;
    margin: 0 !important;
  }
}

/* Tablet Screen Sizes (768px - 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .hero-container {
    cursor: grab !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    display: flex !important;
    flex-flow: wrap !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 280vw !important;
    max-width: 280vw !important;
    height: 220vw !important;
    max-height: 220vw !important;
    touch-action: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
  }

  .hero-wrapper {
    display: flex !important;
    flex-flow: wrap !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 140vw !important;
    height: 110vw !important;
    grid-column-gap: 2.5vw !important;
    grid-row-gap: 3.5vw !important;
    padding: 2vw !important;
  }

  .hero-image {
    width: 32vw !important;
    height: 24vw !important;
    margin: 0 !important;
  }
}
